Codebase list libhdate / 3538e21
[svn-upgrade] Tagging new upstream version, libhdate (1.4.8) Lior Kaplan 17 years ago
121 changed file(s) with 72243 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 Notes on the Free Translation Project
1 *************************************
2
3 Free software is going international! The Free Translation Project
4 is a way to get maintainers of free software, translators, and users all
5 together, so that will gradually become able to speak many languages.
6 A few packages already provide translations for their messages.
7
8 If you found this `ABOUT-NLS' file inside a distribution, you may
9 assume that the distributed package does use GNU `gettext' internally,
10 itself available at your nearest GNU archive site. But you do _not_
11 need to install GNU `gettext' prior to configuring, installing or using
12 this package with messages translated.
13
14 Installers will find here some useful hints. These notes also
15 explain how users should proceed for getting the programs to use the
16 available translations. They tell how people wanting to contribute and
17 work at translations should contact the appropriate team.
18
19 When reporting bugs in the `intl/' directory or bugs which may be
20 related to internationalization, you should tell about the version of
21 `gettext' which is used. The information can be found in the
22 `intl/VERSION' file, in internationalized packages.
23
24 Quick configuration advice
25 ==========================
26
27 If you want to exploit the full power of internationalization, you
28 should configure it using
29
30 ./configure --with-included-gettext
31
32 to force usage of internationalizing routines provided within this
33 package, despite the existence of internationalizing capabilities in the
34 operating system where this package is being installed. So far, only
35 the `gettext' implementation in the GNU C library version 2 provides as
36 many features (such as locale alias, message inheritance, automatic
37 charset conversion or plural form handling) as the implementation here.
38 It is also not possible to offer this additional functionality on top
39 of a `catgets' implementation. Future versions of GNU `gettext' will
40 very likely convey even more functionality. So it might be a good idea
41 to change to GNU `gettext' as soon as possible.
42
43 So you need _not_ provide this option if you are using GNU libc 2 or
44 you have installed a recent copy of the GNU gettext package with the
45 included `libintl'.
46
47 INSTALL Matters
48 ===============
49
50 Some packages are "localizable" when properly installed; the
51 programs they contain can be made to speak your own native language.
52 Most such packages use GNU `gettext'. Other packages have their own
53 ways to internationalization, predating GNU `gettext'.
54
55 By default, this package will be installed to allow translation of
56 messages. It will automatically detect whether the system already
57 provides the GNU `gettext' functions. If not, the GNU `gettext' own
58 library will be used. This library is wholly contained within this
59 package, usually in the `intl/' subdirectory, so prior installation of
60 the GNU `gettext' package is _not_ required. Installers may use
61 special options at configuration time for changing the default
62 behaviour. The commands:
63
64 ./configure --with-included-gettext
65 ./configure --disable-nls
66
67 will respectively bypass any pre-existing `gettext' to use the
68 internationalizing routines provided within this package, or else,
69 _totally_ disable translation of messages.
70
71 When you already have GNU `gettext' installed on your system and run
72 configure without an option for your new package, `configure' will
73 probably detect the previously built and installed `libintl.a' file and
74 will decide to use this. This might be not what is desirable. You
75 should use the more recent version of the GNU `gettext' library. I.e.
76 if the file `intl/VERSION' shows that the library which comes with this
77 package is more recent, you should use
78
79 ./configure --with-included-gettext
80
81 to prevent auto-detection.
82
83 The configuration process will not test for the `catgets' function
84 and therefore it will not be used. The reason is that even an
85 emulation of `gettext' on top of `catgets' could not provide all the
86 extensions of the GNU `gettext' library.
87
88 Internationalized packages have usually many `po/LL.po' files, where
89 LL gives an ISO 639 two-letter code identifying the language. Unless
90 translations have been forbidden at `configure' time by using the
91 `--disable-nls' switch, all available translations are installed
92 together with the package. However, the environment variable `LINGUAS'
93 may be set, prior to configuration, to limit the installed set.
94 `LINGUAS' should then contain a space separated list of two-letter
95 codes, stating which languages are allowed.
96
97 Using This Package
98 ==================
99
100 As a user, if your language has been installed for this package, you
101 only have to set the `LANG' environment variable to the appropriate
102 `LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
103 and `CC' is an ISO 3166 two-letter country code. For example, let's
104 suppose that you speak German and live in Germany. At the shell
105 prompt, merely execute `setenv LANG de_DE' (in `csh'),
106 `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
107 This can be done from your `.login' or `.profile' file, once and for
108 all.
109
110 You might think that the country code specification is redundant.
111 But in fact, some languages have dialects in different countries. For
112 example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
113 country code serves to distinguish the dialects.
114
115 Not all programs have translations for all languages. By default, an
116 English message is shown in place of a nonexistent translation. If you
117 understand other languages, you can set up a priority list of languages.
118 This is done through a different environment variable, called
119 `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
120 for the purpose of message handling, but you still need to have `LANG'
121 set to the primary language; this is required by other parts of the
122 system libraries. For example, some Swedish users who would rather
123 read translations in German than English for when Swedish is not
124 available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
125
126 In the `LANGUAGE' environment variable, but not in the `LANG'
127 environment variable, `LL_CC' combinations can be abbreviated as `LL'
128 to denote the language's main dialect. For example, `de' is equivalent
129 to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
130 (Portuguese as spoken in Portugal) in this context.
131
132 Translating Teams
133 =================
134
135 For the Free Translation Project to be a success, we need interested
136 people who like their own language and write it well, and who are also
137 able to synergize with other translators speaking the same language.
138 Each translation team has its own mailing list. The up-to-date list of
139 teams can be found at the Free Translation Project's homepage,
140 `http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
141 area.
142
143 If you'd like to volunteer to _work_ at translating messages, you
144 should become a member of the translating team for your own language.
145 The subscribing address is _not_ the same as the list itself, it has
146 `-request' appended. For example, speakers of Swedish can send a
147 message to `sv-request@li.org', having this message body:
148
149 subscribe
150
151 Keep in mind that team members are expected to participate
152 _actively_ in translations, or at solving translational difficulties,
153 rather than merely lurking around. If your team does not exist yet and
154 you want to start one, or if you are unsure about what to do or how to
155 get started, please write to `translation@iro.umontreal.ca' to reach the
156 coordinator for all translator teams.
157
158 The English team is special. It works at improving and uniformizing
159 the terminology in use. Proven linguistic skill are praised more than
160 programming skill, here.
161
162 Available Packages
163 ==================
164
165 Languages are not equally supported in all packages. The following
166 matrix shows the current state of internationalization, as of September
167 2001. The matrix shows, in regard of each package, for which languages
168 PO files have been submitted to translation coordination, with a
169 translation percentage of at least 50%.
170
171 Ready PO files bg cs da de el en eo es et fi fr gl he hr id it ja
172 +----------------------------------------------------+
173 a2ps | [] [] [] |
174 bash | [] [] [] [] |
175 bfd | |
176 binutils | [] |
177 bison | [] [] [] [] [] |
178 clisp | [] [] [] [] |
179 cpio | [] [] [] [] [] |
180 diffutils | [] [] [] [] [] [] [] |
181 enscript | [] [] |
182 error | [] [] |
183 fetchmail | |
184 fileutils | [] [] [] [] [] [] [] [] |
185 findutils | [] [] [] [] [] [] [] [] |
186 flex | [] [] [] |
187 freetype | |
188 gas | |
189 gawk | [] [] |
190 gcal | |
191 gcc | |
192 gettext | [] [] [] [] [] [] [] [] [] [] |
193 gnupg | [] [] [] [] [] [] [] |
194 gprof | |
195 grep | [] [] [] [] [] [] [] [] |
196 hello | [] [] [] [] [] [] [] [] [] [] [] |
197 id-utils | [] [] [] |
198 indent | [] [] [] [] [] |
199 jpilot | [] |
200 kbd | |
201 ld | [] |
202 libc | [] [] [] [] [] [] [] [] |
203 lilypond | [] |
204 lynx | [] [] [] [] |
205 m4 | [] [] [] [] [] [] [] [] |
206 make | [] [] [] [] [] [] |
207 mysecretdiary | [] |
208 nano | [] [] [] |
209 opcodes | |
210 parted | [] [] [] |
211 ptx | [] [] [] [] [] [] [] |
212 python | |
213 recode | [] [] [] [] [] [] [] [] [] |
214 sed | [] [] [] [] [] [] [] [] [] [] [] [] |
215 sh-utils | [] [] [] [] [] [] [] [] [] [] |
216 sharutils | [] [] [] [] [] [] [] [] |
217 sketch | |
218 soundtracker | [] [] [] |
219 sp | |
220 tar | [] [] [] [] [] [] [] [] |
221 texinfo | [] [] [] [] [] [] |
222 textutils | [] [] [] [] [] [] [] [] |
223 util-linux | [] [] |
224 wdiff | [] [] [] |
225 wget | [] [] [] [] [] [] [] [] [] [] |
226 +----------------------------------------------------+
227 bg cs da de el en eo es et fi fr gl he hr id it ja
228 0 14 24 32 11 1 8 23 13 1 33 22 4 0 7 9 18
229
230 ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh
231 +----------------------------------------------------+
232 a2ps | [] [] [] | 6
233 bash | | 4
234 bfd | | 0
235 binutils | | 1
236 bison | [] | 6
237 clisp | [] | 5
238 cpio | [] [] [] [] [] | 10
239 diffutils | [] [] [] [] | 11
240 enscript | [] [] [] | 5
241 error | [] [] | 4
242 fetchmail | | 0
243 fileutils | [] [] [] [] [] [] [] [] [] | 17
244 findutils | [] [] [] [] [] [] [] [] | 16
245 flex | [] [] [] | 6
246 freetype | | 0
247 gas | | 0
248 gawk | [] | 3
249 gcal | | 0
250 gcc | | 0
251 gettext | [] [] [] [] [] [] [] [] | 18
252 gnupg | [] [] [] | 10
253 gprof | | 0
254 grep | [] [] [] [] | 12
255 hello | [] [] [] [] [] [] [] [] [] [] [] | 22
256 id-utils | [] [] [] | 6
257 indent | [] [] [] [] [] [] [] | 12
258 jpilot | | 1
259 kbd | [] | 1
260 ld | | 1
261 libc | [] [] [] [] [] [] [] [] | 16
262 lilypond | [] [] | 3
263 lynx | [] [] [] [] | 8
264 m4 | [] [] [] [] | 12
265 make | [] [] [] [] [] [] | 12
266 mysecretdiary | | 1
267 nano | [] | 4
268 opcodes | [] | 1
269 parted | [] [] | 5
270 ptx | [] [] [] [] [] [] [] [] | 15
271 python | | 0
272 recode | [] [] [] [] | 13
273 sed | [] [] [] [] [] [] [] | 19
274 sh-utils | [] [] [] [] [] [] [] [] [] [] [] | 21
275 sharutils | [] [] [] | 11
276 sketch | | 0
277 soundtracker | | 3
278 sp | | 0
279 tar | [] [] [] [] [] [] [] | 15
280 texinfo | [] | 7
281 textutils | [] [] [] [] [] [] [] [] | 16
282 util-linux | [] [] | 4
283 wdiff | [] [] [] [] | 7
284 wget | [] [] [] [] [] [] [] | 17
285 +----------------------------------------------------+
286 33 teams ko lv nb nl nn no pl pt pt_BR ru sk sl sv tr uk zh
287 53 domains 9 1 6 20 0 6 17 1 13 25 10 11 23 21 2 2 387
288
289 Some counters in the preceding matrix are higher than the number of
290 visible blocks let us expect. This is because a few extra PO files are
291 used for implementing regional variants of languages, or language
292 dialects.
293
294 For a PO file in the matrix above to be effective, the package to
295 which it applies should also have been internationalized and
296 distributed as such by its maintainer. There might be an observable
297 lag between the mere existence a PO file and its wide availability in a
298 distribution.
299
300 If September 2001 seems to be old, you may fetch a more recent copy
301 of this `ABOUT-NLS' file on most GNU archive sites. The most
302 up-to-date matrix with full percentage details can be found at
303 `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
304
305 Using `gettext' in new packages
306 ===============================
307
308 If you are writing a freely available program and want to
309 internationalize it you are welcome to use GNU `gettext' in your
310 package. Of course you have to respect the GNU Library General Public
311 License which covers the use of the GNU `gettext' library. This means
312 in particular that even non-free programs can use `libintl' as a shared
313 library, whereas only free software can use `libintl' as a static
314 library or use modified versions of `libintl'.
315
316 Once the sources are changed appropriately and the setup can handle
317 to use of `gettext' the only thing missing are the translations. The
318 Free Translation Project is also available for packages which are not
319 developed inside the GNU project. Therefore the information given above
320 applies also for every other Free Software Project. Contact
321 `translation@iro.umontreal.ca' to make the `.pot' files available to
322 the translation teams.
323
0 (C) Yaacov Zamir <kzamir@walla.co.il> 2003-2005.
0 GNU GENERAL PUBLIC LICENSE
1 Version 2, June 1991
2
3 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
4 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, 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) <year> <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) year 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 libhdate (1.4.8)
1
2 * Fix help printing bug: Add new line at the end of hdate help text.
3 * Add two new functios to the time of day section:
4 hdate_get_utc_sun_time_full - gets the time of first light,
5 talit, sunris, sunset, first stars and three stars.
6 hdate_get_utc_sun_time_deg - gets the time the sun is on
7 some known altitude.
8 * Add Times of day to hdate command line tool.
9 supported times: first-light, talit, sunrise, mid-day, sunset, first-stars
10 and three-stars
11 * Add Times of Shabat enter/leave to hdate command line tool.
12 Shabat starts 20 min before sunset, and leave at three stars.
13 * Add new oprions in hdate command line tool to it's man page
14
15 -- Yaacov Zamir <kzamir@wall.co.il> Tue, 8 Jun 2006 12:13
16
17 libhdate (1.4.7)
18
19 * Fix pesach II in hebrew po file.
20 * hcal utility export strict html 4.01.
21 * hcal utility can export diaspora holidays
22 * Update hcal utility man file.
23
24 -- Yaacov Zamir <kzamir@wall.co.il> Tue, 18 Apr 2006 12:13
25
26 libhdate (1.4.3)
27
28 * Fix header of spanish po file.
29 * Daniel Nylander: Swedish translation.
30
31 -- Yaacov Zamir <kzamir@wall.co.il> Mon, 10 Apr 2006 12:13
32
33 libhdate (1.4.2)
34
35 * Ido Kanner <idokan@gmail.com> - Update free pascal bindings.
36 * Update address of Free Software Foundation in COPYING file.
37 * make the spec.in file more configurable.
38
39 -- Yaacov Zamir <kzamir@wall.co.il> Fri, 25 Nov 2005 12:13
40
41 libhdate (1.4.0)
42
43 * Michael Kaminsky - libhdate now reports the 2nd day of yom
44 tov on Sukkot and Peseach as Yom Tov and not Chol Hamoed.
45 * Cange C++ API - insert the location and diaspora flag as
46 part of the hdate object.
47 * Docomentation - separate the c and the cpp docs, more readable.
48 * hdate example can now export iCal formated output.
49
50 -- Yaacov Zamir <kzamir@wall.co.il> Mon, 8 Aug 2005 22:13
51
52 libhdate (1.3.1)
53
54 * Add "const correctness" patch from Markus Elfring (elfring).
55 * Manual page seems to contain a hyphen where a minus sign was
56 intended, patch by Lior Kaplan.
57 * Remove the debian directory from the ziped package.
58
59 -- Yaacov Zamir <kzamir@wall.co.il> Sat, 30 Jul 2005 22:13
60
61 libhdate (1.3.0)
62
63 * Add examples to the doc directory
64 * doc directory is now /usr/doc/libhdate0 and no /usr/doc/hdate
65 * make int_to_string aware of LANGUAGE system variable, make it more gettext compatible
66
67 -- Yaacov Zamir <kzamir@wall.co.il> Wed, 27 Jul 2005 18:13
68
69 libhdate (1.0.1)
70
71 * first major reales number.
72 * start to number the shared library.
73 * stable api.
74 * updated utility programs hdate/hcal.
75 * added man files for library and utility programs.
76 * python and perl bindings.
77 * free pascal binding by Ido Kanner <idokan@gmail.com>
78 * ru, fr, he, es translations, thanks to Peled Esti and Boris Peterberg.
79 * added debian dir and RH spec file for easy packing, thanks to Oron Peled.
80
81 -- Yaacov Zamir <kzamir@wall.co.il> Tue, 08 March 2005 18:13
82
83 libhdate (0.30.0)
84
85 * add es_MX translation by Peled Esti <esti@actcom.co.il>
86 * initial russian translation by Boris Peterberg
87
88 -- Yaacov Zamir <kzamir@wall.co.il> Tue, 08 March 2005 18:13
89
90 libhdate (0.30.0)
91
92 * cpp, python and perl bindings
93 * examples for the new libhdate bindings
94
95 -- Yaacov Zamir <kzamir@wall.co.il> Fri, 04 March 2005 15:19:29
96
97 libhdate (0.22.0)
98
99 * Michael Kaminsky's patch to Shavot II on diaspora reading.
100
101 -- Yaacov Zamir <kzamir@wall.co.il> Mon, 28 Feb 2005 08:12:31
102
103 libhdate (0.22.0)
104
105 * New hebcal examples
106
107 -- Yaacov Zamir <kzamir@wall.co.il> Fri, 25 Feb 2005 11:15:18
108
109 libhdate (0.21.0)
110
111 * New spec file by Oron Peled
112 * Diaspora holydays/readings
113 * New sunrise sunset functions
114 * New html examples
115 * New configure options to build / not build the examples
116
117 -- Yaacov Zamir <kzamir@wall.co.il> Fri, 25 Feb 2005 11:15:18
118
119 libhdate (0.17.0)
120
121 * API chages.
122 * base struct change.
123
124 -- Yaacov Zamir <kzamir@wall.co.il> Mon, 22 Feb 2005 19:34:22
125
126 libhdate (0.16.3)
127
128 * Try to fix date conversion bug, thanks Michael Kaminsky.
129
130 -- Yaacov Zamir <kzamir@wall.co.il> Mon, 21 Feb 2005 09:03:12
131
132 libhdate (0.16.2)
133
134 * Syntax error, and weeks calculation bug fixed by Michael Kaminsky.
135
136 -- Yaacov Zamir <kzamir@wall.co.il> Sun, 20 Feb 2005 06:53:12
137
138 libhdate (0.16.1)
139
140 * Fix locale bug in int_to_string.
141 * Add examples directory.
142 * Minor bug fixes.
143
144 -- Yaacov Zamir <kzamir@wall.co.il> Sat, 19 Feb 2005 20:07:19
0 Basic Installation
1 ==================
2
3 These are generic installation instructions.
4
5 The `configure' shell script attempts to guess correct values for
6 various system-dependent variables used during compilation. It uses
7 those values to create a `Makefile' in each directory of the package.
8 It may also create one or more `.h' files containing system-dependent
9 definitions. Finally, it creates a shell script `config.status' that
10 you can run in the future to recreate the current configuration, a file
11 `config.cache' that saves the results of its tests to speed up
12 reconfiguring, and a file `config.log' containing compiler output
13 (useful mainly for debugging `configure').
14
15 If you need to do unusual things to compile the package, please try
16 to figure out how `configure' could check whether to do them, and mail
17 diffs or instructions to the address given in the `README' so they can
18 be considered for the next release. If at some point `config.cache'
19 contains results you don't want to keep, you may remove or edit it.
20
21 The file `configure.in' is used to create `configure' by a program
22 called `autoconf'. You only need `configure.in' if you want to change
23 it or regenerate `configure' using a newer version of `autoconf'.
24
25 The simplest way to compile this package is:
26
27 1. `cd' to the directory containing the package's source code and type
28 `./configure' to configure the package for your system. If you're
29 using `csh' on an old version of System V, you might need to type
30 `sh ./configure' instead to prevent `csh' from trying to execute
31 `configure' itself.
32
33 Running `configure' takes awhile. While running, it prints some
34 messages telling which features it is checking for.
35
36 2. Type `make' to compile the package.
37
38 3. Optionally, type `make check' to run any self-tests that come with
39 the package.
40
41 4. Type `make install' to install the programs and any data files and
42 documentation.
43
44 5. You can remove the program binaries and object files from the
45 source code directory by typing `make clean'. To also remove the
46 files that `configure' created (so you can compile the package for
47 a different kind of computer), type `make distclean'. There is
48 also a `make maintainer-clean' target, but that is intended mainly
49 for the package's developers. If you use it, you may have to get
50 all sorts of other programs in order to regenerate files that came
51 with the distribution.
52
53 Compilers and Options
54 =====================
55
56 Some systems require unusual options for compilation or linking that
57 the `configure' script does not know about. You can give `configure'
58 initial values for variables by setting them in the environment. Using
59 a Bourne-compatible shell, you can do that on the command line like
60 this:
61 CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
62
63 Or on systems that have the `env' program, you can do it like this:
64 env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
65
66 Compiling For Multiple Architectures
67 ====================================
68
69 You can compile the package for more than one kind of computer at the
70 same time, by placing the object files for each architecture in their
71 own directory. To do this, you must use a version of `make' that
72 supports the `VPATH' variable, such as GNU `make'. `cd' to the
73 directory where you want the object files and executables to go and run
74 the `configure' script. `configure' automatically checks for the
75 source code in the directory that `configure' is in and in `..'.
76
77 If you have to use a `make' that does not supports the `VPATH'
78 variable, you have to compile the package for one architecture at a time
79 in the source code directory. After you have installed the package for
80 one architecture, use `make distclean' before reconfiguring for another
81 architecture.
82
83 Installation Names
84 ==================
85
86 By default, `make install' will install the package's files in
87 `/usr/local/bin', `/usr/local/man', etc. You can specify an
88 installation prefix other than `/usr/local' by giving `configure' the
89 option `--prefix=PATH'.
90
91 You can specify separate installation prefixes for
92 architecture-specific files and architecture-independent files. If you
93 give `configure' the option `--exec-prefix=PATH', the package will use
94 PATH as the prefix for installing programs and libraries.
95 Documentation and other data files will still use the regular prefix.
96
97 In addition, if you use an unusual directory layout you can give
98 options like `--bindir=PATH' to specify different values for particular
99 kinds of files. Run `configure --help' for a list of the directories
100 you can set and what kinds of files go in them.
101
102 If the package supports it, you can cause programs to be installed
103 with an extra prefix or suffix on their names by giving `configure' the
104 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
105
106 Optional Features
107 =================
108
109 Some packages pay attention to `--enable-FEATURE' options to
110 `configure', where FEATURE indicates an optional part of the package.
111 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
112 is something like `gnu-as' or `x' (for the X Window System). The
113 `README' should mention any `--enable-' and `--with-' options that the
114 package recognizes.
115
116 For packages that use the X Window System, `configure' can usually
117 find the X include and library files automatically, but if it doesn't,
118 you can use the `configure' options `--x-includes=DIR' and
119 `--x-libraries=DIR' to specify their locations.
120
121 Specifying the System Type
122 ==========================
123
124 There may be some features `configure' can not figure out
125 automatically, but needs to determine by the type of host the package
126 will run on. Usually `configure' can figure that out, but if it prints
127 a message saying it can not guess the host type, give it the
128 `--host=TYPE' option. TYPE can either be a short name for the system
129 type, such as `sun4', or a canonical name with three fields:
130 CPU-COMPANY-SYSTEM
131
132 See the file `config.sub' for the possible values of each field. If
133 `config.sub' isn't included in this package, then this package doesn't
134 need to know the host type.
135
136 If you are building compiler tools for cross-compiling, you can also
137 use the `--target=TYPE' option to select the type of system they will
138 produce code for and the `--build=TYPE' option to select the type of
139 system on which you are compiling the package.
140
141 Sharing Defaults
142 ================
143
144 If you want to set default values for `configure' scripts to share,
145 you can create a site shell script called `config.site' that gives
146 default values for variables like `CC', `cache_file', and `prefix'.
147 `configure' looks for `PREFIX/share/config.site' if it exists, then
148 `PREFIX/etc/config.site' if it exists. Or, you can set the
149 `CONFIG_SITE' environment variable to the location of the site script.
150 A warning: not all `configure' scripts look for a site script.
151
152 Operation Controls
153 ==================
154
155 `configure' recognizes the following options to control how it
156 operates.
157
158 `--cache-file=FILE'
159 Use and save the results of the tests in FILE instead of
160 `./config.cache'. Set FILE to `/dev/null' to disable caching, for
161 debugging `configure'.
162
163 `--help'
164 Print a summary of the options to `configure', and exit.
165
166 `--quiet'
167 `--silent'
168 `-q'
169 Do not print messages saying which checks are being made. To
170 suppress all normal output, redirect it to `/dev/null' (any error
171 messages will still be shown).
172
173 `--srcdir=DIR'
174 Look for the package's source code in directory DIR. Usually
175 `configure' can determine that directory automatically.
176
177 `--version'
178 Print the version of Autoconf used to generate the `configure'
179 script, and exit.
180
181 `configure' also accepts some other, not widely useful, options.
0 ## Process this file with automake to produce Makefile.in
1 ## Created by Anjuta - will be overwritten
2 ## If you don't want it to overwrite it,
3 ## Please disable it in the Anjuta project configuration
4
5 SUBDIRS = intl po src examples bindings
6
7 pkgconfigdir = $(libdir)/pkgconfig
8 pkgconfig_DATA = libhdate.pc
9
10 libhdatedocdir = ${prefix}/share/doc/libhdate
11 libhdatedoc_DATA = \
12 README\
13 hdate_README\
14 COPYING\
15 AUTHORS\
16 ChangeLog\
17 INSTALL\
18 NEWS\
19 TODO\
20 USE\
21 ABOUT-NLS
22
23 EXTRA_DIST = $(libhdatedoc_DATA) libhdate.pc.in libhdate.spec libhdate.spec.in
0 # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
1
2 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
3 # This Makefile.in is free software; the Free Software Foundation
4 # gives unlimited permission to copy and/or distribute it,
5 # with or without modifications, as long as this notice is preserved.
6
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
9 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 # PARTICULAR PURPOSE.
11
12
13 SHELL = @SHELL@
14
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 VPATH = @srcdir@
18 prefix = @prefix@
19 exec_prefix = @exec_prefix@
20
21 bindir = @bindir@
22 sbindir = @sbindir@
23 libexecdir = @libexecdir@
24 datadir = @datadir@
25 sysconfdir = @sysconfdir@
26 sharedstatedir = @sharedstatedir@
27 localstatedir = @localstatedir@
28 libdir = @libdir@
29 infodir = @infodir@
30 mandir = @mandir@
31 includedir = @includedir@
32 oldincludedir = /usr/include
33
34 DESTDIR =
35
36 pkgdatadir = $(datadir)/@PACKAGE@
37 pkglibdir = $(libdir)/@PACKAGE@
38 pkgincludedir = $(includedir)/@PACKAGE@
39
40 top_builddir = .
41
42 ACLOCAL = @ACLOCAL@
43 AUTOCONF = @AUTOCONF@
44 AUTOMAKE = @AUTOMAKE@
45 AUTOHEADER = @AUTOHEADER@
46
47 INSTALL = @INSTALL@
48 INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
49 INSTALL_DATA = @INSTALL_DATA@
50 INSTALL_SCRIPT = @INSTALL_SCRIPT@
51 transform = @program_transform_name@
52
53 NORMAL_INSTALL = :
54 PRE_INSTALL = :
55 POST_INSTALL = :
56 NORMAL_UNINSTALL = :
57 PRE_UNINSTALL = :
58 POST_UNINSTALL = :
59 host_alias = @host_alias@
60 host_triplet = @host@
61 AR = @AR@
62 AS = @AS@
63 BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
64 CATOBJEXT = @CATOBJEXT@
65 CC = @CC@
66 CFLAGS = @CFLAGS@
67 CXX = @CXX@
68 CXXCPP = @CXXCPP@
69 DATADIRNAME = @DATADIRNAME@
70 DLLTOOL = @DLLTOOL@
71 ECHO = @ECHO@
72 EGREP = @EGREP@
73 EXEEXT = @EXEEXT@
74 F77 = @F77@
75 GCJ = @GCJ@
76 GCJFLAGS = @GCJFLAGS@
77 GENCAT = @GENCAT@
78 GLIBC2 = @GLIBC2@
79 GLIBC21 = @GLIBC21@
80 GMSGFMT = @GMSGFMT@
81 HAVE_ASPRINTF = @HAVE_ASPRINTF@
82 HAVE_LIB = @HAVE_LIB@
83 HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
84 HAVE_SNPRINTF = @HAVE_SNPRINTF@
85 HAVE_WPRINTF = @HAVE_WPRINTF@
86 INSTOBJEXT = @INSTOBJEXT@
87 INTLBISON = @INTLBISON@
88 INTLLIBS = @INTLLIBS@
89 INTLOBJS = @INTLOBJS@
90 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
91 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
92 LIB = @LIB@
93 LIBICONV = @LIBICONV@
94 LIBINTL = @LIBINTL@
95 LIBS = @LIBS@
96 LIBTOOL = @LIBTOOL@
97 LN_S = @LN_S@
98 LTLIB = @LTLIB@
99 LTLIBICONV = @LTLIBICONV@
100 LTLIBINTL = @LTLIBINTL@
101 MAINT = @MAINT@
102 MAKEINFO = @MAKEINFO@
103 MKINSTALLDIRS = @MKINSTALLDIRS@
104 OBJDUMP = @OBJDUMP@
105 OBJEXT = @OBJEXT@
106 PACKAGE = @PACKAGE@
107 PA_MODULES_PATH = @PA_MODULES_PATH@
108 PA_VERSION = @PA_VERSION@
109 PE_CFLAGS = @PE_CFLAGS@
110 PE_MODULES_PATH = @PE_MODULES_PATH@
111 PKG_CONFIG = @PKG_CONFIG@
112 POSUB = @POSUB@
113 PY_CFLAGS = @PY_CFLAGS@
114 PY_MODULES_PATH = @PY_MODULES_PATH@
115 PY_VERSION = @PY_VERSION@
116 RANLIB = @RANLIB@
117 RC = @RC@
118 STRIP = @STRIP@
119 USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
120 USE_NLS = @USE_NLS@
121 VERSION = @VERSION@
122 VERSION_INFO = @VERSION_INFO@
123 have_pascal = @have_pascal@
124 have_perl = @have_perl@
125 have_python = @have_python@
126 have_swig = @have_swig@
127
128 SUBDIRS = intl po src examples bindings
129
130 pkgconfigdir = $(libdir)/pkgconfig
131 pkgconfig_DATA = libhdate.pc
132
133 libhdatedocdir = ${prefix}/share/doc/libhdate
134 libhdatedoc_DATA = README hdate_README COPYING AUTHORS ChangeLog INSTALL NEWS TODO USE ABOUT-NLS
135
136
137 EXTRA_DIST = $(libhdatedoc_DATA) libhdate.pc.in libhdate.spec libhdate.spec.in
138 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
139 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
140 CONFIG_CLEAN_FILES = libhdate.spec libhdate.pc
141 DATA = $(libhdatedoc_DATA) $(pkgconfig_DATA)
142
143 DIST_COMMON = README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL \
144 Makefile.am Makefile.in NEWS TODO aclocal.m4 config.guess config.sub \
145 configure configure.in install-sh libhdate.pc.in libhdate.spec.in \
146 ltmain.sh missing mkinstalldirs
147
148
149 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
150
151 TAR = tar
152 GZIP_ENV = --best
153 all: all-redirect
154 .SUFFIXES:
155 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
156 cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile
157
158 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
159 cd $(top_builddir) \
160 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
161
162 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in
163 cd $(srcdir) && $(ACLOCAL)
164
165 config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
166 $(SHELL) ./config.status --recheck
167 $(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
168 cd $(srcdir) && $(AUTOCONF)
169 libhdate.spec: $(top_builddir)/config.status libhdate.spec.in
170 cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
171 libhdate.pc: $(top_builddir)/config.status libhdate.pc.in
172 cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
173
174 install-libhdatedocDATA: $(libhdatedoc_DATA)
175 @$(NORMAL_INSTALL)
176 $(mkinstalldirs) $(DESTDIR)$(libhdatedocdir)
177 @list='$(libhdatedoc_DATA)'; for p in $$list; do \
178 if test -f $(srcdir)/$$p; then \
179 echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(libhdatedocdir)/$$p"; \
180 $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(libhdatedocdir)/$$p; \
181 else if test -f $$p; then \
182 echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libhdatedocdir)/$$p"; \
183 $(INSTALL_DATA) $$p $(DESTDIR)$(libhdatedocdir)/$$p; \
184 fi; fi; \
185 done
186
187 uninstall-libhdatedocDATA:
188 @$(NORMAL_UNINSTALL)
189 list='$(libhdatedoc_DATA)'; for p in $$list; do \
190 rm -f $(DESTDIR)$(libhdatedocdir)/$$p; \
191 done
192
193 install-pkgconfigDATA: $(pkgconfig_DATA)
194 @$(NORMAL_INSTALL)
195 $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir)
196 @list='$(pkgconfig_DATA)'; for p in $$list; do \
197 if test -f $(srcdir)/$$p; then \
198 echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgconfigdir)/$$p"; \
199 $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgconfigdir)/$$p; \
200 else if test -f $$p; then \
201 echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgconfigdir)/$$p"; \
202 $(INSTALL_DATA) $$p $(DESTDIR)$(pkgconfigdir)/$$p; \
203 fi; fi; \
204 done
205
206 uninstall-pkgconfigDATA:
207 @$(NORMAL_UNINSTALL)
208 list='$(pkgconfig_DATA)'; for p in $$list; do \
209 rm -f $(DESTDIR)$(pkgconfigdir)/$$p; \
210 done
211
212 # This directory's subdirectories are mostly independent; you can cd
213 # into them and run `make' without going through this Makefile.
214 # To change the values of `make' variables: instead of editing Makefiles,
215 # (1) if the variable is set in `config.status', edit `config.status'
216 # (which will cause the Makefiles to be regenerated when you run `make');
217 # (2) otherwise, pass the desired values on the `make' command line.
218
219 @SET_MAKE@
220
221 all-recursive install-data-recursive install-exec-recursive \
222 installdirs-recursive install-recursive uninstall-recursive \
223 check-recursive installcheck-recursive info-recursive dvi-recursive:
224 @set fnord $(MAKEFLAGS); amf=$$2; \
225 dot_seen=no; \
226 target=`echo $@ | sed s/-recursive//`; \
227 list='$(SUBDIRS)'; for subdir in $$list; do \
228 echo "Making $$target in $$subdir"; \
229 if test "$$subdir" = "."; then \
230 dot_seen=yes; \
231 local_target="$$target-am"; \
232 else \
233 local_target="$$target"; \
234 fi; \
235 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
236 || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
237 done; \
238 if test "$$dot_seen" = "no"; then \
239 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
240 fi; test -z "$$fail"
241
242 mostlyclean-recursive clean-recursive distclean-recursive \
243 maintainer-clean-recursive:
244 @set fnord $(MAKEFLAGS); amf=$$2; \
245 dot_seen=no; \
246 rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
247 rev="$$subdir $$rev"; \
248 test "$$subdir" != "." || dot_seen=yes; \
249 done; \
250 test "$$dot_seen" = "no" && rev=". $$rev"; \
251 target=`echo $@ | sed s/-recursive//`; \
252 for subdir in $$rev; do \
253 echo "Making $$target in $$subdir"; \
254 if test "$$subdir" = "."; then \
255 local_target="$$target-am"; \
256 else \
257 local_target="$$target"; \
258 fi; \
259 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
260 || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
261 done && test -z "$$fail"
262 tags-recursive:
263 list='$(SUBDIRS)'; for subdir in $$list; do \
264 test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
265 done
266
267 tags: TAGS
268
269 ID: $(HEADERS) $(SOURCES) $(LISP)
270 list='$(SOURCES) $(HEADERS)'; \
271 unique=`for i in $$list; do echo $$i; done | \
272 awk ' { files[$$0] = 1; } \
273 END { for (i in files) print i; }'`; \
274 here=`pwd` && cd $(srcdir) \
275 && mkid -f$$here/ID $$unique $(LISP)
276
277 TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
278 tags=; \
279 here=`pwd`; \
280 list='$(SUBDIRS)'; for subdir in $$list; do \
281 if test "$$subdir" = .; then :; else \
282 test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
283 fi; \
284 done; \
285 list='$(SOURCES) $(HEADERS)'; \
286 unique=`for i in $$list; do echo $$i; done | \
287 awk ' { files[$$0] = 1; } \
288 END { for (i in files) print i; }'`; \
289 test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
290 || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
291
292 mostlyclean-tags:
293
294 clean-tags:
295
296 distclean-tags:
297 -rm -f TAGS ID
298
299 maintainer-clean-tags:
300
301 distdir = $(PACKAGE)-$(VERSION)
302 top_distdir = $(distdir)
303
304 # This target untars the dist file and tries a VPATH configuration. Then
305 # it guarantees that the distribution is self-contained by making another
306 # tarfile.
307 distcheck: dist
308 -rm -rf $(distdir)
309 GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
310 mkdir $(distdir)/=build
311 mkdir $(distdir)/=inst
312 dc_install_base=`cd $(distdir)/=inst && pwd`; \
313 cd $(distdir)/=build \
314 && ../configure --with-included-gettext --srcdir=.. --prefix=$$dc_install_base \
315 && $(MAKE) $(AM_MAKEFLAGS) \
316 && $(MAKE) $(AM_MAKEFLAGS) dvi \
317 && $(MAKE) $(AM_MAKEFLAGS) check \
318 && $(MAKE) $(AM_MAKEFLAGS) install \
319 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
320 && $(MAKE) $(AM_MAKEFLAGS) dist
321 -rm -rf $(distdir)
322 @banner="$(distdir).tar.gz is ready for distribution"; \
323 dashes=`echo "$$banner" | sed s/./=/g`; \
324 echo "$$dashes"; \
325 echo "$$banner"; \
326 echo "$$dashes"
327 dist: distdir
328 -chmod -R a+r $(distdir)
329 GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
330 -rm -rf $(distdir)
331 dist-all: distdir
332 -chmod -R a+r $(distdir)
333 GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
334 -rm -rf $(distdir)
335 distdir: $(DISTFILES)
336 -rm -rf $(distdir)
337 mkdir $(distdir)
338 -chmod 777 $(distdir)
339 @for file in $(DISTFILES); do \
340 d=$(srcdir); \
341 if test -d $$d/$$file; then \
342 cp -pr $$d/$$file $(distdir)/$$file; \
343 else \
344 test -f $(distdir)/$$file \
345 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
346 || cp -p $$d/$$file $(distdir)/$$file || :; \
347 fi; \
348 done
349 for subdir in $(SUBDIRS); do \
350 if test "$$subdir" = .; then :; else \
351 test -d $(distdir)/$$subdir \
352 || mkdir $(distdir)/$$subdir \
353 || exit 1; \
354 chmod 777 $(distdir)/$$subdir; \
355 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
356 || exit 1; \
357 fi; \
358 done
359 info-am:
360 info: info-recursive
361 dvi-am:
362 dvi: dvi-recursive
363 check-am: all-am
364 check: check-recursive
365 installcheck-am:
366 installcheck: installcheck-recursive
367 install-exec-am:
368 install-exec: install-exec-recursive
369
370 install-data-am: install-libhdatedocDATA install-pkgconfigDATA
371 install-data: install-data-recursive
372
373 install-am: all-am
374 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
375 install: install-recursive
376 uninstall-am: uninstall-libhdatedocDATA uninstall-pkgconfigDATA
377 uninstall: uninstall-recursive
378 all-am: Makefile $(DATA)
379 all-redirect: all-recursive
380 install-strip:
381 $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
382 installdirs: installdirs-recursive
383 installdirs-am:
384 $(mkinstalldirs) $(DESTDIR)$(libhdatedocdir) $(DESTDIR)$(pkgconfigdir)
385
386
387 mostlyclean-generic:
388
389 clean-generic:
390
391 distclean-generic:
392 -rm -f Makefile $(CONFIG_CLEAN_FILES)
393 -rm -f config.cache config.log stamp-h stamp-h[0-9]*
394
395 maintainer-clean-generic:
396 mostlyclean-am: mostlyclean-tags mostlyclean-generic
397
398 mostlyclean: mostlyclean-recursive
399
400 clean-am: clean-tags clean-generic mostlyclean-am
401
402 clean: clean-recursive
403
404 distclean-am: distclean-tags distclean-generic clean-am
405 -rm -f libtool
406
407 distclean: distclean-recursive
408 -rm -f config.status
409
410 maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
411 distclean-am
412 @echo "This command is intended for maintainers to use;"
413 @echo "it deletes files that may require special tools to rebuild."
414
415 maintainer-clean: maintainer-clean-recursive
416 -rm -f config.status
417
418 .PHONY: uninstall-libhdatedocDATA install-libhdatedocDATA \
419 uninstall-pkgconfigDATA install-pkgconfigDATA install-data-recursive \
420 uninstall-data-recursive install-exec-recursive \
421 uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
422 all-recursive check-recursive installcheck-recursive info-recursive \
423 dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
424 maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
425 distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
426 dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
427 install-exec install-data-am install-data install-am install \
428 uninstall-am uninstall all-redirect all-am all installdirs-am \
429 installdirs mostlyclean-generic distclean-generic clean-generic \
430 maintainer-clean-generic clean mostlyclean distclean maintainer-clean
431
432
433 # Tell versions [3.59,3.63) of GNU make to not export all variables.
434 # Otherwise a system limit (for SysV at least) may be exceeded.
435 .NOEXPORT:
(New empty file)
0 This library of functions are using the sorce code from
1 Amos Shapir's "hdate" package fixed and patched by Nadav Har'El.
2 See the original package's README (hdate_README)
3
4 LibHdate is a small C,C++ library for Hebrew dates,
5 holidays, and reading sequence (parasha). It is using
6 the sorce code from Amos Shapir's "hdate" package fixed and
7 patched by Nadav Har'El. The Torah reading sequence
8 is from tables by Zvi Har'El.
9
10 15 Adar II 5763 Shusan Purim
11 kobi zamir <kzamir@walla.co.il>
12 -------------------------------------
13
14 see USE file for usage.
15
0 libhdate (1.2.1)
1
2 * hcal example to print hebrew months and years
3 * configure.in - prefix for pascal, version for debian changlog
4 * mono binding usig swig
5 * ask eytan about the freanch
6 * clean the c code out of the pascal demo file ?
7
8 -- Yaacov Zamir <kzamir@wall.co.il> Tue, 15 Mar 2005 08:04:32
9
10 libhdate (0.16.3)
11
12 * Check date conversion, for more dates.
13 * More checks for Holyday function.
14 * More checks for Parasha function.
15
16 -- Yaacov Zamir <kzamir@wall.co.il> Mon, 21 Feb 2005 09:93:12
0 use:
1 ----
2 gcc -c `pkg-config --cflags libhdate` <your code>.c
3 gcc `pkg-config --libs libhdate` <your code>.o -o <program name>
4
5
6 if you dont have pkg-config:
7 ----------------------------
8
9 gcc -c <your code>.c
10 gcc -lm -lhdate <your code>.o -o <program name>
11
12
13 kobi zamir <kzamir@walla.co.il>
14 -------------------------------------
15
16 -------------------------------
17 example code:
18 file: test.c
19 -------------------------------
20
21 #include <stdio.h>
22 #include <hdate.h>
23
24 #define TRUE 1
25 #define FALSE 0
26
27 int
28 main()
29 {
30 hdate_struct *h;
31
32 h = hdate_hdate( 0,0,0);
33
34 printf ("%s\n", hdate_get_format_date (h, FALSE) );
35
36 return 0;
37 }
38
39 --------------------------------
40 compile:
41 --------------------------------
42
43 gcc -lm -lhdate test.c -o test
44
45 --------------------------------
46 run:
47 --------------------------------
48
49 ./test
0 dnl aclocal.m4 generated automatically by aclocal 1.4-p6
1
2 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
6
7 dnl This program is distributed in the hope that it will be useful,
8 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
9 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 dnl PARTICULAR PURPOSE.
11
12 # lib-prefix.m4 serial 4 (gettext-0.14.2)
13 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
14 dnl This file is free software; the Free Software Foundation
15 dnl gives unlimited permission to copy and/or distribute it,
16 dnl with or without modifications, as long as this notice is preserved.
17
18 dnl From Bruno Haible.
19
20 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
21 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
22 dnl require excessive bracketing.
23 ifdef([AC_HELP_STRING],
24 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
25 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
26
27 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
28 dnl to access previously installed libraries. The basic assumption is that
29 dnl a user will want packages to use other packages he previously installed
30 dnl with the same --prefix option.
31 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
32 dnl libraries, but is otherwise very convenient.
33 AC_DEFUN([AC_LIB_PREFIX],
34 [
35 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
36 AC_REQUIRE([AC_PROG_CC])
37 AC_REQUIRE([AC_CANONICAL_HOST])
38 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
39 dnl By default, look in $includedir and $libdir.
40 use_additional=yes
41 AC_LIB_WITH_FINAL_PREFIX([
42 eval additional_includedir=\"$includedir\"
43 eval additional_libdir=\"$libdir\"
44 ])
45 AC_LIB_ARG_WITH([lib-prefix],
46 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
47 --without-lib-prefix don't search for libraries in includedir and libdir],
48 [
49 if test "X$withval" = "Xno"; then
50 use_additional=no
51 else
52 if test "X$withval" = "X"; then
53 AC_LIB_WITH_FINAL_PREFIX([
54 eval additional_includedir=\"$includedir\"
55 eval additional_libdir=\"$libdir\"
56 ])
57 else
58 additional_includedir="$withval/include"
59 additional_libdir="$withval/lib"
60 fi
61 fi
62 ])
63 if test $use_additional = yes; then
64 dnl Potentially add $additional_includedir to $CPPFLAGS.
65 dnl But don't add it
66 dnl 1. if it's the standard /usr/include,
67 dnl 2. if it's already present in $CPPFLAGS,
68 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
69 dnl 4. if it doesn't exist as a directory.
70 if test "X$additional_includedir" != "X/usr/include"; then
71 haveit=
72 for x in $CPPFLAGS; do
73 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
74 if test "X$x" = "X-I$additional_includedir"; then
75 haveit=yes
76 break
77 fi
78 done
79 if test -z "$haveit"; then
80 if test "X$additional_includedir" = "X/usr/local/include"; then
81 if test -n "$GCC"; then
82 case $host_os in
83 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
84 esac
85 fi
86 fi
87 if test -z "$haveit"; then
88 if test -d "$additional_includedir"; then
89 dnl Really add $additional_includedir to $CPPFLAGS.
90 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
91 fi
92 fi
93 fi
94 fi
95 dnl Potentially add $additional_libdir to $LDFLAGS.
96 dnl But don't add it
97 dnl 1. if it's the standard /usr/lib,
98 dnl 2. if it's already present in $LDFLAGS,
99 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
100 dnl 4. if it doesn't exist as a directory.
101 if test "X$additional_libdir" != "X/usr/lib"; then
102 haveit=
103 for x in $LDFLAGS; do
104 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
105 if test "X$x" = "X-L$additional_libdir"; then
106 haveit=yes
107 break
108 fi
109 done
110 if test -z "$haveit"; then
111 if test "X$additional_libdir" = "X/usr/local/lib"; then
112 if test -n "$GCC"; then
113 case $host_os in
114 linux*) haveit=yes;;
115 esac
116 fi
117 fi
118 if test -z "$haveit"; then
119 if test -d "$additional_libdir"; then
120 dnl Really add $additional_libdir to $LDFLAGS.
121 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
122 fi
123 fi
124 fi
125 fi
126 fi
127 ])
128
129 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
130 dnl acl_final_exec_prefix, containing the values to which $prefix and
131 dnl $exec_prefix will expand at the end of the configure script.
132 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
133 [
134 dnl Unfortunately, prefix and exec_prefix get only finally determined
135 dnl at the end of configure.
136 if test "X$prefix" = "XNONE"; then
137 acl_final_prefix="$ac_default_prefix"
138 else
139 acl_final_prefix="$prefix"
140 fi
141 if test "X$exec_prefix" = "XNONE"; then
142 acl_final_exec_prefix='${prefix}'
143 else
144 acl_final_exec_prefix="$exec_prefix"
145 fi
146 acl_save_prefix="$prefix"
147 prefix="$acl_final_prefix"
148 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
149 prefix="$acl_save_prefix"
150 ])
151
152 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
153 dnl variables prefix and exec_prefix bound to the values they will have
154 dnl at the end of the configure script.
155 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
156 [
157 acl_save_prefix="$prefix"
158 prefix="$acl_final_prefix"
159 acl_save_exec_prefix="$exec_prefix"
160 exec_prefix="$acl_final_exec_prefix"
161 $1
162 exec_prefix="$acl_save_exec_prefix"
163 prefix="$acl_save_prefix"
164 ])
165
166 # lib-link.m4 serial 6 (gettext-0.14.3)
167 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
168 dnl This file is free software; the Free Software Foundation
169 dnl gives unlimited permission to copy and/or distribute it,
170 dnl with or without modifications, as long as this notice is preserved.
171
172 dnl From Bruno Haible.
173
174 AC_PREREQ(2.50)
175
176 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
177 dnl the libraries corresponding to explicit and implicit dependencies.
178 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
179 dnl augments the CPPFLAGS variable.
180 AC_DEFUN([AC_LIB_LINKFLAGS],
181 [
182 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
183 AC_REQUIRE([AC_LIB_RPATH])
184 define([Name],[translit([$1],[./-], [___])])
185 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
186 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
187 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
188 AC_LIB_LINKFLAGS_BODY([$1], [$2])
189 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
190 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
191 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
192 ])
193 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
194 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
195 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
196 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
197 AC_SUBST([LIB]NAME)
198 AC_SUBST([LTLIB]NAME)
199 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
200 dnl results of this search when this library appears as a dependency.
201 HAVE_LIB[]NAME=yes
202 undefine([Name])
203 undefine([NAME])
204 ])
205
206 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
207 dnl searches for libname and the libraries corresponding to explicit and
208 dnl implicit dependencies, together with the specified include files and
209 dnl the ability to compile and link the specified testcode. If found, it
210 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
211 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
212 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
213 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
214 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
215 [
216 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
217 AC_REQUIRE([AC_LIB_RPATH])
218 define([Name],[translit([$1],[./-], [___])])
219 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
220 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
221
222 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
223 dnl accordingly.
224 AC_LIB_LINKFLAGS_BODY([$1], [$2])
225
226 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
227 dnl because if the user has installed lib[]Name and not disabled its use
228 dnl via --without-lib[]Name-prefix, he wants to use it.
229 ac_save_CPPFLAGS="$CPPFLAGS"
230 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
231
232 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
233 ac_save_LIBS="$LIBS"
234 LIBS="$LIBS $LIB[]NAME"
235 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
236 LIBS="$ac_save_LIBS"
237 ])
238 if test "$ac_cv_lib[]Name" = yes; then
239 HAVE_LIB[]NAME=yes
240 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
241 AC_MSG_CHECKING([how to link with lib[]$1])
242 AC_MSG_RESULT([$LIB[]NAME])
243 else
244 HAVE_LIB[]NAME=no
245 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
246 dnl $INC[]NAME either.
247 CPPFLAGS="$ac_save_CPPFLAGS"
248 LIB[]NAME=
249 LTLIB[]NAME=
250 fi
251 AC_SUBST([HAVE_LIB]NAME)
252 AC_SUBST([LIB]NAME)
253 AC_SUBST([LTLIB]NAME)
254 undefine([Name])
255 undefine([NAME])
256 ])
257
258 dnl Determine the platform dependent parameters needed to use rpath:
259 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
260 dnl hardcode_direct, hardcode_minus_L.
261 AC_DEFUN([AC_LIB_RPATH],
262 [
263 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
264 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
265 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
266 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
267 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
268 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
269 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
270 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
271 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
272 . ./conftest.sh
273 rm -f ./conftest.sh
274 acl_cv_rpath=done
275 ])
276 wl="$acl_cv_wl"
277 libext="$acl_cv_libext"
278 shlibext="$acl_cv_shlibext"
279 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
280 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
281 hardcode_direct="$acl_cv_hardcode_direct"
282 hardcode_minus_L="$acl_cv_hardcode_minus_L"
283 dnl Determine whether the user wants rpath handling at all.
284 AC_ARG_ENABLE(rpath,
285 [ --disable-rpath do not hardcode runtime library paths],
286 :, enable_rpath=yes)
287 ])
288
289 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
290 dnl the libraries corresponding to explicit and implicit dependencies.
291 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
292 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
293 [
294 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
295 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
296 dnl By default, look in $includedir and $libdir.
297 use_additional=yes
298 AC_LIB_WITH_FINAL_PREFIX([
299 eval additional_includedir=\"$includedir\"
300 eval additional_libdir=\"$libdir\"
301 ])
302 AC_LIB_ARG_WITH([lib$1-prefix],
303 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
304 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
305 [
306 if test "X$withval" = "Xno"; then
307 use_additional=no
308 else
309 if test "X$withval" = "X"; then
310 AC_LIB_WITH_FINAL_PREFIX([
311 eval additional_includedir=\"$includedir\"
312 eval additional_libdir=\"$libdir\"
313 ])
314 else
315 additional_includedir="$withval/include"
316 additional_libdir="$withval/lib"
317 fi
318 fi
319 ])
320 dnl Search the library and its dependencies in $additional_libdir and
321 dnl $LDFLAGS. Using breadth-first-seach.
322 LIB[]NAME=
323 LTLIB[]NAME=
324 INC[]NAME=
325 rpathdirs=
326 ltrpathdirs=
327 names_already_handled=
328 names_next_round='$1 $2'
329 while test -n "$names_next_round"; do
330 names_this_round="$names_next_round"
331 names_next_round=
332 for name in $names_this_round; do
333 already_handled=
334 for n in $names_already_handled; do
335 if test "$n" = "$name"; then
336 already_handled=yes
337 break
338 fi
339 done
340 if test -z "$already_handled"; then
341 names_already_handled="$names_already_handled $name"
342 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
343 dnl or AC_LIB_HAVE_LINKFLAGS call.
344 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
345 eval value=\"\$HAVE_LIB$uppername\"
346 if test -n "$value"; then
347 if test "$value" = yes; then
348 eval value=\"\$LIB$uppername\"
349 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
350 eval value=\"\$LTLIB$uppername\"
351 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
352 else
353 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
354 dnl that this library doesn't exist. So just drop it.
355 :
356 fi
357 else
358 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
359 dnl and the already constructed $LIBNAME/$LTLIBNAME.
360 found_dir=
361 found_la=
362 found_so=
363 found_a=
364 if test $use_additional = yes; then
365 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
366 found_dir="$additional_libdir"
367 found_so="$additional_libdir/lib$name.$shlibext"
368 if test -f "$additional_libdir/lib$name.la"; then
369 found_la="$additional_libdir/lib$name.la"
370 fi
371 else
372 if test -f "$additional_libdir/lib$name.$libext"; then
373 found_dir="$additional_libdir"
374 found_a="$additional_libdir/lib$name.$libext"
375 if test -f "$additional_libdir/lib$name.la"; then
376 found_la="$additional_libdir/lib$name.la"
377 fi
378 fi
379 fi
380 fi
381 if test "X$found_dir" = "X"; then
382 for x in $LDFLAGS $LTLIB[]NAME; do
383 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
384 case "$x" in
385 -L*)
386 dir=`echo "X$x" | sed -e 's/^X-L//'`
387 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
388 found_dir="$dir"
389 found_so="$dir/lib$name.$shlibext"
390 if test -f "$dir/lib$name.la"; then
391 found_la="$dir/lib$name.la"
392 fi
393 else
394 if test -f "$dir/lib$name.$libext"; then
395 found_dir="$dir"
396 found_a="$dir/lib$name.$libext"
397 if test -f "$dir/lib$name.la"; then
398 found_la="$dir/lib$name.la"
399 fi
400 fi
401 fi
402 ;;
403 esac
404 if test "X$found_dir" != "X"; then
405 break
406 fi
407 done
408 fi
409 if test "X$found_dir" != "X"; then
410 dnl Found the library.
411 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
412 if test "X$found_so" != "X"; then
413 dnl Linking with a shared library. We attempt to hardcode its
414 dnl directory into the executable's runpath, unless it's the
415 dnl standard /usr/lib.
416 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
417 dnl No hardcoding is needed.
418 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
419 else
420 dnl Use an explicit option to hardcode DIR into the resulting
421 dnl binary.
422 dnl Potentially add DIR to ltrpathdirs.
423 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
424 haveit=
425 for x in $ltrpathdirs; do
426 if test "X$x" = "X$found_dir"; then
427 haveit=yes
428 break
429 fi
430 done
431 if test -z "$haveit"; then
432 ltrpathdirs="$ltrpathdirs $found_dir"
433 fi
434 dnl The hardcoding into $LIBNAME is system dependent.
435 if test "$hardcode_direct" = yes; then
436 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
437 dnl resulting binary.
438 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
439 else
440 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
441 dnl Use an explicit option to hardcode DIR into the resulting
442 dnl binary.
443 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
444 dnl Potentially add DIR to rpathdirs.
445 dnl The rpathdirs will be appended to $LIBNAME at the end.
446 haveit=
447 for x in $rpathdirs; do
448 if test "X$x" = "X$found_dir"; then
449 haveit=yes
450 break
451 fi
452 done
453 if test -z "$haveit"; then
454 rpathdirs="$rpathdirs $found_dir"
455 fi
456 else
457 dnl Rely on "-L$found_dir".
458 dnl But don't add it if it's already contained in the LDFLAGS
459 dnl or the already constructed $LIBNAME
460 haveit=
461 for x in $LDFLAGS $LIB[]NAME; do
462 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
463 if test "X$x" = "X-L$found_dir"; then
464 haveit=yes
465 break
466 fi
467 done
468 if test -z "$haveit"; then
469 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
470 fi
471 if test "$hardcode_minus_L" != no; then
472 dnl FIXME: Not sure whether we should use
473 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
474 dnl here.
475 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
476 else
477 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
478 dnl here, because this doesn't fit in flags passed to the
479 dnl compiler. So give up. No hardcoding. This affects only
480 dnl very old systems.
481 dnl FIXME: Not sure whether we should use
482 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
483 dnl here.
484 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
485 fi
486 fi
487 fi
488 fi
489 else
490 if test "X$found_a" != "X"; then
491 dnl Linking with a static library.
492 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
493 else
494 dnl We shouldn't come here, but anyway it's good to have a
495 dnl fallback.
496 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
497 fi
498 fi
499 dnl Assume the include files are nearby.
500 additional_includedir=
501 case "$found_dir" in
502 */lib | */lib/)
503 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
504 additional_includedir="$basedir/include"
505 ;;
506 esac
507 if test "X$additional_includedir" != "X"; then
508 dnl Potentially add $additional_includedir to $INCNAME.
509 dnl But don't add it
510 dnl 1. if it's the standard /usr/include,
511 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
512 dnl 3. if it's already present in $CPPFLAGS or the already
513 dnl constructed $INCNAME,
514 dnl 4. if it doesn't exist as a directory.
515 if test "X$additional_includedir" != "X/usr/include"; then
516 haveit=
517 if test "X$additional_includedir" = "X/usr/local/include"; then
518 if test -n "$GCC"; then
519 case $host_os in
520 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
521 esac
522 fi
523 fi
524 if test -z "$haveit"; then
525 for x in $CPPFLAGS $INC[]NAME; do
526 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
527 if test "X$x" = "X-I$additional_includedir"; then
528 haveit=yes
529 break
530 fi
531 done
532 if test -z "$haveit"; then
533 if test -d "$additional_includedir"; then
534 dnl Really add $additional_includedir to $INCNAME.
535 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
536 fi
537 fi
538 fi
539 fi
540 fi
541 dnl Look for dependencies.
542 if test -n "$found_la"; then
543 dnl Read the .la file. It defines the variables
544 dnl dlname, library_names, old_library, dependency_libs, current,
545 dnl age, revision, installed, dlopen, dlpreopen, libdir.
546 save_libdir="$libdir"
547 case "$found_la" in
548 */* | *\\*) . "$found_la" ;;
549 *) . "./$found_la" ;;
550 esac
551 libdir="$save_libdir"
552 dnl We use only dependency_libs.
553 for dep in $dependency_libs; do
554 case "$dep" in
555 -L*)
556 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
557 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
558 dnl But don't add it
559 dnl 1. if it's the standard /usr/lib,
560 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
561 dnl 3. if it's already present in $LDFLAGS or the already
562 dnl constructed $LIBNAME,
563 dnl 4. if it doesn't exist as a directory.
564 if test "X$additional_libdir" != "X/usr/lib"; then
565 haveit=
566 if test "X$additional_libdir" = "X/usr/local/lib"; then
567 if test -n "$GCC"; then
568 case $host_os in
569 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
570 esac
571 fi
572 fi
573 if test -z "$haveit"; then
574 haveit=
575 for x in $LDFLAGS $LIB[]NAME; do
576 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
577 if test "X$x" = "X-L$additional_libdir"; then
578 haveit=yes
579 break
580 fi
581 done
582 if test -z "$haveit"; then
583 if test -d "$additional_libdir"; then
584 dnl Really add $additional_libdir to $LIBNAME.
585 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
586 fi
587 fi
588 haveit=
589 for x in $LDFLAGS $LTLIB[]NAME; do
590 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
591 if test "X$x" = "X-L$additional_libdir"; then
592 haveit=yes
593 break
594 fi
595 done
596 if test -z "$haveit"; then
597 if test -d "$additional_libdir"; then
598 dnl Really add $additional_libdir to $LTLIBNAME.
599 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
600 fi
601 fi
602 fi
603 fi
604 ;;
605 -R*)
606 dir=`echo "X$dep" | sed -e 's/^X-R//'`
607 if test "$enable_rpath" != no; then
608 dnl Potentially add DIR to rpathdirs.
609 dnl The rpathdirs will be appended to $LIBNAME at the end.
610 haveit=
611 for x in $rpathdirs; do
612 if test "X$x" = "X$dir"; then
613 haveit=yes
614 break
615 fi
616 done
617 if test -z "$haveit"; then
618 rpathdirs="$rpathdirs $dir"
619 fi
620 dnl Potentially add DIR to ltrpathdirs.
621 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
622 haveit=
623 for x in $ltrpathdirs; do
624 if test "X$x" = "X$dir"; then
625 haveit=yes
626 break
627 fi
628 done
629 if test -z "$haveit"; then
630 ltrpathdirs="$ltrpathdirs $dir"
631 fi
632 fi
633 ;;
634 -l*)
635 dnl Handle this in the next round.
636 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
637 ;;
638 *.la)
639 dnl Handle this in the next round. Throw away the .la's
640 dnl directory; it is already contained in a preceding -L
641 dnl option.
642 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
643 ;;
644 *)
645 dnl Most likely an immediate library name.
646 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
647 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
648 ;;
649 esac
650 done
651 fi
652 else
653 dnl Didn't find the library; assume it is in the system directories
654 dnl known to the linker and runtime loader. (All the system
655 dnl directories known to the linker should also be known to the
656 dnl runtime loader, otherwise the system is severely misconfigured.)
657 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
658 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
659 fi
660 fi
661 fi
662 done
663 done
664 if test "X$rpathdirs" != "X"; then
665 if test -n "$hardcode_libdir_separator"; then
666 dnl Weird platform: only the last -rpath option counts, the user must
667 dnl pass all path elements in one option. We can arrange that for a
668 dnl single library, but not when more than one $LIBNAMEs are used.
669 alldirs=
670 for found_dir in $rpathdirs; do
671 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
672 done
673 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
674 acl_save_libdir="$libdir"
675 libdir="$alldirs"
676 eval flag=\"$hardcode_libdir_flag_spec\"
677 libdir="$acl_save_libdir"
678 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
679 else
680 dnl The -rpath options are cumulative.
681 for found_dir in $rpathdirs; do
682 acl_save_libdir="$libdir"
683 libdir="$found_dir"
684 eval flag=\"$hardcode_libdir_flag_spec\"
685 libdir="$acl_save_libdir"
686 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
687 done
688 fi
689 fi
690 if test "X$ltrpathdirs" != "X"; then
691 dnl When using libtool, the option that works for both libraries and
692 dnl executables is -R. The -R options are cumulative.
693 for found_dir in $ltrpathdirs; do
694 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
695 done
696 fi
697 ])
698
699 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
700 dnl unless already present in VAR.
701 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
702 dnl contains two or three consecutive elements that belong together.
703 AC_DEFUN([AC_LIB_APPENDTOVAR],
704 [
705 for element in [$2]; do
706 haveit=
707 for x in $[$1]; do
708 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
709 if test "X$x" = "X$element"; then
710 haveit=yes
711 break
712 fi
713 done
714 if test -z "$haveit"; then
715 [$1]="${[$1]}${[$1]:+ }$element"
716 fi
717 done
718 ])
719
720 # lib-ld.m4 serial 3 (gettext-0.13)
721 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
722 dnl This file is free software; the Free Software Foundation
723 dnl gives unlimited permission to copy and/or distribute it,
724 dnl with or without modifications, as long as this notice is preserved.
725
726 dnl Subroutines of libtool.m4,
727 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
728 dnl with libtool.m4.
729
730 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
731 AC_DEFUN([AC_LIB_PROG_LD_GNU],
732 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
733 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
734 case `$LD -v 2>&1 </dev/null` in
735 *GNU* | *'with BFD'*)
736 acl_cv_prog_gnu_ld=yes ;;
737 *)
738 acl_cv_prog_gnu_ld=no ;;
739 esac])
740 with_gnu_ld=$acl_cv_prog_gnu_ld
741 ])
742
743 dnl From libtool-1.4. Sets the variable LD.
744 AC_DEFUN([AC_LIB_PROG_LD],
745 [AC_ARG_WITH(gnu-ld,
746 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
747 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
748 AC_REQUIRE([AC_PROG_CC])dnl
749 AC_REQUIRE([AC_CANONICAL_HOST])dnl
750 # Prepare PATH_SEPARATOR.
751 # The user is always right.
752 if test "${PATH_SEPARATOR+set}" != set; then
753 echo "#! /bin/sh" >conf$$.sh
754 echo "exit 0" >>conf$$.sh
755 chmod +x conf$$.sh
756 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
757 PATH_SEPARATOR=';'
758 else
759 PATH_SEPARATOR=:
760 fi
761 rm -f conf$$.sh
762 fi
763 ac_prog=ld
764 if test "$GCC" = yes; then
765 # Check if gcc -print-prog-name=ld gives a path.
766 AC_MSG_CHECKING([for ld used by GCC])
767 case $host in
768 *-*-mingw*)
769 # gcc leaves a trailing carriage return which upsets mingw
770 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
771 *)
772 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
773 esac
774 case $ac_prog in
775 # Accept absolute paths.
776 [[\\/]* | [A-Za-z]:[\\/]*)]
777 [re_direlt='/[^/][^/]*/\.\./']
778 # Canonicalize the path of ld
779 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
780 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
781 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
782 done
783 test -z "$LD" && LD="$ac_prog"
784 ;;
785 "")
786 # If it fails, then pretend we aren't using GCC.
787 ac_prog=ld
788 ;;
789 *)
790 # If it is relative, then search for the first ld in PATH.
791 with_gnu_ld=unknown
792 ;;
793 esac
794 elif test "$with_gnu_ld" = yes; then
795 AC_MSG_CHECKING([for GNU ld])
796 else
797 AC_MSG_CHECKING([for non-GNU ld])
798 fi
799 AC_CACHE_VAL(acl_cv_path_LD,
800 [if test -z "$LD"; then
801 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
802 for ac_dir in $PATH; do
803 test -z "$ac_dir" && ac_dir=.
804 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
805 acl_cv_path_LD="$ac_dir/$ac_prog"
806 # Check to see if the program is GNU ld. I'd rather use --version,
807 # but apparently some GNU ld's only accept -v.
808 # Break only if it was the GNU/non-GNU ld that we prefer.
809 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
810 *GNU* | *'with BFD'*)
811 test "$with_gnu_ld" != no && break ;;
812 *)
813 test "$with_gnu_ld" != yes && break ;;
814 esac
815 fi
816 done
817 IFS="$ac_save_ifs"
818 else
819 acl_cv_path_LD="$LD" # Let the user override the test with a path.
820 fi])
821 LD="$acl_cv_path_LD"
822 if test -n "$LD"; then
823 AC_MSG_RESULT($LD)
824 else
825 AC_MSG_RESULT(no)
826 fi
827 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
828 AC_LIB_PROG_LD_GNU
829 ])
830
831 # Do all the work for Automake. This macro actually does too much --
832 # some checks are only needed if your package does certain things.
833 # But this isn't really a big deal.
834
835 # serial 1
836
837 dnl Usage:
838 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
839
840 AC_DEFUN([AM_INIT_AUTOMAKE],
841 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
842 AC_REQUIRE([AC_PROG_INSTALL])
843 PACKAGE=[$1]
844 AC_SUBST(PACKAGE)
845 VERSION=[$2]
846 AC_SUBST(VERSION)
847 dnl test to see if srcdir already configured
848 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
849 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
850 fi
851 ifelse([$3],,
852 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
853 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
854 AC_REQUIRE([AM_SANITY_CHECK])
855 AC_REQUIRE([AC_ARG_PROGRAM])
856 dnl FIXME This is truly gross.
857 missing_dir=`cd $ac_aux_dir && pwd`
858 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
859 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
860 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
861 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
862 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
863 AC_REQUIRE([AC_PROG_MAKE_SET])])
864
865 # Copyright 2002 Free Software Foundation, Inc.
866
867 # This program is free software; you can redistribute it and/or modify
868 # it under the terms of the GNU General Public License as published by
869 # the Free Software Foundation; either version 2, or (at your option)
870 # any later version.
871
872 # This program is distributed in the hope that it will be useful,
873 # but WITHOUT ANY WARRANTY; without even the implied warranty of
874 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
875 # GNU General Public License for more details.
876
877 # You should have received a copy of the GNU General Public License
878 # along with this program; if not, write to the Free Software
879 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
880
881 # AM_AUTOMAKE_VERSION(VERSION)
882 # ----------------------------
883 # Automake X.Y traces this macro to ensure aclocal.m4 has been
884 # generated from the m4 files accompanying Automake X.Y.
885 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
886
887 # AM_SET_CURRENT_AUTOMAKE_VERSION
888 # -------------------------------
889 # Call AM_AUTOMAKE_VERSION so it can be traced.
890 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
891 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
892 [AM_AUTOMAKE_VERSION([1.4-p6])])
893
894 #
895 # Check to make sure that the build environment is sane.
896 #
897
898 AC_DEFUN([AM_SANITY_CHECK],
899 [AC_MSG_CHECKING([whether build environment is sane])
900 # Just in case
901 sleep 1
902 echo timestamp > conftestfile
903 # Do `set' in a subshell so we don't clobber the current shell's
904 # arguments. Must try -L first in case configure is actually a
905 # symlink; some systems play weird games with the mod time of symlinks
906 # (eg FreeBSD returns the mod time of the symlink's containing
907 # directory).
908 if (
909 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
910 if test "[$]*" = "X"; then
911 # -L didn't work.
912 set X `ls -t $srcdir/configure conftestfile`
913 fi
914 if test "[$]*" != "X $srcdir/configure conftestfile" \
915 && test "[$]*" != "X conftestfile $srcdir/configure"; then
916
917 # If neither matched, then we have a broken ls. This can happen
918 # if, for instance, CONFIG_SHELL is bash and it inherits a
919 # broken ls alias from the environment. This has actually
920 # happened. Such a system could not be considered "sane".
921 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
922 alias in your environment])
923 fi
924
925 test "[$]2" = conftestfile
926 )
927 then
928 # Ok.
929 :
930 else
931 AC_MSG_ERROR([newly created file is older than distributed files!
932 Check your system clock])
933 fi
934 rm -f conftest*
935 AC_MSG_RESULT(yes)])
936
937 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
938 dnl The program must properly implement --version.
939 AC_DEFUN([AM_MISSING_PROG],
940 [AC_MSG_CHECKING(for working $2)
941 # Run test in a subshell; some versions of sh will print an error if
942 # an executable is not found, even if stderr is redirected.
943 # Redirect stdin to placate older versions of autoconf. Sigh.
944 if ($2 --version) < /dev/null > /dev/null 2>&1; then
945 $1=$2
946 AC_MSG_RESULT(found)
947 else
948 $1="$3/missing $2"
949 AC_MSG_RESULT(missing)
950 fi
951 AC_SUBST($1)])
952
953 # Add --enable-maintainer-mode option to configure.
954 # From Jim Meyering
955
956 # serial 1
957
958 AC_DEFUN([AM_MAINTAINER_MODE],
959 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
960 dnl maintainer-mode is disabled by default
961 AC_ARG_ENABLE(maintainer-mode,
962 [ --enable-maintainer-mode enable make rules and dependencies not useful
963 (and sometimes confusing) to the casual installer],
964 USE_MAINTAINER_MODE=$enableval,
965 USE_MAINTAINER_MODE=no)
966 AC_MSG_RESULT($USE_MAINTAINER_MODE)
967 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
968 MAINT=$MAINTAINER_MODE_TRUE
969 AC_SUBST(MAINT)dnl
970 ]
971 )
972
973 # Define a conditional.
974
975 AC_DEFUN([AM_CONDITIONAL],
976 [AC_SUBST($1_TRUE)
977 AC_SUBST($1_FALSE)
978 if $2; then
979 $1_TRUE=
980 $1_FALSE='#'
981 else
982 $1_TRUE='#'
983 $1_FALSE=
984 fi])
985
986 # isc-posix.m4 serial 2 (gettext-0.11.2)
987 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
988 dnl This file is free software; the Free Software Foundation
989 dnl gives unlimited permission to copy and/or distribute it,
990 dnl with or without modifications, as long as this notice is preserved.
991
992 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
993
994 # This test replaces the one in autoconf.
995 # Currently this macro should have the same name as the autoconf macro
996 # because gettext's gettext.m4 (distributed in the automake package)
997 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
998 # give these diagnostics:
999 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
1000 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
1001
1002 undefine([AC_ISC_POSIX])
1003
1004 AC_DEFUN([AC_ISC_POSIX],
1005 [
1006 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
1007 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
1008 ]
1009 )
1010
1011 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1012
1013 # serial 48 Debian 1.5.22-2 AC_PROG_LIBTOOL
1014
1015
1016 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1017 # -----------------------------------------------------------
1018 # If this macro is not defined by Autoconf, define it here.
1019 m4_ifdef([AC_PROVIDE_IFELSE],
1020 [],
1021 [m4_define([AC_PROVIDE_IFELSE],
1022 [m4_ifdef([AC_PROVIDE_$1],
1023 [$2], [$3])])])
1024
1025
1026 # AC_PROG_LIBTOOL
1027 # ---------------
1028 AC_DEFUN([AC_PROG_LIBTOOL],
1029 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1030 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1031 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1032 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1033 [AC_LIBTOOL_CXX],
1034 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1035 ])])
1036 dnl And a similar setup for Fortran 77 support
1037 AC_PROVIDE_IFELSE([AC_PROG_F77],
1038 [AC_LIBTOOL_F77],
1039 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1040 ])])
1041
1042 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1043 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1044 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1045 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1046 [AC_LIBTOOL_GCJ],
1047 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1048 [AC_LIBTOOL_GCJ],
1049 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1050 [AC_LIBTOOL_GCJ],
1051 [ifdef([AC_PROG_GCJ],
1052 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1053 ifdef([A][M_PROG_GCJ],
1054 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1055 ifdef([LT_AC_PROG_GCJ],
1056 [define([LT_AC_PROG_GCJ],
1057 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1058 ])])# AC_PROG_LIBTOOL
1059
1060
1061 # _AC_PROG_LIBTOOL
1062 # ----------------
1063 AC_DEFUN([_AC_PROG_LIBTOOL],
1064 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1065 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1066 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1067 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1068
1069 # This can be used to rebuild libtool when needed
1070 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1071
1072 # Always use our own libtool.
1073 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1074 AC_SUBST(LIBTOOL)dnl
1075
1076 # Prevent multiple expansion
1077 define([AC_PROG_LIBTOOL], [])
1078 ])# _AC_PROG_LIBTOOL
1079
1080
1081 # AC_LIBTOOL_SETUP
1082 # ----------------
1083 AC_DEFUN([AC_LIBTOOL_SETUP],
1084 [AC_PREREQ(2.50)dnl
1085 AC_REQUIRE([AC_ENABLE_SHARED])dnl
1086 AC_REQUIRE([AC_ENABLE_STATIC])dnl
1087 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1088 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1089 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1090 AC_REQUIRE([AC_PROG_CC])dnl
1091 AC_REQUIRE([AC_PROG_LD])dnl
1092 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1093 AC_REQUIRE([AC_PROG_NM])dnl
1094
1095 AC_REQUIRE([AC_PROG_LN_S])dnl
1096 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1097 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1098 AC_REQUIRE([AC_OBJEXT])dnl
1099 AC_REQUIRE([AC_EXEEXT])dnl
1100 dnl
1101
1102 AC_LIBTOOL_SYS_MAX_CMD_LEN
1103 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1104 AC_LIBTOOL_OBJDIR
1105
1106 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1107 _LT_AC_PROG_ECHO_BACKSLASH
1108
1109 case $host_os in
1110 aix3*)
1111 # AIX sometimes has problems with the GCC collect2 program. For some
1112 # reason, if we set the COLLECT_NAMES environment variable, the problems
1113 # vanish in a puff of smoke.
1114 if test "X${COLLECT_NAMES+set}" != Xset; then
1115 COLLECT_NAMES=
1116 export COLLECT_NAMES
1117 fi
1118 ;;
1119 esac
1120
1121 # Sed substitution that helps us do robust quoting. It backslashifies
1122 # metacharacters that are still active within double-quoted strings.
1123 Xsed='sed -e 1s/^X//'
1124 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1125
1126 # Same as above, but do not quote variable references.
1127 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1128
1129 # Sed substitution to delay expansion of an escaped shell variable in a
1130 # double_quote_subst'ed string.
1131 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1132
1133 # Sed substitution to avoid accidental globbing in evaled expressions
1134 no_glob_subst='s/\*/\\\*/g'
1135
1136 # Constants:
1137 rm="rm -f"
1138
1139 # Global variables:
1140 default_ofile=libtool
1141 can_build_shared=yes
1142
1143 # All known linkers require a `.a' archive for static linking (except MSVC,
1144 # which needs '.lib').
1145 libext=a
1146 ltmain="$ac_aux_dir/ltmain.sh"
1147 ofile="$default_ofile"
1148 with_gnu_ld="$lt_cv_prog_gnu_ld"
1149
1150 AC_CHECK_TOOL(AR, ar, false)
1151 AC_CHECK_TOOL(RANLIB, ranlib, :)
1152 AC_CHECK_TOOL(STRIP, strip, :)
1153
1154 old_CC="$CC"
1155 old_CFLAGS="$CFLAGS"
1156
1157 # Set sane defaults for various variables
1158 test -z "$AR" && AR=ar
1159 test -z "$AR_FLAGS" && AR_FLAGS=cru
1160 test -z "$AS" && AS=as
1161 test -z "$CC" && CC=cc
1162 test -z "$LTCC" && LTCC=$CC
1163 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1164 test -z "$DLLTOOL" && DLLTOOL=dlltool
1165 test -z "$LD" && LD=ld
1166 test -z "$LN_S" && LN_S="ln -s"
1167 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1168 test -z "$NM" && NM=nm
1169 test -z "$SED" && SED=sed
1170 test -z "$OBJDUMP" && OBJDUMP=objdump
1171 test -z "$RANLIB" && RANLIB=:
1172 test -z "$STRIP" && STRIP=:
1173 test -z "$ac_objext" && ac_objext=o
1174
1175 # Determine commands to create old-style static archives.
1176 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1177 old_postinstall_cmds='chmod 644 $oldlib'
1178 old_postuninstall_cmds=
1179
1180 if test -n "$RANLIB"; then
1181 case $host_os in
1182 openbsd*)
1183 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1184 ;;
1185 *)
1186 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1187 ;;
1188 esac
1189 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1190 fi
1191
1192 _LT_CC_BASENAME([$compiler])
1193
1194 # Only perform the check for file, if the check method requires it
1195 case $deplibs_check_method in
1196 file_magic*)
1197 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1198 AC_PATH_MAGIC
1199 fi
1200 ;;
1201 esac
1202
1203 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1204 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1205 enable_win32_dll=yes, enable_win32_dll=no)
1206
1207 AC_ARG_ENABLE([libtool-lock],
1208 [AC_HELP_STRING([--disable-libtool-lock],
1209 [avoid locking (might break parallel builds)])])
1210 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1211
1212 AC_ARG_WITH([pic],
1213 [AC_HELP_STRING([--with-pic],
1214 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1215 [pic_mode="$withval"],
1216 [pic_mode=default])
1217 test -z "$pic_mode" && pic_mode=default
1218
1219 # Use C for the default configuration in the libtool script
1220 tagname=
1221 AC_LIBTOOL_LANG_C_CONFIG
1222 _LT_AC_TAGCONFIG
1223 ])# AC_LIBTOOL_SETUP
1224
1225
1226 # _LT_AC_SYS_COMPILER
1227 # -------------------
1228 AC_DEFUN([_LT_AC_SYS_COMPILER],
1229 [AC_REQUIRE([AC_PROG_CC])dnl
1230
1231 # If no C compiler was specified, use CC.
1232 LTCC=${LTCC-"$CC"}
1233
1234 # If no C compiler flags were specified, use CFLAGS.
1235 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1236
1237 # Allow CC to be a program name with arguments.
1238 compiler=$CC
1239 ])# _LT_AC_SYS_COMPILER
1240
1241
1242 # _LT_CC_BASENAME(CC)
1243 # -------------------
1244 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1245 AC_DEFUN([_LT_CC_BASENAME],
1246 [for cc_temp in $1""; do
1247 case $cc_temp in
1248 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1249 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1250 \-*) ;;
1251 *) break;;
1252 esac
1253 done
1254 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1255 ])
1256
1257
1258 # _LT_COMPILER_BOILERPLATE
1259 # ------------------------
1260 # Check for compiler boilerplate output or warnings with
1261 # the simple compiler test code.
1262 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1263 [ac_outfile=conftest.$ac_objext
1264 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
1265 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1266 _lt_compiler_boilerplate=`cat conftest.err`
1267 $rm conftest*
1268 ])# _LT_COMPILER_BOILERPLATE
1269
1270
1271 # _LT_LINKER_BOILERPLATE
1272 # ----------------------
1273 # Check for linker boilerplate output or warnings with
1274 # the simple link test code.
1275 AC_DEFUN([_LT_LINKER_BOILERPLATE],
1276 [ac_outfile=conftest.$ac_objext
1277 printf "$lt_simple_link_test_code" >conftest.$ac_ext
1278 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1279 _lt_linker_boilerplate=`cat conftest.err`
1280 $rm conftest*
1281 ])# _LT_LINKER_BOILERPLATE
1282
1283
1284 # _LT_AC_SYS_LIBPATH_AIX
1285 # ----------------------
1286 # Links a minimal program and checks the executable
1287 # for the system default hardcoded library path. In most cases,
1288 # this is /usr/lib:/lib, but when the MPI compilers are used
1289 # the location of the communication and MPI libs are included too.
1290 # If we don't find anything, use the default library path according
1291 # to the aix ld manual.
1292 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1293 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1294 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1295 }'`
1296 # Check for a 64-bit object if we didn't find anything.
1297 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1298 }'`; fi],[])
1299 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1300 ])# _LT_AC_SYS_LIBPATH_AIX
1301
1302
1303 # _LT_AC_SHELL_INIT(ARG)
1304 # ----------------------
1305 AC_DEFUN([_LT_AC_SHELL_INIT],
1306 [ifdef([AC_DIVERSION_NOTICE],
1307 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1308 [AC_DIVERT_PUSH(NOTICE)])
1309 $1
1310 AC_DIVERT_POP
1311 ])# _LT_AC_SHELL_INIT
1312
1313
1314 # _LT_AC_PROG_ECHO_BACKSLASH
1315 # --------------------------
1316 # Add some code to the start of the generated configure script which
1317 # will find an echo command which doesn't interpret backslashes.
1318 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1319 [_LT_AC_SHELL_INIT([
1320 # Check that we are running under the correct shell.
1321 SHELL=${CONFIG_SHELL-/bin/sh}
1322
1323 case X$ECHO in
1324 X*--fallback-echo)
1325 # Remove one level of quotation (which was required for Make).
1326 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1327 ;;
1328 esac
1329
1330 echo=${ECHO-echo}
1331 if test "X[$]1" = X--no-reexec; then
1332 # Discard the --no-reexec flag, and continue.
1333 shift
1334 elif test "X[$]1" = X--fallback-echo; then
1335 # Avoid inline document here, it may be left over
1336 :
1337 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1338 # Yippee, $echo works!
1339 :
1340 else
1341 # Restart under the correct shell.
1342 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1343 fi
1344
1345 if test "X[$]1" = X--fallback-echo; then
1346 # used as fallback echo
1347 shift
1348 cat <<EOF
1349 [$]*
1350 EOF
1351 exit 0
1352 fi
1353
1354 # The HP-UX ksh and POSIX shell print the target directory to stdout
1355 # if CDPATH is set.
1356 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1357
1358 if test -z "$ECHO"; then
1359 if test "X${echo_test_string+set}" != Xset; then
1360 # find a string as large as possible, as long as the shell can cope with it
1361 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1362 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1363 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1364 echo_test_string=`eval $cmd` &&
1365 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1366 then
1367 break
1368 fi
1369 done
1370 fi
1371
1372 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1373 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1374 test "X$echo_testing_string" = "X$echo_test_string"; then
1375 :
1376 else
1377 # The Solaris, AIX, and Digital Unix default echo programs unquote
1378 # backslashes. This makes it impossible to quote backslashes using
1379 # echo "$something" | sed 's/\\/\\\\/g'
1380 #
1381 # So, first we look for a working echo in the user's PATH.
1382
1383 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1384 for dir in $PATH /usr/ucb; do
1385 IFS="$lt_save_ifs"
1386 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1387 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1388 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1389 test "X$echo_testing_string" = "X$echo_test_string"; then
1390 echo="$dir/echo"
1391 break
1392 fi
1393 done
1394 IFS="$lt_save_ifs"
1395
1396 if test "X$echo" = Xecho; then
1397 # We didn't find a better echo, so look for alternatives.
1398 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1399 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1400 test "X$echo_testing_string" = "X$echo_test_string"; then
1401 # This shell has a builtin print -r that does the trick.
1402 echo='print -r'
1403 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1404 test "X$CONFIG_SHELL" != X/bin/ksh; then
1405 # If we have ksh, try running configure again with it.
1406 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1407 export ORIGINAL_CONFIG_SHELL
1408 CONFIG_SHELL=/bin/ksh
1409 export CONFIG_SHELL
1410 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1411 else
1412 # Try using printf.
1413 echo='printf %s\n'
1414 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1415 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1416 test "X$echo_testing_string" = "X$echo_test_string"; then
1417 # Cool, printf works
1418 :
1419 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1420 test "X$echo_testing_string" = 'X\t' &&
1421 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1422 test "X$echo_testing_string" = "X$echo_test_string"; then
1423 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1424 export CONFIG_SHELL
1425 SHELL="$CONFIG_SHELL"
1426 export SHELL
1427 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1428 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1429 test "X$echo_testing_string" = 'X\t' &&
1430 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1431 test "X$echo_testing_string" = "X$echo_test_string"; then
1432 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1433 else
1434 # maybe with a smaller string...
1435 prev=:
1436
1437 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1438 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1439 then
1440 break
1441 fi
1442 prev="$cmd"
1443 done
1444
1445 if test "$prev" != 'sed 50q "[$]0"'; then
1446 echo_test_string=`eval $prev`
1447 export echo_test_string
1448 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1449 else
1450 # Oops. We lost completely, so just stick with echo.
1451 echo=echo
1452 fi
1453 fi
1454 fi
1455 fi
1456 fi
1457 fi
1458
1459 # Copy echo and quote the copy suitably for passing to libtool from
1460 # the Makefile, instead of quoting the original, which is used later.
1461 ECHO=$echo
1462 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1463 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1464 fi
1465
1466 AC_SUBST(ECHO)
1467 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1468
1469
1470 # _LT_AC_LOCK
1471 # -----------
1472 AC_DEFUN([_LT_AC_LOCK],
1473 [AC_ARG_ENABLE([libtool-lock],
1474 [AC_HELP_STRING([--disable-libtool-lock],
1475 [avoid locking (might break parallel builds)])])
1476 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1477
1478 # Some flags need to be propagated to the compiler or linker for good
1479 # libtool support.
1480 case $host in
1481 ia64-*-hpux*)
1482 # Find out which ABI we are using.
1483 echo 'int i;' > conftest.$ac_ext
1484 if AC_TRY_EVAL(ac_compile); then
1485 case `/usr/bin/file conftest.$ac_objext` in
1486 *ELF-32*)
1487 HPUX_IA64_MODE="32"
1488 ;;
1489 *ELF-64*)
1490 HPUX_IA64_MODE="64"
1491 ;;
1492 esac
1493 fi
1494 rm -rf conftest*
1495 ;;
1496 *-*-irix6*)
1497 # Find out which ABI we are using.
1498 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1499 if AC_TRY_EVAL(ac_compile); then
1500 if test "$lt_cv_prog_gnu_ld" = yes; then
1501 case `/usr/bin/file conftest.$ac_objext` in
1502 *32-bit*)
1503 LD="${LD-ld} -melf32bsmip"
1504 ;;
1505 *N32*)
1506 LD="${LD-ld} -melf32bmipn32"
1507 ;;
1508 *64-bit*)
1509 LD="${LD-ld} -melf64bmip"
1510 ;;
1511 esac
1512 else
1513 case `/usr/bin/file conftest.$ac_objext` in
1514 *32-bit*)
1515 LD="${LD-ld} -32"
1516 ;;
1517 *N32*)
1518 LD="${LD-ld} -n32"
1519 ;;
1520 *64-bit*)
1521 LD="${LD-ld} -64"
1522 ;;
1523 esac
1524 fi
1525 fi
1526 rm -rf conftest*
1527 ;;
1528
1529 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1530 # Find out which ABI we are using.
1531 echo 'int i;' > conftest.$ac_ext
1532 if AC_TRY_EVAL(ac_compile); then
1533 case `/usr/bin/file conftest.o` in
1534 *32-bit*)
1535 case $host in
1536 x86_64-*linux*)
1537 LD="${LD-ld} -m elf_i386"
1538 ;;
1539 ppc64-*linux*|powerpc64-*linux*)
1540 LD="${LD-ld} -m elf32ppclinux"
1541 ;;
1542 s390x-*linux*)
1543 LD="${LD-ld} -m elf_s390"
1544 ;;
1545 sparc64-*linux*)
1546 LD="${LD-ld} -m elf32_sparc"
1547 ;;
1548 esac
1549 ;;
1550 *64-bit*)
1551 case $host in
1552 x86_64-*linux*)
1553 LD="${LD-ld} -m elf_x86_64"
1554 ;;
1555 ppc*-*linux*|powerpc*-*linux*)
1556 LD="${LD-ld} -m elf64ppc"
1557 ;;
1558 s390*-*linux*)
1559 LD="${LD-ld} -m elf64_s390"
1560 ;;
1561 sparc*-*linux*)
1562 LD="${LD-ld} -m elf64_sparc"
1563 ;;
1564 esac
1565 ;;
1566 esac
1567 fi
1568 rm -rf conftest*
1569 ;;
1570
1571 *-*-sco3.2v5*)
1572 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1573 SAVE_CFLAGS="$CFLAGS"
1574 CFLAGS="$CFLAGS -belf"
1575 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1576 [AC_LANG_PUSH(C)
1577 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1578 AC_LANG_POP])
1579 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1580 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1581 CFLAGS="$SAVE_CFLAGS"
1582 fi
1583 ;;
1584 sparc*-*solaris*)
1585 # Find out which ABI we are using.
1586 echo 'int i;' > conftest.$ac_ext
1587 if AC_TRY_EVAL(ac_compile); then
1588 case `/usr/bin/file conftest.o` in
1589 *64-bit*)
1590 case $lt_cv_prog_gnu_ld in
1591 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1592 *) LD="${LD-ld} -64" ;;
1593 esac
1594 ;;
1595 esac
1596 fi
1597 rm -rf conftest*
1598 ;;
1599
1600 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1601 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1602 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1603 AC_CHECK_TOOL(AS, as, false)
1604 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1605 ;;
1606 ])
1607 esac
1608
1609 need_locks="$enable_libtool_lock"
1610
1611 ])# _LT_AC_LOCK
1612
1613
1614 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1615 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1616 # ----------------------------------------------------------------
1617 # Check whether the given compiler option works
1618 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1619 [AC_REQUIRE([LT_AC_PROG_SED])
1620 AC_CACHE_CHECK([$1], [$2],
1621 [$2=no
1622 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1623 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1624 lt_compiler_flag="$3"
1625 # Insert the option either (1) after the last *FLAGS variable, or
1626 # (2) before a word containing "conftest.", or (3) at the end.
1627 # Note that $ac_compile itself does not contain backslashes and begins
1628 # with a dollar sign (not a hyphen), so the echo should work correctly.
1629 # The option is referenced via a variable to avoid confusing sed.
1630 lt_compile=`echo "$ac_compile" | $SED \
1631 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1632 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1633 -e 's:$: $lt_compiler_flag:'`
1634 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1635 (eval "$lt_compile" 2>conftest.err)
1636 ac_status=$?
1637 cat conftest.err >&AS_MESSAGE_LOG_FD
1638 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1639 if (exit $ac_status) && test -s "$ac_outfile"; then
1640 # The compiler can only warn and ignore the option if not recognized
1641 # So say no if there are warnings other than the usual output.
1642 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1643 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1644 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1645 $2=yes
1646 fi
1647 fi
1648 $rm conftest*
1649 ])
1650
1651 if test x"[$]$2" = xyes; then
1652 ifelse([$5], , :, [$5])
1653 else
1654 ifelse([$6], , :, [$6])
1655 fi
1656 ])# AC_LIBTOOL_COMPILER_OPTION
1657
1658
1659 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1660 # [ACTION-SUCCESS], [ACTION-FAILURE])
1661 # ------------------------------------------------------------
1662 # Check whether the given compiler option works
1663 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1664 [AC_CACHE_CHECK([$1], [$2],
1665 [$2=no
1666 save_LDFLAGS="$LDFLAGS"
1667 LDFLAGS="$LDFLAGS $3"
1668 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1669 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1670 # The linker can only warn and ignore the option if not recognized
1671 # So say no if there are warnings
1672 if test -s conftest.err; then
1673 # Append any errors to the config.log.
1674 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1675 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1676 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1677 if diff conftest.exp conftest.er2 >/dev/null; then
1678 $2=yes
1679 fi
1680 else
1681 $2=yes
1682 fi
1683 fi
1684 $rm conftest*
1685 LDFLAGS="$save_LDFLAGS"
1686 ])
1687
1688 if test x"[$]$2" = xyes; then
1689 ifelse([$4], , :, [$4])
1690 else
1691 ifelse([$5], , :, [$5])
1692 fi
1693 ])# AC_LIBTOOL_LINKER_OPTION
1694
1695
1696 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1697 # --------------------------
1698 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1699 [# find the maximum length of command line arguments
1700 AC_MSG_CHECKING([the maximum length of command line arguments])
1701 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1702 i=0
1703 teststring="ABCD"
1704
1705 case $build_os in
1706 msdosdjgpp*)
1707 # On DJGPP, this test can blow up pretty badly due to problems in libc
1708 # (any single argument exceeding 2000 bytes causes a buffer overrun
1709 # during glob expansion). Even if it were fixed, the result of this
1710 # check would be larger than it should be.
1711 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1712 ;;
1713
1714 gnu*)
1715 # Under GNU Hurd, this test is not required because there is
1716 # no limit to the length of command line arguments.
1717 # Libtool will interpret -1 as no limit whatsoever
1718 lt_cv_sys_max_cmd_len=-1;
1719 ;;
1720
1721 cygwin* | mingw*)
1722 # On Win9x/ME, this test blows up -- it succeeds, but takes
1723 # about 5 minutes as the teststring grows exponentially.
1724 # Worse, since 9x/ME are not pre-emptively multitasking,
1725 # you end up with a "frozen" computer, even though with patience
1726 # the test eventually succeeds (with a max line length of 256k).
1727 # Instead, let's just punt: use the minimum linelength reported by
1728 # all of the supported platforms: 8192 (on NT/2K/XP).
1729 lt_cv_sys_max_cmd_len=8192;
1730 ;;
1731
1732 amigaos*)
1733 # On AmigaOS with pdksh, this test takes hours, literally.
1734 # So we just punt and use a minimum line length of 8192.
1735 lt_cv_sys_max_cmd_len=8192;
1736 ;;
1737
1738 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1739 # This has been around since 386BSD, at least. Likely further.
1740 if test -x /sbin/sysctl; then
1741 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1742 elif test -x /usr/sbin/sysctl; then
1743 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1744 else
1745 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1746 fi
1747 # And add a safety zone
1748 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1749 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1750 ;;
1751
1752 interix*)
1753 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1754 lt_cv_sys_max_cmd_len=196608
1755 ;;
1756
1757 osf*)
1758 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1759 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1760 # nice to cause kernel panics so lets avoid the loop below.
1761 # First set a reasonable default.
1762 lt_cv_sys_max_cmd_len=16384
1763 #
1764 if test -x /sbin/sysconfig; then
1765 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1766 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1767 esac
1768 fi
1769 ;;
1770 sco3.2v5*)
1771 lt_cv_sys_max_cmd_len=102400
1772 ;;
1773 sysv5* | sco5v6* | sysv4.2uw2*)
1774 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1775 if test -n "$kargmax"; then
1776 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1777 else
1778 lt_cv_sys_max_cmd_len=32768
1779 fi
1780 ;;
1781 *)
1782 # If test is not a shell built-in, we'll probably end up computing a
1783 # maximum length that is only half of the actual maximum length, but
1784 # we can't tell.
1785 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1786 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1787 = "XX$teststring") >/dev/null 2>&1 &&
1788 new_result=`expr "X$teststring" : ".*" 2>&1` &&
1789 lt_cv_sys_max_cmd_len=$new_result &&
1790 test $i != 17 # 1/2 MB should be enough
1791 do
1792 i=`expr $i + 1`
1793 teststring=$teststring$teststring
1794 done
1795 teststring=
1796 # Add a significant safety factor because C++ compilers can tack on massive
1797 # amounts of additional arguments before passing them to the linker.
1798 # It appears as though 1/2 is a usable value.
1799 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1800 ;;
1801 esac
1802 ])
1803 if test -n $lt_cv_sys_max_cmd_len ; then
1804 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1805 else
1806 AC_MSG_RESULT(none)
1807 fi
1808 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1809
1810
1811 # _LT_AC_CHECK_DLFCN
1812 # ------------------
1813 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1814 [AC_CHECK_HEADERS(dlfcn.h)dnl
1815 ])# _LT_AC_CHECK_DLFCN
1816
1817
1818 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1819 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1820 # ---------------------------------------------------------------------
1821 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1822 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1823 if test "$cross_compiling" = yes; then :
1824 [$4]
1825 else
1826 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1827 lt_status=$lt_dlunknown
1828 cat > conftest.$ac_ext <<EOF
1829 [#line __oline__ "configure"
1830 #include "confdefs.h"
1831
1832 #if HAVE_DLFCN_H
1833 #include <dlfcn.h>
1834 #endif
1835
1836 #include <stdio.h>
1837
1838 #ifdef RTLD_GLOBAL
1839 # define LT_DLGLOBAL RTLD_GLOBAL
1840 #else
1841 # ifdef DL_GLOBAL
1842 # define LT_DLGLOBAL DL_GLOBAL
1843 # else
1844 # define LT_DLGLOBAL 0
1845 # endif
1846 #endif
1847
1848 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1849 find out it does not work in some platform. */
1850 #ifndef LT_DLLAZY_OR_NOW
1851 # ifdef RTLD_LAZY
1852 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1853 # else
1854 # ifdef DL_LAZY
1855 # define LT_DLLAZY_OR_NOW DL_LAZY
1856 # else
1857 # ifdef RTLD_NOW
1858 # define LT_DLLAZY_OR_NOW RTLD_NOW
1859 # else
1860 # ifdef DL_NOW
1861 # define LT_DLLAZY_OR_NOW DL_NOW
1862 # else
1863 # define LT_DLLAZY_OR_NOW 0
1864 # endif
1865 # endif
1866 # endif
1867 # endif
1868 #endif
1869
1870 #ifdef __cplusplus
1871 extern "C" void exit (int);
1872 #endif
1873
1874 void fnord() { int i=42;}
1875 int main ()
1876 {
1877 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1878 int status = $lt_dlunknown;
1879
1880 if (self)
1881 {
1882 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1883 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1884 /* dlclose (self); */
1885 }
1886 else
1887 puts (dlerror ());
1888
1889 exit (status);
1890 }]
1891 EOF
1892 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1893 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1894 lt_status=$?
1895 case x$lt_status in
1896 x$lt_dlno_uscore) $1 ;;
1897 x$lt_dlneed_uscore) $2 ;;
1898 x$lt_dlunknown|x*) $3 ;;
1899 esac
1900 else :
1901 # compilation failed
1902 $3
1903 fi
1904 fi
1905 rm -fr conftest*
1906 ])# _LT_AC_TRY_DLOPEN_SELF
1907
1908
1909 # AC_LIBTOOL_DLOPEN_SELF
1910 # ----------------------
1911 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1912 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1913 if test "x$enable_dlopen" != xyes; then
1914 enable_dlopen=unknown
1915 enable_dlopen_self=unknown
1916 enable_dlopen_self_static=unknown
1917 else
1918 lt_cv_dlopen=no
1919 lt_cv_dlopen_libs=
1920
1921 case $host_os in
1922 beos*)
1923 lt_cv_dlopen="load_add_on"
1924 lt_cv_dlopen_libs=
1925 lt_cv_dlopen_self=yes
1926 ;;
1927
1928 mingw* | pw32*)
1929 lt_cv_dlopen="LoadLibrary"
1930 lt_cv_dlopen_libs=
1931 ;;
1932
1933 cygwin*)
1934 lt_cv_dlopen="dlopen"
1935 lt_cv_dlopen_libs=
1936 ;;
1937
1938 darwin*)
1939 # if libdl is installed we need to link against it
1940 AC_CHECK_LIB([dl], [dlopen],
1941 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1942 lt_cv_dlopen="dyld"
1943 lt_cv_dlopen_libs=
1944 lt_cv_dlopen_self=yes
1945 ])
1946 ;;
1947
1948 *)
1949 AC_CHECK_FUNC([shl_load],
1950 [lt_cv_dlopen="shl_load"],
1951 [AC_CHECK_LIB([dld], [shl_load],
1952 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1953 [AC_CHECK_FUNC([dlopen],
1954 [lt_cv_dlopen="dlopen"],
1955 [AC_CHECK_LIB([dl], [dlopen],
1956 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1957 [AC_CHECK_LIB([svld], [dlopen],
1958 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1959 [AC_CHECK_LIB([dld], [dld_link],
1960 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1961 ])
1962 ])
1963 ])
1964 ])
1965 ])
1966 ;;
1967 esac
1968
1969 if test "x$lt_cv_dlopen" != xno; then
1970 enable_dlopen=yes
1971 else
1972 enable_dlopen=no
1973 fi
1974
1975 case $lt_cv_dlopen in
1976 dlopen)
1977 save_CPPFLAGS="$CPPFLAGS"
1978 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1979
1980 save_LDFLAGS="$LDFLAGS"
1981 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1982
1983 save_LIBS="$LIBS"
1984 LIBS="$lt_cv_dlopen_libs $LIBS"
1985
1986 AC_CACHE_CHECK([whether a program can dlopen itself],
1987 lt_cv_dlopen_self, [dnl
1988 _LT_AC_TRY_DLOPEN_SELF(
1989 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1990 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1991 ])
1992
1993 if test "x$lt_cv_dlopen_self" = xyes; then
1994 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1995 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1996 lt_cv_dlopen_self_static, [dnl
1997 _LT_AC_TRY_DLOPEN_SELF(
1998 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1999 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2000 ])
2001 fi
2002
2003 CPPFLAGS="$save_CPPFLAGS"
2004 LDFLAGS="$save_LDFLAGS"
2005 LIBS="$save_LIBS"
2006 ;;
2007 esac
2008
2009 case $lt_cv_dlopen_self in
2010 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2011 *) enable_dlopen_self=unknown ;;
2012 esac
2013
2014 case $lt_cv_dlopen_self_static in
2015 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2016 *) enable_dlopen_self_static=unknown ;;
2017 esac
2018 fi
2019 ])# AC_LIBTOOL_DLOPEN_SELF
2020
2021
2022 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2023 # ---------------------------------
2024 # Check to see if options -c and -o are simultaneously supported by compiler
2025 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2026 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2027 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2028 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2029 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2030 $rm -r conftest 2>/dev/null
2031 mkdir conftest
2032 cd conftest
2033 mkdir out
2034 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2035
2036 lt_compiler_flag="-o out/conftest2.$ac_objext"
2037 # Insert the option either (1) after the last *FLAGS variable, or
2038 # (2) before a word containing "conftest.", or (3) at the end.
2039 # Note that $ac_compile itself does not contain backslashes and begins
2040 # with a dollar sign (not a hyphen), so the echo should work correctly.
2041 lt_compile=`echo "$ac_compile" | $SED \
2042 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2043 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2044 -e 's:$: $lt_compiler_flag:'`
2045 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2046 (eval "$lt_compile" 2>out/conftest.err)
2047 ac_status=$?
2048 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2049 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2050 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2051 then
2052 # The compiler can only warn and ignore the option if not recognized
2053 # So say no if there are warnings
2054 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2055 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2056 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2057 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2058 fi
2059 fi
2060 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2061 $rm conftest*
2062 # SGI C++ compiler will create directory out/ii_files/ for
2063 # template instantiation
2064 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2065 $rm out/* && rmdir out
2066 cd ..
2067 rmdir conftest
2068 $rm conftest*
2069 ])
2070 ])# AC_LIBTOOL_PROG_CC_C_O
2071
2072
2073 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2074 # -----------------------------------------
2075 # Check to see if we can do hard links to lock some files if needed
2076 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2077 [AC_REQUIRE([_LT_AC_LOCK])dnl
2078
2079 hard_links="nottested"
2080 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2081 # do not overwrite the value of need_locks provided by the user
2082 AC_MSG_CHECKING([if we can lock with hard links])
2083 hard_links=yes
2084 $rm conftest*
2085 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2086 touch conftest.a
2087 ln conftest.a conftest.b 2>&5 || hard_links=no
2088 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2089 AC_MSG_RESULT([$hard_links])
2090 if test "$hard_links" = no; then
2091 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2092 need_locks=warn
2093 fi
2094 else
2095 need_locks=no
2096 fi
2097 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2098
2099
2100 # AC_LIBTOOL_OBJDIR
2101 # -----------------
2102 AC_DEFUN([AC_LIBTOOL_OBJDIR],
2103 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2104 [rm -f .libs 2>/dev/null
2105 mkdir .libs 2>/dev/null
2106 if test -d .libs; then
2107 lt_cv_objdir=.libs
2108 else
2109 # MS-DOS does not allow filenames that begin with a dot.
2110 lt_cv_objdir=_libs
2111 fi
2112 rmdir .libs 2>/dev/null])
2113 objdir=$lt_cv_objdir
2114 ])# AC_LIBTOOL_OBJDIR
2115
2116
2117 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2118 # ----------------------------------------------
2119 # Check hardcoding attributes.
2120 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2121 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2122 _LT_AC_TAGVAR(hardcode_action, $1)=
2123 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2124 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2125 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2126
2127 # We can hardcode non-existant directories.
2128 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2129 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2130 # have to relink, otherwise we might link with an installed library
2131 # when we should be linking with a yet-to-be-installed one
2132 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2133 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2134 # Linking always hardcodes the temporary library directory.
2135 _LT_AC_TAGVAR(hardcode_action, $1)=relink
2136 else
2137 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2138 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2139 fi
2140 else
2141 # We cannot hardcode anything, or else we can only hardcode existing
2142 # directories.
2143 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2144 fi
2145 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2146
2147 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2148 # Fast installation is not supported
2149 enable_fast_install=no
2150 elif test "$shlibpath_overrides_runpath" = yes ||
2151 test "$enable_shared" = no; then
2152 # Fast installation is not necessary
2153 enable_fast_install=needless
2154 fi
2155 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2156
2157
2158 # AC_LIBTOOL_SYS_LIB_STRIP
2159 # ------------------------
2160 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2161 [striplib=
2162 old_striplib=
2163 AC_MSG_CHECKING([whether stripping libraries is possible])
2164 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2165 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2166 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2167 AC_MSG_RESULT([yes])
2168 else
2169 # FIXME - insert some real tests, host_os isn't really good enough
2170 case $host_os in
2171 darwin*)
2172 if test -n "$STRIP" ; then
2173 striplib="$STRIP -x"
2174 AC_MSG_RESULT([yes])
2175 else
2176 AC_MSG_RESULT([no])
2177 fi
2178 ;;
2179 *)
2180 AC_MSG_RESULT([no])
2181 ;;
2182 esac
2183 fi
2184 ])# AC_LIBTOOL_SYS_LIB_STRIP
2185
2186
2187 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2188 # -----------------------------
2189 # PORTME Fill in your ld.so characteristics
2190 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2191 [AC_MSG_CHECKING([dynamic linker characteristics])
2192 library_names_spec=
2193 libname_spec='lib$name'
2194 soname_spec=
2195 shrext_cmds=".so"
2196 postinstall_cmds=
2197 postuninstall_cmds=
2198 finish_cmds=
2199 finish_eval=
2200 shlibpath_var=
2201 shlibpath_overrides_runpath=unknown
2202 version_type=none
2203 dynamic_linker="$host_os ld.so"
2204 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2205 if test "$GCC" = yes; then
2206 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2207 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2208 # if the path contains ";" then we assume it to be the separator
2209 # otherwise default to the standard path separator (i.e. ":") - it is
2210 # assumed that no part of a normal pathname contains ";" but that should
2211 # okay in the real world where ";" in dirpaths is itself problematic.
2212 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2213 else
2214 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2215 fi
2216 else
2217 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2218 fi
2219 need_lib_prefix=unknown
2220 hardcode_into_libs=no
2221
2222 # when you set need_version to no, make sure it does not cause -set_version
2223 # flags to be left without arguments
2224 need_version=unknown
2225
2226 case $host_os in
2227 aix3*)
2228 version_type=linux
2229 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2230 shlibpath_var=LIBPATH
2231
2232 # AIX 3 has no versioning support, so we append a major version to the name.
2233 soname_spec='${libname}${release}${shared_ext}$major'
2234 ;;
2235
2236 aix4* | aix5*)
2237 version_type=linux
2238 need_lib_prefix=no
2239 need_version=no
2240 hardcode_into_libs=yes
2241 if test "$host_cpu" = ia64; then
2242 # AIX 5 supports IA64
2243 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2244 shlibpath_var=LD_LIBRARY_PATH
2245 else
2246 # With GCC up to 2.95.x, collect2 would create an import file
2247 # for dependence libraries. The import file would start with
2248 # the line `#! .'. This would cause the generated library to
2249 # depend on `.', always an invalid library. This was fixed in
2250 # development snapshots of GCC prior to 3.0.
2251 case $host_os in
2252 aix4 | aix4.[[01]] | aix4.[[01]].*)
2253 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2254 echo ' yes '
2255 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2256 :
2257 else
2258 can_build_shared=no
2259 fi
2260 ;;
2261 esac
2262 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2263 # soname into executable. Probably we can add versioning support to
2264 # collect2, so additional links can be useful in future.
2265 if test "$aix_use_runtimelinking" = yes; then
2266 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2267 # instead of lib<name>.a to let people know that these are not
2268 # typical AIX shared libraries.
2269 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2270 else
2271 # We preserve .a as extension for shared libraries through AIX4.2
2272 # and later when we are not doing run time linking.
2273 library_names_spec='${libname}${release}.a $libname.a'
2274 soname_spec='${libname}${release}${shared_ext}$major'
2275 fi
2276 shlibpath_var=LIBPATH
2277 fi
2278 ;;
2279
2280 amigaos*)
2281 library_names_spec='$libname.ixlibrary $libname.a'
2282 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2283 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2284 ;;
2285
2286 beos*)
2287 library_names_spec='${libname}${shared_ext}'
2288 dynamic_linker="$host_os ld.so"
2289 shlibpath_var=LIBRARY_PATH
2290 ;;
2291
2292 bsdi[[45]]*)
2293 version_type=linux
2294 need_version=no
2295 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2296 soname_spec='${libname}${release}${shared_ext}$major'
2297 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2298 shlibpath_var=LD_LIBRARY_PATH
2299 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2300 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2301 # the default ld.so.conf also contains /usr/contrib/lib and
2302 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2303 # libtool to hard-code these into programs
2304 ;;
2305
2306 cygwin* | mingw* | pw32*)
2307 version_type=windows
2308 shrext_cmds=".dll"
2309 need_version=no
2310 need_lib_prefix=no
2311
2312 case $GCC,$host_os in
2313 yes,cygwin* | yes,mingw* | yes,pw32*)
2314 library_names_spec='$libname.dll.a'
2315 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2316 postinstall_cmds='base_file=`basename \${file}`~
2317 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2318 dldir=$destdir/`dirname \$dlpath`~
2319 test -d \$dldir || mkdir -p \$dldir~
2320 $install_prog $dir/$dlname \$dldir/$dlname~
2321 chmod a+x \$dldir/$dlname'
2322 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2323 dlpath=$dir/\$dldll~
2324 $rm \$dlpath'
2325 shlibpath_overrides_runpath=yes
2326
2327 case $host_os in
2328 cygwin*)
2329 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2330 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2331 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2332 ;;
2333 mingw*)
2334 # MinGW DLLs use traditional 'lib' prefix
2335 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2336 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2337 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2338 # It is most probably a Windows format PATH printed by
2339 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2340 # path with ; separators, and with drive letters. We can handle the
2341 # drive letters (cygwin fileutils understands them), so leave them,
2342 # especially as we might pass files found there to a mingw objdump,
2343 # which wouldn't understand a cygwinified path. Ahh.
2344 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2345 else
2346 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2347 fi
2348 ;;
2349 pw32*)
2350 # pw32 DLLs use 'pw' prefix rather than 'lib'
2351 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2352 ;;
2353 esac
2354 ;;
2355
2356 *)
2357 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2358 ;;
2359 esac
2360 dynamic_linker='Win32 ld.exe'
2361 # FIXME: first we should search . and the directory the executable is in
2362 shlibpath_var=PATH
2363 ;;
2364
2365 darwin* | rhapsody*)
2366 dynamic_linker="$host_os dyld"
2367 version_type=darwin
2368 need_lib_prefix=no
2369 need_version=no
2370 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2371 soname_spec='${libname}${release}${major}$shared_ext'
2372 shlibpath_overrides_runpath=yes
2373 shlibpath_var=DYLD_LIBRARY_PATH
2374 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2375 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2376 if test "$GCC" = yes; then
2377 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2378 else
2379 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2380 fi
2381 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2382 ;;
2383
2384 dgux*)
2385 version_type=linux
2386 need_lib_prefix=no
2387 need_version=no
2388 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2389 soname_spec='${libname}${release}${shared_ext}$major'
2390 shlibpath_var=LD_LIBRARY_PATH
2391 ;;
2392
2393 freebsd1*)
2394 dynamic_linker=no
2395 ;;
2396
2397 kfreebsd*-gnu)
2398 version_type=linux
2399 need_lib_prefix=no
2400 need_version=no
2401 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2402 soname_spec='${libname}${release}${shared_ext}$major'
2403 shlibpath_var=LD_LIBRARY_PATH
2404 shlibpath_overrides_runpath=no
2405 hardcode_into_libs=yes
2406 dynamic_linker='GNU ld.so'
2407 ;;
2408
2409 freebsd* | dragonfly*)
2410 # DragonFly does not have aout. When/if they implement a new
2411 # versioning mechanism, adjust this.
2412 if test -x /usr/bin/objformat; then
2413 objformat=`/usr/bin/objformat`
2414 else
2415 case $host_os in
2416 freebsd[[123]]*) objformat=aout ;;
2417 *) objformat=elf ;;
2418 esac
2419 fi
2420 version_type=freebsd-$objformat
2421 case $version_type in
2422 freebsd-elf*)
2423 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2424 need_version=no
2425 need_lib_prefix=no
2426 ;;
2427 freebsd-*)
2428 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2429 need_version=yes
2430 ;;
2431 esac
2432 shlibpath_var=LD_LIBRARY_PATH
2433 case $host_os in
2434 freebsd2*)
2435 shlibpath_overrides_runpath=yes
2436 ;;
2437 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2438 shlibpath_overrides_runpath=yes
2439 hardcode_into_libs=yes
2440 ;;
2441 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2442 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2443 shlibpath_overrides_runpath=no
2444 hardcode_into_libs=yes
2445 ;;
2446 freebsd*) # from 4.6 on
2447 shlibpath_overrides_runpath=yes
2448 hardcode_into_libs=yes
2449 ;;
2450 esac
2451 ;;
2452
2453 gnu*)
2454 version_type=linux
2455 need_lib_prefix=no
2456 need_version=no
2457 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2458 soname_spec='${libname}${release}${shared_ext}$major'
2459 shlibpath_var=LD_LIBRARY_PATH
2460 hardcode_into_libs=yes
2461 ;;
2462
2463 hpux9* | hpux10* | hpux11*)
2464 # Give a soname corresponding to the major version so that dld.sl refuses to
2465 # link against other versions.
2466 version_type=sunos
2467 need_lib_prefix=no
2468 need_version=no
2469 case $host_cpu in
2470 ia64*)
2471 shrext_cmds='.so'
2472 hardcode_into_libs=yes
2473 dynamic_linker="$host_os dld.so"
2474 shlibpath_var=LD_LIBRARY_PATH
2475 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2476 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2477 soname_spec='${libname}${release}${shared_ext}$major'
2478 if test "X$HPUX_IA64_MODE" = X32; then
2479 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2480 else
2481 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2482 fi
2483 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2484 ;;
2485 hppa*64*)
2486 shrext_cmds='.sl'
2487 hardcode_into_libs=yes
2488 dynamic_linker="$host_os dld.sl"
2489 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2490 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2491 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2492 soname_spec='${libname}${release}${shared_ext}$major'
2493 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2494 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2495 ;;
2496 *)
2497 shrext_cmds='.sl'
2498 dynamic_linker="$host_os dld.sl"
2499 shlibpath_var=SHLIB_PATH
2500 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2501 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2502 soname_spec='${libname}${release}${shared_ext}$major'
2503 ;;
2504 esac
2505 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2506 postinstall_cmds='chmod 555 $lib'
2507 ;;
2508
2509 interix3*)
2510 version_type=linux
2511 need_lib_prefix=no
2512 need_version=no
2513 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2514 soname_spec='${libname}${release}${shared_ext}$major'
2515 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2516 shlibpath_var=LD_LIBRARY_PATH
2517 shlibpath_overrides_runpath=no
2518 hardcode_into_libs=yes
2519 ;;
2520
2521 irix5* | irix6* | nonstopux*)
2522 case $host_os in
2523 nonstopux*) version_type=nonstopux ;;
2524 *)
2525 if test "$lt_cv_prog_gnu_ld" = yes; then
2526 version_type=linux
2527 else
2528 version_type=irix
2529 fi ;;
2530 esac
2531 need_lib_prefix=no
2532 need_version=no
2533 soname_spec='${libname}${release}${shared_ext}$major'
2534 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2535 case $host_os in
2536 irix5* | nonstopux*)
2537 libsuff= shlibsuff=
2538 ;;
2539 *)
2540 case $LD in # libtool.m4 will add one of these switches to LD
2541 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2542 libsuff= shlibsuff= libmagic=32-bit;;
2543 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2544 libsuff=32 shlibsuff=N32 libmagic=N32;;
2545 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2546 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2547 *) libsuff= shlibsuff= libmagic=never-match;;
2548 esac
2549 ;;
2550 esac
2551 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2552 shlibpath_overrides_runpath=no
2553 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2554 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2555 hardcode_into_libs=yes
2556 ;;
2557
2558 # No shared lib support for Linux oldld, aout, or coff.
2559 linux*oldld* | linux*aout* | linux*coff*)
2560 dynamic_linker=no
2561 ;;
2562
2563 # This must be Linux ELF.
2564 linux*)
2565 version_type=linux
2566 need_lib_prefix=no
2567 need_version=no
2568 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2569 soname_spec='${libname}${release}${shared_ext}$major'
2570 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2571 shlibpath_var=LD_LIBRARY_PATH
2572 shlibpath_overrides_runpath=no
2573 # This implies no fast_install, which is unacceptable.
2574 # Some rework will be needed to allow for fast_install
2575 # before this can be enabled.
2576 hardcode_into_libs=yes
2577
2578 # Append ld.so.conf contents to the search path
2579 if test -f /etc/ld.so.conf; then
2580 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2581 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2582 fi
2583
2584 # We used to test for /lib/ld.so.1 and disable shared libraries on
2585 # powerpc, because MkLinux only supported shared libraries with the
2586 # GNU dynamic linker. Since this was broken with cross compilers,
2587 # most powerpc-linux boxes support dynamic linking these days and
2588 # people can always --disable-shared, the test was removed, and we
2589 # assume the GNU/Linux dynamic linker is in use.
2590 dynamic_linker='GNU/Linux ld.so'
2591 ;;
2592
2593 netbsdelf*-gnu)
2594 version_type=linux
2595 need_lib_prefix=no
2596 need_version=no
2597 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2598 soname_spec='${libname}${release}${shared_ext}$major'
2599 shlibpath_var=LD_LIBRARY_PATH
2600 shlibpath_overrides_runpath=no
2601 hardcode_into_libs=yes
2602 dynamic_linker='NetBSD ld.elf_so'
2603 ;;
2604
2605 knetbsd*-gnu)
2606 version_type=linux
2607 need_lib_prefix=no
2608 need_version=no
2609 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2610 soname_spec='${libname}${release}${shared_ext}$major'
2611 shlibpath_var=LD_LIBRARY_PATH
2612 shlibpath_overrides_runpath=no
2613 hardcode_into_libs=yes
2614 dynamic_linker='GNU ld.so'
2615 ;;
2616
2617 netbsd*)
2618 version_type=sunos
2619 need_lib_prefix=no
2620 need_version=no
2621 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2622 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2623 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2624 dynamic_linker='NetBSD (a.out) ld.so'
2625 else
2626 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2627 soname_spec='${libname}${release}${shared_ext}$major'
2628 dynamic_linker='NetBSD ld.elf_so'
2629 fi
2630 shlibpath_var=LD_LIBRARY_PATH
2631 shlibpath_overrides_runpath=yes
2632 hardcode_into_libs=yes
2633 ;;
2634
2635 newsos6)
2636 version_type=linux
2637 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2638 shlibpath_var=LD_LIBRARY_PATH
2639 shlibpath_overrides_runpath=yes
2640 ;;
2641
2642 nto-qnx*)
2643 version_type=linux
2644 need_lib_prefix=no
2645 need_version=no
2646 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2647 soname_spec='${libname}${release}${shared_ext}$major'
2648 shlibpath_var=LD_LIBRARY_PATH
2649 shlibpath_overrides_runpath=yes
2650 ;;
2651
2652 openbsd*)
2653 version_type=sunos
2654 sys_lib_dlsearch_path_spec="/usr/lib"
2655 need_lib_prefix=no
2656 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2657 case $host_os in
2658 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2659 *) need_version=no ;;
2660 esac
2661 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2662 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2663 shlibpath_var=LD_LIBRARY_PATH
2664 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2665 case $host_os in
2666 openbsd2.[[89]] | openbsd2.[[89]].*)
2667 shlibpath_overrides_runpath=no
2668 ;;
2669 *)
2670 shlibpath_overrides_runpath=yes
2671 ;;
2672 esac
2673 else
2674 shlibpath_overrides_runpath=yes
2675 fi
2676 ;;
2677
2678 os2*)
2679 libname_spec='$name'
2680 shrext_cmds=".dll"
2681 need_lib_prefix=no
2682 library_names_spec='$libname${shared_ext} $libname.a'
2683 dynamic_linker='OS/2 ld.exe'
2684 shlibpath_var=LIBPATH
2685 ;;
2686
2687 osf3* | osf4* | osf5*)
2688 version_type=osf
2689 need_lib_prefix=no
2690 need_version=no
2691 soname_spec='${libname}${release}${shared_ext}$major'
2692 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2693 shlibpath_var=LD_LIBRARY_PATH
2694 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2695 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2696 ;;
2697
2698 solaris*)
2699 version_type=linux
2700 need_lib_prefix=no
2701 need_version=no
2702 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2703 soname_spec='${libname}${release}${shared_ext}$major'
2704 shlibpath_var=LD_LIBRARY_PATH
2705 shlibpath_overrides_runpath=yes
2706 hardcode_into_libs=yes
2707 # ldd complains unless libraries are executable
2708 postinstall_cmds='chmod +x $lib'
2709 ;;
2710
2711 sunos4*)
2712 version_type=sunos
2713 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2714 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2715 shlibpath_var=LD_LIBRARY_PATH
2716 shlibpath_overrides_runpath=yes
2717 if test "$with_gnu_ld" = yes; then
2718 need_lib_prefix=no
2719 fi
2720 need_version=yes
2721 ;;
2722
2723 sysv4 | sysv4.3*)
2724 version_type=linux
2725 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2726 soname_spec='${libname}${release}${shared_ext}$major'
2727 shlibpath_var=LD_LIBRARY_PATH
2728 case $host_vendor in
2729 sni)
2730 shlibpath_overrides_runpath=no
2731 need_lib_prefix=no
2732 export_dynamic_flag_spec='${wl}-Blargedynsym'
2733 runpath_var=LD_RUN_PATH
2734 ;;
2735 siemens)
2736 need_lib_prefix=no
2737 ;;
2738 motorola)
2739 need_lib_prefix=no
2740 need_version=no
2741 shlibpath_overrides_runpath=no
2742 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2743 ;;
2744 esac
2745 ;;
2746
2747 sysv4*MP*)
2748 if test -d /usr/nec ;then
2749 version_type=linux
2750 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2751 soname_spec='$libname${shared_ext}.$major'
2752 shlibpath_var=LD_LIBRARY_PATH
2753 fi
2754 ;;
2755
2756 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2757 version_type=freebsd-elf
2758 need_lib_prefix=no
2759 need_version=no
2760 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2761 soname_spec='${libname}${release}${shared_ext}$major'
2762 shlibpath_var=LD_LIBRARY_PATH
2763 hardcode_into_libs=yes
2764 if test "$with_gnu_ld" = yes; then
2765 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2766 shlibpath_overrides_runpath=no
2767 else
2768 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2769 shlibpath_overrides_runpath=yes
2770 case $host_os in
2771 sco3.2v5*)
2772 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2773 ;;
2774 esac
2775 fi
2776 sys_lib_dlsearch_path_spec='/usr/lib'
2777 ;;
2778
2779 uts4*)
2780 version_type=linux
2781 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2782 soname_spec='${libname}${release}${shared_ext}$major'
2783 shlibpath_var=LD_LIBRARY_PATH
2784 ;;
2785
2786 *)
2787 dynamic_linker=no
2788 ;;
2789 esac
2790 AC_MSG_RESULT([$dynamic_linker])
2791 test "$dynamic_linker" = no && can_build_shared=no
2792
2793 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2794 if test "$GCC" = yes; then
2795 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2796 fi
2797 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2798
2799
2800 # _LT_AC_TAGCONFIG
2801 # ----------------
2802 AC_DEFUN([_LT_AC_TAGCONFIG],
2803 [AC_ARG_WITH([tags],
2804 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2805 [include additional configurations @<:@automatic@:>@])],
2806 [tagnames="$withval"])
2807
2808 if test -f "$ltmain" && test -n "$tagnames"; then
2809 if test ! -f "${ofile}"; then
2810 AC_MSG_WARN([output file `$ofile' does not exist])
2811 fi
2812
2813 if test -z "$LTCC"; then
2814 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2815 if test -z "$LTCC"; then
2816 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2817 else
2818 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2819 fi
2820 fi
2821 if test -z "$LTCFLAGS"; then
2822 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2823 fi
2824
2825 # Extract list of available tagged configurations in $ofile.
2826 # Note that this assumes the entire list is on one line.
2827 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2828
2829 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2830 for tagname in $tagnames; do
2831 IFS="$lt_save_ifs"
2832 # Check whether tagname contains only valid characters
2833 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2834 "") ;;
2835 *) AC_MSG_ERROR([invalid tag name: $tagname])
2836 ;;
2837 esac
2838
2839 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2840 then
2841 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2842 fi
2843
2844 # Update the list of available tags.
2845 if test -n "$tagname"; then
2846 echo appending configuration tag \"$tagname\" to $ofile
2847
2848 case $tagname in
2849 CXX)
2850 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2851 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2852 (test "X$CXX" != "Xg++"))) ; then
2853 AC_LIBTOOL_LANG_CXX_CONFIG
2854 else
2855 tagname=""
2856 fi
2857 ;;
2858
2859 F77)
2860 if test -n "$F77" && test "X$F77" != "Xno"; then
2861 AC_LIBTOOL_LANG_F77_CONFIG
2862 else
2863 tagname=""
2864 fi
2865 ;;
2866
2867 GCJ)
2868 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2869 AC_LIBTOOL_LANG_GCJ_CONFIG
2870 else
2871 tagname=""
2872 fi
2873 ;;
2874
2875 RC)
2876 AC_LIBTOOL_LANG_RC_CONFIG
2877 ;;
2878
2879 *)
2880 AC_MSG_ERROR([Unsupported tag name: $tagname])
2881 ;;
2882 esac
2883
2884 # Append the new tag name to the list of available tags.
2885 if test -n "$tagname" ; then
2886 available_tags="$available_tags $tagname"
2887 fi
2888 fi
2889 done
2890 IFS="$lt_save_ifs"
2891
2892 # Now substitute the updated list of available tags.
2893 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2894 mv "${ofile}T" "$ofile"
2895 chmod +x "$ofile"
2896 else
2897 rm -f "${ofile}T"
2898 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2899 fi
2900 fi
2901 ])# _LT_AC_TAGCONFIG
2902
2903
2904 # AC_LIBTOOL_DLOPEN
2905 # -----------------
2906 # enable checks for dlopen support
2907 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2908 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2909 ])# AC_LIBTOOL_DLOPEN
2910
2911
2912 # AC_LIBTOOL_WIN32_DLL
2913 # --------------------
2914 # declare package support for building win32 DLLs
2915 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2916 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2917 ])# AC_LIBTOOL_WIN32_DLL
2918
2919
2920 # AC_ENABLE_SHARED([DEFAULT])
2921 # ---------------------------
2922 # implement the --enable-shared flag
2923 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2924 AC_DEFUN([AC_ENABLE_SHARED],
2925 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2926 AC_ARG_ENABLE([shared],
2927 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2928 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2929 [p=${PACKAGE-default}
2930 case $enableval in
2931 yes) enable_shared=yes ;;
2932 no) enable_shared=no ;;
2933 *)
2934 enable_shared=no
2935 # Look at the argument we got. We use all the common list separators.
2936 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2937 for pkg in $enableval; do
2938 IFS="$lt_save_ifs"
2939 if test "X$pkg" = "X$p"; then
2940 enable_shared=yes
2941 fi
2942 done
2943 IFS="$lt_save_ifs"
2944 ;;
2945 esac],
2946 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2947 ])# AC_ENABLE_SHARED
2948
2949
2950 # AC_DISABLE_SHARED
2951 # -----------------
2952 # set the default shared flag to --disable-shared
2953 AC_DEFUN([AC_DISABLE_SHARED],
2954 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2955 AC_ENABLE_SHARED(no)
2956 ])# AC_DISABLE_SHARED
2957
2958
2959 # AC_ENABLE_STATIC([DEFAULT])
2960 # ---------------------------
2961 # implement the --enable-static flag
2962 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2963 AC_DEFUN([AC_ENABLE_STATIC],
2964 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2965 AC_ARG_ENABLE([static],
2966 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2967 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2968 [p=${PACKAGE-default}
2969 case $enableval in
2970 yes) enable_static=yes ;;
2971 no) enable_static=no ;;
2972 *)
2973 enable_static=no
2974 # Look at the argument we got. We use all the common list separators.
2975 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2976 for pkg in $enableval; do
2977 IFS="$lt_save_ifs"
2978 if test "X$pkg" = "X$p"; then
2979 enable_static=yes
2980 fi
2981 done
2982 IFS="$lt_save_ifs"
2983 ;;
2984 esac],
2985 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2986 ])# AC_ENABLE_STATIC
2987
2988
2989 # AC_DISABLE_STATIC
2990 # -----------------
2991 # set the default static flag to --disable-static
2992 AC_DEFUN([AC_DISABLE_STATIC],
2993 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2994 AC_ENABLE_STATIC(no)
2995 ])# AC_DISABLE_STATIC
2996
2997
2998 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2999 # ---------------------------------
3000 # implement the --enable-fast-install flag
3001 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3002 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3003 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3004 AC_ARG_ENABLE([fast-install],
3005 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3006 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3007 [p=${PACKAGE-default}
3008 case $enableval in
3009 yes) enable_fast_install=yes ;;
3010 no) enable_fast_install=no ;;
3011 *)
3012 enable_fast_install=no
3013 # Look at the argument we got. We use all the common list separators.
3014 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3015 for pkg in $enableval; do
3016 IFS="$lt_save_ifs"
3017 if test "X$pkg" = "X$p"; then
3018 enable_fast_install=yes
3019 fi
3020 done
3021 IFS="$lt_save_ifs"
3022 ;;
3023 esac],
3024 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3025 ])# AC_ENABLE_FAST_INSTALL
3026
3027
3028 # AC_DISABLE_FAST_INSTALL
3029 # -----------------------
3030 # set the default to --disable-fast-install
3031 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3032 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3033 AC_ENABLE_FAST_INSTALL(no)
3034 ])# AC_DISABLE_FAST_INSTALL
3035
3036
3037 # AC_LIBTOOL_PICMODE([MODE])
3038 # --------------------------
3039 # implement the --with-pic flag
3040 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
3041 AC_DEFUN([AC_LIBTOOL_PICMODE],
3042 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3043 pic_mode=ifelse($#,1,$1,default)
3044 ])# AC_LIBTOOL_PICMODE
3045
3046
3047 # AC_PROG_EGREP
3048 # -------------
3049 # This is predefined starting with Autoconf 2.54, so this conditional
3050 # definition can be removed once we require Autoconf 2.54 or later.
3051 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3052 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3053 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3054 then ac_cv_prog_egrep='grep -E'
3055 else ac_cv_prog_egrep='egrep'
3056 fi])
3057 EGREP=$ac_cv_prog_egrep
3058 AC_SUBST([EGREP])
3059 ])])
3060
3061
3062 # AC_PATH_TOOL_PREFIX
3063 # -------------------
3064 # find a file program which can recognise shared library
3065 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3066 [AC_REQUIRE([AC_PROG_EGREP])dnl
3067 AC_MSG_CHECKING([for $1])
3068 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3069 [case $MAGIC_CMD in
3070 [[\\/*] | ?:[\\/]*])
3071 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3072 ;;
3073 *)
3074 lt_save_MAGIC_CMD="$MAGIC_CMD"
3075 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3076 dnl $ac_dummy forces splitting on constant user-supplied paths.
3077 dnl POSIX.2 word splitting is done only on the output of word expansions,
3078 dnl not every word. This closes a longstanding sh security hole.
3079 ac_dummy="ifelse([$2], , $PATH, [$2])"
3080 for ac_dir in $ac_dummy; do
3081 IFS="$lt_save_ifs"
3082 test -z "$ac_dir" && ac_dir=.
3083 if test -f $ac_dir/$1; then
3084 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3085 if test -n "$file_magic_test_file"; then
3086 case $deplibs_check_method in
3087 "file_magic "*)
3088 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3089 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3090 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3091 $EGREP "$file_magic_regex" > /dev/null; then
3092 :
3093 else
3094 cat <<EOF 1>&2
3095
3096 *** Warning: the command libtool uses to detect shared libraries,
3097 *** $file_magic_cmd, produces output that libtool cannot recognize.
3098 *** The result is that libtool may fail to recognize shared libraries
3099 *** as such. This will affect the creation of libtool libraries that
3100 *** depend on shared libraries, but programs linked with such libtool
3101 *** libraries will work regardless of this problem. Nevertheless, you
3102 *** may want to report the problem to your system manager and/or to
3103 *** bug-libtool@gnu.org
3104
3105 EOF
3106 fi ;;
3107 esac
3108 fi
3109 break
3110 fi
3111 done
3112 IFS="$lt_save_ifs"
3113 MAGIC_CMD="$lt_save_MAGIC_CMD"
3114 ;;
3115 esac])
3116 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3117 if test -n "$MAGIC_CMD"; then
3118 AC_MSG_RESULT($MAGIC_CMD)
3119 else
3120 AC_MSG_RESULT(no)
3121 fi
3122 ])# AC_PATH_TOOL_PREFIX
3123
3124
3125 # AC_PATH_MAGIC
3126 # -------------
3127 # find a file program which can recognise a shared library
3128 AC_DEFUN([AC_PATH_MAGIC],
3129 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3130 if test -z "$lt_cv_path_MAGIC_CMD"; then
3131 if test -n "$ac_tool_prefix"; then
3132 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3133 else
3134 MAGIC_CMD=:
3135 fi
3136 fi
3137 ])# AC_PATH_MAGIC
3138
3139
3140 # AC_PROG_LD
3141 # ----------
3142 # find the pathname to the GNU or non-GNU linker
3143 AC_DEFUN([AC_PROG_LD],
3144 [AC_ARG_WITH([gnu-ld],
3145 [AC_HELP_STRING([--with-gnu-ld],
3146 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3147 [test "$withval" = no || with_gnu_ld=yes],
3148 [with_gnu_ld=no])
3149 AC_REQUIRE([LT_AC_PROG_SED])dnl
3150 AC_REQUIRE([AC_PROG_CC])dnl
3151 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3152 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3153 ac_prog=ld
3154 if test "$GCC" = yes; then
3155 # Check if gcc -print-prog-name=ld gives a path.
3156 AC_MSG_CHECKING([for ld used by $CC])
3157 case $host in
3158 *-*-mingw*)
3159 # gcc leaves a trailing carriage return which upsets mingw
3160 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3161 *)
3162 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3163 esac
3164 case $ac_prog in
3165 # Accept absolute paths.
3166 [[\\/]]* | ?:[[\\/]]*)
3167 re_direlt='/[[^/]][[^/]]*/\.\./'
3168 # Canonicalize the pathname of ld
3169 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3170 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3171 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3172 done
3173 test -z "$LD" && LD="$ac_prog"
3174 ;;
3175 "")
3176 # If it fails, then pretend we aren't using GCC.
3177 ac_prog=ld
3178 ;;
3179 *)
3180 # If it is relative, then search for the first ld in PATH.
3181 with_gnu_ld=unknown
3182 ;;
3183 esac
3184 elif test "$with_gnu_ld" = yes; then
3185 AC_MSG_CHECKING([for GNU ld])
3186 else
3187 AC_MSG_CHECKING([for non-GNU ld])
3188 fi
3189 AC_CACHE_VAL(lt_cv_path_LD,
3190 [if test -z "$LD"; then
3191 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3192 for ac_dir in $PATH; do
3193 IFS="$lt_save_ifs"
3194 test -z "$ac_dir" && ac_dir=.
3195 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3196 lt_cv_path_LD="$ac_dir/$ac_prog"
3197 # Check to see if the program is GNU ld. I'd rather use --version,
3198 # but apparently some variants of GNU ld only accept -v.
3199 # Break only if it was the GNU/non-GNU ld that we prefer.
3200 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3201 *GNU* | *'with BFD'*)
3202 test "$with_gnu_ld" != no && break
3203 ;;
3204 *)
3205 test "$with_gnu_ld" != yes && break
3206 ;;
3207 esac
3208 fi
3209 done
3210 IFS="$lt_save_ifs"
3211 else
3212 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3213 fi])
3214 LD="$lt_cv_path_LD"
3215 if test -n "$LD"; then
3216 AC_MSG_RESULT($LD)
3217 else
3218 AC_MSG_RESULT(no)
3219 fi
3220 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3221 AC_PROG_LD_GNU
3222 ])# AC_PROG_LD
3223
3224
3225 # AC_PROG_LD_GNU
3226 # --------------
3227 AC_DEFUN([AC_PROG_LD_GNU],
3228 [AC_REQUIRE([AC_PROG_EGREP])dnl
3229 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3230 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3231 case `$LD -v 2>&1 </dev/null` in
3232 *GNU* | *'with BFD'*)
3233 lt_cv_prog_gnu_ld=yes
3234 ;;
3235 *)
3236 lt_cv_prog_gnu_ld=no
3237 ;;
3238 esac])
3239 with_gnu_ld=$lt_cv_prog_gnu_ld
3240 ])# AC_PROG_LD_GNU
3241
3242
3243 # AC_PROG_LD_RELOAD_FLAG
3244 # ----------------------
3245 # find reload flag for linker
3246 # -- PORTME Some linkers may need a different reload flag.
3247 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3248 [AC_CACHE_CHECK([for $LD option to reload object files],
3249 lt_cv_ld_reload_flag,
3250 [lt_cv_ld_reload_flag='-r'])
3251 reload_flag=$lt_cv_ld_reload_flag
3252 case $reload_flag in
3253 "" | " "*) ;;
3254 *) reload_flag=" $reload_flag" ;;
3255 esac
3256 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3257 case $host_os in
3258 darwin*)
3259 if test "$GCC" = yes; then
3260 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3261 else
3262 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3263 fi
3264 ;;
3265 esac
3266 ])# AC_PROG_LD_RELOAD_FLAG
3267
3268
3269 # AC_DEPLIBS_CHECK_METHOD
3270 # -----------------------
3271 # how to check for library dependencies
3272 # -- PORTME fill in with the dynamic library characteristics
3273 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3274 [AC_CACHE_CHECK([how to recognise dependent libraries],
3275 lt_cv_deplibs_check_method,
3276 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3277 lt_cv_file_magic_test_file=
3278 lt_cv_deplibs_check_method='unknown'
3279 # Need to set the preceding variable on all platforms that support
3280 # interlibrary dependencies.
3281 # 'none' -- dependencies not supported.
3282 # `unknown' -- same as none, but documents that we really don't know.
3283 # 'pass_all' -- all dependencies passed with no checks.
3284 # 'test_compile' -- check by making test program.
3285 # 'file_magic [[regex]]' -- check by looking for files in library path
3286 # which responds to the $file_magic_cmd with a given extended regex.
3287 # If you have `file' or equivalent on your system and you're not sure
3288 # whether `pass_all' will *always* work, you probably want this one.
3289
3290 case $host_os in
3291 aix4* | aix5*)
3292 lt_cv_deplibs_check_method=pass_all
3293 ;;
3294
3295 beos*)
3296 lt_cv_deplibs_check_method=pass_all
3297 ;;
3298
3299 bsdi[[45]]*)
3300 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3301 lt_cv_file_magic_cmd='/usr/bin/file -L'
3302 lt_cv_file_magic_test_file=/shlib/libc.so
3303 ;;
3304
3305 cygwin*)
3306 # func_win32_libid is a shell function defined in ltmain.sh
3307 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3308 lt_cv_file_magic_cmd='func_win32_libid'
3309 ;;
3310
3311 mingw* | pw32*)
3312 # Base MSYS/MinGW do not provide the 'file' command needed by
3313 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3314 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3315 lt_cv_file_magic_cmd='$OBJDUMP -f'
3316 ;;
3317
3318 darwin* | rhapsody*)
3319 lt_cv_deplibs_check_method=pass_all
3320 ;;
3321
3322 freebsd* | kfreebsd*-gnu | dragonfly*)
3323 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3324 case $host_cpu in
3325 i*86 )
3326 # Not sure whether the presence of OpenBSD here was a mistake.
3327 # Let's accept both of them until this is cleared up.
3328 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3329 lt_cv_file_magic_cmd=/usr/bin/file
3330 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3331 ;;
3332 esac
3333 else
3334 lt_cv_deplibs_check_method=pass_all
3335 fi
3336 ;;
3337
3338 gnu*)
3339 lt_cv_deplibs_check_method=pass_all
3340 ;;
3341
3342 hpux10.20* | hpux11*)
3343 lt_cv_file_magic_cmd=/usr/bin/file
3344 case $host_cpu in
3345 ia64*)
3346 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3347 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3348 ;;
3349 hppa*64*)
3350 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3351 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3352 ;;
3353 *)
3354 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3355 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3356 ;;
3357 esac
3358 ;;
3359
3360 interix3*)
3361 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3362 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3363 ;;
3364
3365 irix5* | irix6* | nonstopux*)
3366 case $LD in
3367 *-32|*"-32 ") libmagic=32-bit;;
3368 *-n32|*"-n32 ") libmagic=N32;;
3369 *-64|*"-64 ") libmagic=64-bit;;
3370 *) libmagic=never-match;;
3371 esac
3372 lt_cv_deplibs_check_method=pass_all
3373 ;;
3374
3375 # This must be Linux ELF.
3376 linux*)
3377 lt_cv_deplibs_check_method=pass_all
3378 ;;
3379
3380 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
3381 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3382 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3383 else
3384 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3385 fi
3386 ;;
3387
3388 newos6*)
3389 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3390 lt_cv_file_magic_cmd=/usr/bin/file
3391 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3392 ;;
3393
3394 nto-qnx*)
3395 lt_cv_deplibs_check_method=unknown
3396 ;;
3397
3398 openbsd*)
3399 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3400 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3401 else
3402 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3403 fi
3404 ;;
3405
3406 osf3* | osf4* | osf5*)
3407 lt_cv_deplibs_check_method=pass_all
3408 ;;
3409
3410 solaris*)
3411 lt_cv_deplibs_check_method=pass_all
3412 ;;
3413
3414 sysv4 | sysv4.3*)
3415 case $host_vendor in
3416 motorola)
3417 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
3418 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3419 ;;
3420 ncr)
3421 lt_cv_deplibs_check_method=pass_all
3422 ;;
3423 sequent)
3424 lt_cv_file_magic_cmd='/bin/file'
3425 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3426 ;;
3427 sni)
3428 lt_cv_file_magic_cmd='/bin/file'
3429 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3430 lt_cv_file_magic_test_file=/lib/libc.so
3431 ;;
3432 siemens)
3433 lt_cv_deplibs_check_method=pass_all
3434 ;;
3435 pc)
3436 lt_cv_deplibs_check_method=pass_all
3437 ;;
3438 esac
3439 ;;
3440
3441 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3442 lt_cv_deplibs_check_method=pass_all
3443 ;;
3444 esac
3445 ])
3446 file_magic_cmd=$lt_cv_file_magic_cmd
3447 deplibs_check_method=$lt_cv_deplibs_check_method
3448 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3449 ])# AC_DEPLIBS_CHECK_METHOD
3450
3451
3452 # AC_PROG_NM
3453 # ----------
3454 # find the pathname to a BSD-compatible name lister
3455 AC_DEFUN([AC_PROG_NM],
3456 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3457 [if test -n "$NM"; then
3458 # Let the user override the test.
3459 lt_cv_path_NM="$NM"
3460 else
3461 lt_nm_to_check="${ac_tool_prefix}nm"
3462 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3463 lt_nm_to_check="$lt_nm_to_check nm"
3464 fi
3465 for lt_tmp_nm in $lt_nm_to_check; do
3466 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3467 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3468 IFS="$lt_save_ifs"
3469 test -z "$ac_dir" && ac_dir=.
3470 tmp_nm="$ac_dir/$lt_tmp_nm"
3471 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3472 # Check to see if the nm accepts a BSD-compat flag.
3473 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3474 # nm: unknown option "B" ignored
3475 # Tru64's nm complains that /dev/null is an invalid object file
3476 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3477 */dev/null* | *'Invalid file or object type'*)
3478 lt_cv_path_NM="$tmp_nm -B"
3479 break
3480 ;;
3481 *)
3482 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3483 */dev/null*)
3484 lt_cv_path_NM="$tmp_nm -p"
3485 break
3486 ;;
3487 *)
3488 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3489 continue # so that we can try to find one that supports BSD flags
3490 ;;
3491 esac
3492 ;;
3493 esac
3494 fi
3495 done
3496 IFS="$lt_save_ifs"
3497 done
3498 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3499 fi])
3500 NM="$lt_cv_path_NM"
3501 ])# AC_PROG_NM
3502
3503
3504 # AC_CHECK_LIBM
3505 # -------------
3506 # check for math library
3507 AC_DEFUN([AC_CHECK_LIBM],
3508 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3509 LIBM=
3510 case $host in
3511 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3512 # These system don't have libm, or don't need it
3513 ;;
3514 *-ncr-sysv4.3*)
3515 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3516 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3517 ;;
3518 *)
3519 AC_CHECK_LIB(m, cos, LIBM="-lm")
3520 ;;
3521 esac
3522 ])# AC_CHECK_LIBM
3523
3524
3525 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3526 # -----------------------------------
3527 # sets LIBLTDL to the link flags for the libltdl convenience library and
3528 # LTDLINCL to the include flags for the libltdl header and adds
3529 # --enable-ltdl-convenience to the configure arguments. Note that
3530 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3531 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
3532 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3533 # (note the single quotes!). If your package is not flat and you're not
3534 # using automake, define top_builddir and top_srcdir appropriately in
3535 # the Makefiles.
3536 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3537 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3538 case $enable_ltdl_convenience in
3539 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3540 "") enable_ltdl_convenience=yes
3541 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3542 esac
3543 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3544 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3545 # For backwards non-gettext consistent compatibility...
3546 INCLTDL="$LTDLINCL"
3547 ])# AC_LIBLTDL_CONVENIENCE
3548
3549
3550 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3551 # -----------------------------------
3552 # sets LIBLTDL to the link flags for the libltdl installable library and
3553 # LTDLINCL to the include flags for the libltdl header and adds
3554 # --enable-ltdl-install to the configure arguments. Note that
3555 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3556 # and an installed libltdl is not found, it is assumed to be `libltdl'.
3557 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3558 # '${top_srcdir}/' (note the single quotes!). If your package is not
3559 # flat and you're not using automake, define top_builddir and top_srcdir
3560 # appropriately in the Makefiles.
3561 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3562 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3563 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3564 AC_CHECK_LIB(ltdl, lt_dlinit,
3565 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3566 [if test x"$enable_ltdl_install" = xno; then
3567 AC_MSG_WARN([libltdl not installed, but installation disabled])
3568 else
3569 enable_ltdl_install=yes
3570 fi
3571 ])
3572 if test x"$enable_ltdl_install" = x"yes"; then
3573 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3574 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3575 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3576 else
3577 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3578 LIBLTDL="-lltdl"
3579 LTDLINCL=
3580 fi
3581 # For backwards non-gettext consistent compatibility...
3582 INCLTDL="$LTDLINCL"
3583 ])# AC_LIBLTDL_INSTALLABLE
3584
3585
3586 # AC_LIBTOOL_CXX
3587 # --------------
3588 # enable support for C++ libraries
3589 AC_DEFUN([AC_LIBTOOL_CXX],
3590 [AC_REQUIRE([_LT_AC_LANG_CXX])
3591 ])# AC_LIBTOOL_CXX
3592
3593
3594 # _LT_AC_LANG_CXX
3595 # ---------------
3596 AC_DEFUN([_LT_AC_LANG_CXX],
3597 [AC_REQUIRE([AC_PROG_CXX])
3598 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3599 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3600 ])# _LT_AC_LANG_CXX
3601
3602 # _LT_AC_PROG_CXXCPP
3603 # ------------------
3604 AC_DEFUN([_LT_AC_PROG_CXXCPP],
3605 [
3606 AC_REQUIRE([AC_PROG_CXX])
3607 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3608 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3609 (test "X$CXX" != "Xg++"))) ; then
3610 AC_PROG_CXXCPP
3611 fi
3612 ])# _LT_AC_PROG_CXXCPP
3613
3614 # AC_LIBTOOL_F77
3615 # --------------
3616 # enable support for Fortran 77 libraries
3617 AC_DEFUN([AC_LIBTOOL_F77],
3618 [AC_REQUIRE([_LT_AC_LANG_F77])
3619 ])# AC_LIBTOOL_F77
3620
3621
3622 # _LT_AC_LANG_F77
3623 # ---------------
3624 AC_DEFUN([_LT_AC_LANG_F77],
3625 [AC_REQUIRE([AC_PROG_F77])
3626 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3627 ])# _LT_AC_LANG_F77
3628
3629
3630 # AC_LIBTOOL_GCJ
3631 # --------------
3632 # enable support for GCJ libraries
3633 AC_DEFUN([AC_LIBTOOL_GCJ],
3634 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3635 ])# AC_LIBTOOL_GCJ
3636
3637
3638 # _LT_AC_LANG_GCJ
3639 # ---------------
3640 AC_DEFUN([_LT_AC_LANG_GCJ],
3641 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3642 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3643 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3644 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3645 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3646 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3647 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3648 ])# _LT_AC_LANG_GCJ
3649
3650
3651 # AC_LIBTOOL_RC
3652 # -------------
3653 # enable support for Windows resource files
3654 AC_DEFUN([AC_LIBTOOL_RC],
3655 [AC_REQUIRE([LT_AC_PROG_RC])
3656 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3657 ])# AC_LIBTOOL_RC
3658
3659
3660 # AC_LIBTOOL_LANG_C_CONFIG
3661 # ------------------------
3662 # Ensure that the configuration vars for the C compiler are
3663 # suitably defined. Those variables are subsequently used by
3664 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3665 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3666 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3667 [lt_save_CC="$CC"
3668 AC_LANG_PUSH(C)
3669
3670 # Source file extension for C test sources.
3671 ac_ext=c
3672
3673 # Object file extension for compiled C test sources.
3674 objext=o
3675 _LT_AC_TAGVAR(objext, $1)=$objext
3676
3677 # Code to be used in simple compile tests
3678 lt_simple_compile_test_code="int some_variable = 0;\n"
3679
3680 # Code to be used in simple link tests
3681 lt_simple_link_test_code='int main(){return(0);}\n'
3682
3683 _LT_AC_SYS_COMPILER
3684
3685 # save warnings/boilerplate of simple test code
3686 _LT_COMPILER_BOILERPLATE
3687 _LT_LINKER_BOILERPLATE
3688
3689 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3690 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3691 AC_LIBTOOL_PROG_CC_C_O($1)
3692 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3693 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3694 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3695 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3696 AC_LIBTOOL_SYS_LIB_STRIP
3697 AC_LIBTOOL_DLOPEN_SELF
3698
3699 # Report which library types will actually be built
3700 AC_MSG_CHECKING([if libtool supports shared libraries])
3701 AC_MSG_RESULT([$can_build_shared])
3702
3703 AC_MSG_CHECKING([whether to build shared libraries])
3704 test "$can_build_shared" = "no" && enable_shared=no
3705
3706 # On AIX, shared libraries and static libraries use the same namespace, and
3707 # are all built from PIC.
3708 case $host_os in
3709 aix3*)
3710 test "$enable_shared" = yes && enable_static=no
3711 if test -n "$RANLIB"; then
3712 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3713 postinstall_cmds='$RANLIB $lib'
3714 fi
3715 ;;
3716
3717 aix4* | aix5*)
3718 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3719 test "$enable_shared" = yes && enable_static=no
3720 fi
3721 ;;
3722 esac
3723 AC_MSG_RESULT([$enable_shared])
3724
3725 AC_MSG_CHECKING([whether to build static libraries])
3726 # Make sure either enable_shared or enable_static is yes.
3727 test "$enable_shared" = yes || enable_static=yes
3728 AC_MSG_RESULT([$enable_static])
3729
3730 AC_LIBTOOL_CONFIG($1)
3731
3732 AC_LANG_POP
3733 CC="$lt_save_CC"
3734 ])# AC_LIBTOOL_LANG_C_CONFIG
3735
3736
3737 # AC_LIBTOOL_LANG_CXX_CONFIG
3738 # --------------------------
3739 # Ensure that the configuration vars for the C compiler are
3740 # suitably defined. Those variables are subsequently used by
3741 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3742 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3743 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3744 [AC_LANG_PUSH(C++)
3745 AC_REQUIRE([AC_PROG_CXX])
3746 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3747
3748 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3749 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3750 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3751 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3752 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3753 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3754 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3755 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3756 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3757 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3758 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3759 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3760 _LT_AC_TAGVAR(module_cmds, $1)=
3761 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3762 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3763 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3764 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3765 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3766 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3767
3768 # Dependencies to place before and after the object being linked:
3769 _LT_AC_TAGVAR(predep_objects, $1)=
3770 _LT_AC_TAGVAR(postdep_objects, $1)=
3771 _LT_AC_TAGVAR(predeps, $1)=
3772 _LT_AC_TAGVAR(postdeps, $1)=
3773 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3774
3775 # Source file extension for C++ test sources.
3776 ac_ext=cpp
3777
3778 # Object file extension for compiled C++ test sources.
3779 objext=o
3780 _LT_AC_TAGVAR(objext, $1)=$objext
3781
3782 # Code to be used in simple compile tests
3783 lt_simple_compile_test_code="int some_variable = 0;\n"
3784
3785 # Code to be used in simple link tests
3786 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
3787
3788 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3789 _LT_AC_SYS_COMPILER
3790
3791 # save warnings/boilerplate of simple test code
3792 _LT_COMPILER_BOILERPLATE
3793 _LT_LINKER_BOILERPLATE
3794
3795 # Allow CC to be a program name with arguments.
3796 lt_save_CC=$CC
3797 lt_save_LD=$LD
3798 lt_save_GCC=$GCC
3799 GCC=$GXX
3800 lt_save_with_gnu_ld=$with_gnu_ld
3801 lt_save_path_LD=$lt_cv_path_LD
3802 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3803 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3804 else
3805 $as_unset lt_cv_prog_gnu_ld
3806 fi
3807 if test -n "${lt_cv_path_LDCXX+set}"; then
3808 lt_cv_path_LD=$lt_cv_path_LDCXX
3809 else
3810 $as_unset lt_cv_path_LD
3811 fi
3812 test -z "${LDCXX+set}" || LD=$LDCXX
3813 CC=${CXX-"c++"}
3814 compiler=$CC
3815 _LT_AC_TAGVAR(compiler, $1)=$CC
3816 _LT_CC_BASENAME([$compiler])
3817
3818 # We don't want -fno-exception wen compiling C++ code, so set the
3819 # no_builtin_flag separately
3820 if test "$GXX" = yes; then
3821 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3822 else
3823 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3824 fi
3825
3826 if test "$GXX" = yes; then
3827 # Set up default GNU C++ configuration
3828
3829 AC_PROG_LD
3830
3831 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3832 # archiving commands below assume that GNU ld is being used.
3833 if test "$with_gnu_ld" = yes; then
3834 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3835 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3836
3837 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3838 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3839
3840 # If archive_cmds runs LD, not CC, wlarc should be empty
3841 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3842 # investigate it a little bit more. (MM)
3843 wlarc='${wl}'
3844
3845 # ancient GNU ld didn't support --whole-archive et. al.
3846 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3847 grep 'no-whole-archive' > /dev/null; then
3848 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3849 else
3850 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3851 fi
3852 else
3853 with_gnu_ld=no
3854 wlarc=
3855
3856 # A generic and very simple default shared library creation
3857 # command for GNU C++ for the case where it uses the native
3858 # linker, instead of GNU ld. If possible, this setting should
3859 # overridden to take advantage of the native linker features on
3860 # the platform it is being used on.
3861 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3862 fi
3863
3864 # Commands to make compiler produce verbose output that lists
3865 # what "hidden" libraries, object files and flags are used when
3866 # linking a shared library.
3867 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3868
3869 else
3870 GXX=no
3871 with_gnu_ld=no
3872 wlarc=
3873 fi
3874
3875 # PORTME: fill in a description of your system's C++ link characteristics
3876 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3877 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3878 case $host_os in
3879 aix3*)
3880 # FIXME: insert proper C++ library support
3881 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3882 ;;
3883 aix4* | aix5*)
3884 if test "$host_cpu" = ia64; then
3885 # On IA64, the linker does run time linking by default, so we don't
3886 # have to do anything special.
3887 aix_use_runtimelinking=no
3888 exp_sym_flag='-Bexport'
3889 no_entry_flag=""
3890 else
3891 aix_use_runtimelinking=no
3892
3893 # Test if we are trying to use run time linking or normal
3894 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3895 # need to do runtime linking.
3896 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3897 for ld_flag in $LDFLAGS; do
3898 case $ld_flag in
3899 *-brtl*)
3900 aix_use_runtimelinking=yes
3901 break
3902 ;;
3903 esac
3904 done
3905 ;;
3906 esac
3907
3908 exp_sym_flag='-bexport'
3909 no_entry_flag='-bnoentry'
3910 fi
3911
3912 # When large executables or shared objects are built, AIX ld can
3913 # have problems creating the table of contents. If linking a library
3914 # or program results in "error TOC overflow" add -mminimal-toc to
3915 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3916 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3917
3918 _LT_AC_TAGVAR(archive_cmds, $1)=''
3919 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3920 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3921 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3922
3923 if test "$GXX" = yes; then
3924 case $host_os in aix4.[[012]]|aix4.[[012]].*)
3925 # We only want to do this on AIX 4.2 and lower, the check
3926 # below for broken collect2 doesn't work under 4.3+
3927 collect2name=`${CC} -print-prog-name=collect2`
3928 if test -f "$collect2name" && \
3929 strings "$collect2name" | grep resolve_lib_name >/dev/null
3930 then
3931 # We have reworked collect2
3932 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3933 else
3934 # We have old collect2
3935 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3936 # It fails to find uninstalled libraries when the uninstalled
3937 # path is not listed in the libpath. Setting hardcode_minus_L
3938 # to unsupported forces relinking
3939 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3940 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3941 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3942 fi
3943 ;;
3944 esac
3945 shared_flag='-shared'
3946 if test "$aix_use_runtimelinking" = yes; then
3947 shared_flag="$shared_flag "'${wl}-G'
3948 fi
3949 else
3950 # not using gcc
3951 if test "$host_cpu" = ia64; then
3952 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3953 # chokes on -Wl,-G. The following line is correct:
3954 shared_flag='-G'
3955 else
3956 if test "$aix_use_runtimelinking" = yes; then
3957 shared_flag='${wl}-G'
3958 else
3959 shared_flag='${wl}-bM:SRE'
3960 fi
3961 fi
3962 fi
3963
3964 # It seems that -bexpall does not export symbols beginning with
3965 # underscore (_), so it is better to generate a list of symbols to export.
3966 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3967 if test "$aix_use_runtimelinking" = yes; then
3968 # Warning - without using the other runtime loading flags (-brtl),
3969 # -berok will link without error, but may produce a broken library.
3970 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3971 # Determine the default libpath from the value encoded in an empty executable.
3972 _LT_AC_SYS_LIBPATH_AIX
3973 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3974
3975 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3976 else
3977 if test "$host_cpu" = ia64; then
3978 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3979 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3980 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
3981 else
3982 # Determine the default libpath from the value encoded in an empty executable.
3983 _LT_AC_SYS_LIBPATH_AIX
3984 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3985 # Warning - without using the other run time loading flags,
3986 # -berok will link without error, but may produce a broken library.
3987 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3988 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3989 # Exported symbols can be pulled into shared objects from archives
3990 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3991 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3992 # This is similar to how AIX traditionally builds its shared libraries.
3993 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3994 fi
3995 fi
3996 ;;
3997
3998 beos*)
3999 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4000 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4001 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4002 # support --undefined. This deserves some investigation. FIXME
4003 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4004 else
4005 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4006 fi
4007 ;;
4008
4009 chorus*)
4010 case $cc_basename in
4011 *)
4012 # FIXME: insert proper C++ library support
4013 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4014 ;;
4015 esac
4016 ;;
4017
4018 cygwin* | mingw* | pw32*)
4019 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4020 # as there is no search path for DLLs.
4021 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4022 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4023 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4024 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4025
4026 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4027 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4028 # If the export-symbols file already is a .def file (1st line
4029 # is EXPORTS), use it as is; otherwise, prepend...
4030 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4031 cp $export_symbols $output_objdir/$soname.def;
4032 else
4033 echo EXPORTS > $output_objdir/$soname.def;
4034 cat $export_symbols >> $output_objdir/$soname.def;
4035 fi~
4036 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4037 else
4038 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4039 fi
4040 ;;
4041 darwin* | rhapsody*)
4042 case $host_os in
4043 rhapsody* | darwin1.[[012]])
4044 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4045 ;;
4046 *) # Darwin 1.3 on
4047 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4048 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4049 else
4050 case ${MACOSX_DEPLOYMENT_TARGET} in
4051 10.[[012]])
4052 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4053 ;;
4054 10.*)
4055 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4056 ;;
4057 esac
4058 fi
4059 ;;
4060 esac
4061 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4062 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4063 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4064 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4065 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4066 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4067
4068 if test "$GXX" = yes ; then
4069 lt_int_apple_cc_single_mod=no
4070 output_verbose_link_cmd='echo'
4071 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
4072 lt_int_apple_cc_single_mod=yes
4073 fi
4074 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4075 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4076 else
4077 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4078 fi
4079 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4080 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4081 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4082 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4083 else
4084 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4085 fi
4086 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4087 else
4088 case $cc_basename in
4089 xlc*)
4090 output_verbose_link_cmd='echo'
4091 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
4092 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4093 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4094 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4095 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4096 ;;
4097 *)
4098 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4099 ;;
4100 esac
4101 fi
4102 ;;
4103
4104 dgux*)
4105 case $cc_basename in
4106 ec++*)
4107 # FIXME: insert proper C++ library support
4108 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4109 ;;
4110 ghcx*)
4111 # Green Hills C++ Compiler
4112 # FIXME: insert proper C++ library support
4113 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4114 ;;
4115 *)
4116 # FIXME: insert proper C++ library support
4117 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4118 ;;
4119 esac
4120 ;;
4121 freebsd[[12]]*)
4122 # C++ shared libraries reported to be fairly broken before switch to ELF
4123 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4124 ;;
4125 freebsd-elf*)
4126 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4127 ;;
4128 freebsd* | kfreebsd*-gnu | dragonfly*)
4129 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4130 # conventions
4131 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4132 ;;
4133 gnu*)
4134 ;;
4135 hpux9*)
4136 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4137 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4138 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4139 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4140 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4141 # but as the default
4142 # location of the library.
4143
4144 case $cc_basename in
4145 CC*)
4146 # FIXME: insert proper C++ library support
4147 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4148 ;;
4149 aCC*)
4150 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4151 # Commands to make compiler produce verbose output that lists
4152 # what "hidden" libraries, object files and flags are used when
4153 # linking a shared library.
4154 #
4155 # There doesn't appear to be a way to prevent this compiler from
4156 # explicitly linking system object files so we need to strip them
4157 # from the output so that they don't get included in the library
4158 # dependencies.
4159 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4160 ;;
4161 *)
4162 if test "$GXX" = yes; then
4163 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4164 else
4165 # FIXME: insert proper C++ library support
4166 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4167 fi
4168 ;;
4169 esac
4170 ;;
4171 hpux10*|hpux11*)
4172 if test $with_gnu_ld = no; then
4173 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4174 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4175
4176 case $host_cpu in
4177 hppa*64*|ia64*)
4178 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4179 ;;
4180 *)
4181 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4182 ;;
4183 esac
4184 fi
4185 case $host_cpu in
4186 hppa*64*|ia64*)
4187 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4188 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4189 ;;
4190 *)
4191 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4192 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4193 # but as the default
4194 # location of the library.
4195 ;;
4196 esac
4197
4198 case $cc_basename in
4199 CC*)
4200 # FIXME: insert proper C++ library support
4201 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4202 ;;
4203 aCC*)
4204 case $host_cpu in
4205 hppa*64*)
4206 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4207 ;;
4208 ia64*)
4209 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4210 ;;
4211 *)
4212 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4213 ;;
4214 esac
4215 # Commands to make compiler produce verbose output that lists
4216 # what "hidden" libraries, object files and flags are used when
4217 # linking a shared library.
4218 #
4219 # There doesn't appear to be a way to prevent this compiler from
4220 # explicitly linking system object files so we need to strip them
4221 # from the output so that they don't get included in the library
4222 # dependencies.
4223 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4224 ;;
4225 *)
4226 if test "$GXX" = yes; then
4227 if test $with_gnu_ld = no; then
4228 case $host_cpu in
4229 hppa*64*)
4230 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4231 ;;
4232 ia64*)
4233 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4234 ;;
4235 *)
4236 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4237 ;;
4238 esac
4239 fi
4240 else
4241 # FIXME: insert proper C++ library support
4242 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4243 fi
4244 ;;
4245 esac
4246 ;;
4247 interix3*)
4248 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4249 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4250 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4251 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4252 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4253 # Instead, shared libraries are loaded at an image base (0x10000000 by
4254 # default) and relocated if they conflict, which is a slow very memory
4255 # consuming and fragmenting process. To avoid this, we pick a random,
4256 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4257 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4258 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4259 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4260 ;;
4261 irix5* | irix6*)
4262 case $cc_basename in
4263 CC*)
4264 # SGI C++
4265 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4266
4267 # Archives containing C++ object files must be created using
4268 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
4269 # necessary to make sure instantiated templates are included
4270 # in the archive.
4271 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4272 ;;
4273 *)
4274 if test "$GXX" = yes; then
4275 if test "$with_gnu_ld" = no; then
4276 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4277 else
4278 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4279 fi
4280 fi
4281 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4282 ;;
4283 esac
4284 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4285 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4286 ;;
4287 linux*)
4288 case $cc_basename in
4289 KCC*)
4290 # Kuck and Associates, Inc. (KAI) C++ Compiler
4291
4292 # KCC will only create a shared library if the output file
4293 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4294 # to its proper name (with version) after linking.
4295 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4296 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
4297 # Commands to make compiler produce verbose output that lists
4298 # what "hidden" libraries, object files and flags are used when
4299 # linking a shared library.
4300 #
4301 # There doesn't appear to be a way to prevent this compiler from
4302 # explicitly linking system object files so we need to strip them
4303 # from the output so that they don't get included in the library
4304 # dependencies.
4305 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4306
4307 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4308 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4309
4310 # Archives containing C++ object files must be created using
4311 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4312 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4313 ;;
4314 icpc*)
4315 # Intel C++
4316 with_gnu_ld=yes
4317 # version 8.0 and above of icpc choke on multiply defined symbols
4318 # if we add $predep_objects and $postdep_objects, however 7.1 and
4319 # earlier do not add the objects themselves.
4320 case `$CC -V 2>&1` in
4321 *"Version 7."*)
4322 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4323 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4324 ;;
4325 *) # Version 8.0 or newer
4326 tmp_idyn=
4327 case $host_cpu in
4328 ia64*) tmp_idyn=' -i_dynamic';;
4329 esac
4330 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4331 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4332 ;;
4333 esac
4334 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4335 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4336 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4337 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4338 ;;
4339 pgCC*)
4340 # Portland Group C++ compiler
4341 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4342 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
4343
4344 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4345 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4346 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4347 ;;
4348 cxx*)
4349 # Compaq C++
4350 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4351 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
4352
4353 runpath_var=LD_RUN_PATH
4354 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4355 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4356
4357 # Commands to make compiler produce verbose output that lists
4358 # what "hidden" libraries, object files and flags are used when
4359 # linking a shared library.
4360 #
4361 # There doesn't appear to be a way to prevent this compiler from
4362 # explicitly linking system object files so we need to strip them
4363 # from the output so that they don't get included in the library
4364 # dependencies.
4365 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4366 ;;
4367 esac
4368 ;;
4369 lynxos*)
4370 # FIXME: insert proper C++ library support
4371 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4372 ;;
4373 m88k*)
4374 # FIXME: insert proper C++ library support
4375 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4376 ;;
4377 mvs*)
4378 case $cc_basename in
4379 cxx*)
4380 # FIXME: insert proper C++ library support
4381 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4382 ;;
4383 *)
4384 # FIXME: insert proper C++ library support
4385 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4386 ;;
4387 esac
4388 ;;
4389 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
4390 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4391 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4392 wlarc=
4393 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4394 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4395 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4396 fi
4397 # Workaround some broken pre-1.5 toolchains
4398 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4399 ;;
4400 openbsd2*)
4401 # C++ shared libraries are fairly broken
4402 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4403 ;;
4404 openbsd*)
4405 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4406 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4407 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4408 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4409 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4410 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
4411 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4412 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4413 fi
4414 output_verbose_link_cmd='echo'
4415 ;;
4416 osf3*)
4417 case $cc_basename in
4418 KCC*)
4419 # Kuck and Associates, Inc. (KAI) C++ Compiler
4420
4421 # KCC will only create a shared library if the output file
4422 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4423 # to its proper name (with version) after linking.
4424 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4425
4426 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4427 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4428
4429 # Archives containing C++ object files must be created using
4430 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4431 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4432
4433 ;;
4434 RCC*)
4435 # Rational C++ 2.4.1
4436 # FIXME: insert proper C++ library support
4437 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4438 ;;
4439 cxx*)
4440 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4441 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4442
4443 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4444 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4445
4446 # Commands to make compiler produce verbose output that lists
4447 # what "hidden" libraries, object files and flags are used when
4448 # linking a shared library.
4449 #
4450 # There doesn't appear to be a way to prevent this compiler from
4451 # explicitly linking system object files so we need to strip them
4452 # from the output so that they don't get included in the library
4453 # dependencies.
4454 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4455 ;;
4456 *)
4457 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4458 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4459 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4460
4461 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4462 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4463
4464 # Commands to make compiler produce verbose output that lists
4465 # what "hidden" libraries, object files and flags are used when
4466 # linking a shared library.
4467 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4468
4469 else
4470 # FIXME: insert proper C++ library support
4471 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4472 fi
4473 ;;
4474 esac
4475 ;;
4476 osf4* | osf5*)
4477 case $cc_basename in
4478 KCC*)
4479 # Kuck and Associates, Inc. (KAI) C++ Compiler
4480
4481 # KCC will only create a shared library if the output file
4482 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4483 # to its proper name (with version) after linking.
4484 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4485
4486 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4487 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4488
4489 # Archives containing C++ object files must be created using
4490 # the KAI C++ compiler.
4491 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4492 ;;
4493 RCC*)
4494 # Rational C++ 2.4.1
4495 # FIXME: insert proper C++ library support
4496 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4497 ;;
4498 cxx*)
4499 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4500 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4501 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4502 echo "-hidden">> $lib.exp~
4503 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
4504 $rm $lib.exp'
4505
4506 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4507 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4508
4509 # Commands to make compiler produce verbose output that lists
4510 # what "hidden" libraries, object files and flags are used when
4511 # linking a shared library.
4512 #
4513 # There doesn't appear to be a way to prevent this compiler from
4514 # explicitly linking system object files so we need to strip them
4515 # from the output so that they don't get included in the library
4516 # dependencies.
4517 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4518 ;;
4519 *)
4520 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4521 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4522 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4523
4524 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4525 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4526
4527 # Commands to make compiler produce verbose output that lists
4528 # what "hidden" libraries, object files and flags are used when
4529 # linking a shared library.
4530 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4531
4532 else
4533 # FIXME: insert proper C++ library support
4534 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4535 fi
4536 ;;
4537 esac
4538 ;;
4539 psos*)
4540 # FIXME: insert proper C++ library support
4541 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4542 ;;
4543 sunos4*)
4544 case $cc_basename in
4545 CC*)
4546 # Sun C++ 4.x
4547 # FIXME: insert proper C++ library support
4548 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4549 ;;
4550 lcc*)
4551 # Lucid
4552 # FIXME: insert proper C++ library support
4553 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4554 ;;
4555 *)
4556 # FIXME: insert proper C++ library support
4557 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4558 ;;
4559 esac
4560 ;;
4561 solaris*)
4562 case $cc_basename in
4563 CC*)
4564 # Sun C++ 4.2, 5.x and Centerline C++
4565 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
4566 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4567 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4568 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4569 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4570
4571 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4572 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4573 case $host_os in
4574 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4575 *)
4576 # The C++ compiler is used as linker so we must use $wl
4577 # flag to pass the commands to the underlying system
4578 # linker. We must also pass each convience library through
4579 # to the system linker between allextract/defaultextract.
4580 # The C++ compiler will combine linker options so we
4581 # cannot just pass the convience library names through
4582 # without $wl.
4583 # Supported since Solaris 2.6 (maybe 2.5.1?)
4584 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
4585 ;;
4586 esac
4587 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4588
4589 output_verbose_link_cmd='echo'
4590
4591 # Archives containing C++ object files must be created using
4592 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4593 # necessary to make sure instantiated templates are included
4594 # in the archive.
4595 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4596 ;;
4597 gcx*)
4598 # Green Hills C++ Compiler
4599 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4600
4601 # The C++ compiler must be used to create the archive.
4602 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4603 ;;
4604 *)
4605 # GNU C++ compiler with Solaris linker
4606 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4607 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4608 if $CC --version | grep -v '^2\.7' > /dev/null; then
4609 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4610 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4611 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4612
4613 # Commands to make compiler produce verbose output that lists
4614 # what "hidden" libraries, object files and flags are used when
4615 # linking a shared library.
4616 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4617 else
4618 # g++ 2.7 appears to require `-G' NOT `-shared' on this
4619 # platform.
4620 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4621 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4622 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4623
4624 # Commands to make compiler produce verbose output that lists
4625 # what "hidden" libraries, object files and flags are used when
4626 # linking a shared library.
4627 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4628 fi
4629
4630 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4631 fi
4632 ;;
4633 esac
4634 ;;
4635 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4636 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4637 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4638 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4639 runpath_var='LD_RUN_PATH'
4640
4641 case $cc_basename in
4642 CC*)
4643 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4644 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4645 ;;
4646 *)
4647 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4648 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4649 ;;
4650 esac
4651 ;;
4652 sysv5* | sco3.2v5* | sco5v6*)
4653 # Note: We can NOT use -z defs as we might desire, because we do not
4654 # link with -lc, and that would cause any symbols used from libc to
4655 # always be unresolved, which means just about no library would
4656 # ever link correctly. If we're not using GNU ld we use -z text
4657 # though, which does catch some bad symbols but isn't as heavy-handed
4658 # as -z defs.
4659 # For security reasons, it is highly recommended that you always
4660 # use absolute paths for naming shared libraries, and exclude the
4661 # DT_RUNPATH tag from executables and libraries. But doing so
4662 # requires that you compile everything twice, which is a pain.
4663 # So that behaviour is only enabled if SCOABSPATH is set to a
4664 # non-empty value in the environment. Most likely only useful for
4665 # creating official distributions of packages.
4666 # This is a hack until libtool officially supports absolute path
4667 # names for shared libraries.
4668 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4669 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4670 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4671 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4672 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4673 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4674 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4675 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4676 runpath_var='LD_RUN_PATH'
4677
4678 case $cc_basename in
4679 CC*)
4680 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4681 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4682 ;;
4683 *)
4684 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4685 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4686 ;;
4687 esac
4688 ;;
4689 tandem*)
4690 case $cc_basename in
4691 NCC*)
4692 # NonStop-UX NCC 3.20
4693 # FIXME: insert proper C++ library support
4694 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4695 ;;
4696 *)
4697 # FIXME: insert proper C++ library support
4698 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4699 ;;
4700 esac
4701 ;;
4702 vxworks*)
4703 # FIXME: insert proper C++ library support
4704 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4705 ;;
4706 *)
4707 # FIXME: insert proper C++ library support
4708 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4709 ;;
4710 esac
4711 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4712 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4713
4714 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4715 _LT_AC_TAGVAR(LD, $1)="$LD"
4716
4717 AC_LIBTOOL_POSTDEP_PREDEP($1)
4718 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4719 AC_LIBTOOL_PROG_CC_C_O($1)
4720 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4721 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4722 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4723 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4724
4725 AC_LIBTOOL_CONFIG($1)
4726
4727 AC_LANG_POP
4728 CC=$lt_save_CC
4729 LDCXX=$LD
4730 LD=$lt_save_LD
4731 GCC=$lt_save_GCC
4732 with_gnu_ldcxx=$with_gnu_ld
4733 with_gnu_ld=$lt_save_with_gnu_ld
4734 lt_cv_path_LDCXX=$lt_cv_path_LD
4735 lt_cv_path_LD=$lt_save_path_LD
4736 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4737 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4738 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4739
4740 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4741 # ------------------------------------
4742 # Figure out "hidden" library dependencies from verbose
4743 # compiler output when linking a shared library.
4744 # Parse the compiler output and extract the necessary
4745 # objects, libraries and library flags.
4746 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4747 dnl we can't use the lt_simple_compile_test_code here,
4748 dnl because it contains code intended for an executable,
4749 dnl not a library. It's possible we should let each
4750 dnl tag define a new lt_????_link_test_code variable,
4751 dnl but it's only used here...
4752 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4753 int a;
4754 void foo (void) { a = 0; }
4755 EOF
4756 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4757 class Foo
4758 {
4759 public:
4760 Foo (void) { a = 0; }
4761 private:
4762 int a;
4763 };
4764 EOF
4765 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4766 subroutine foo
4767 implicit none
4768 integer*4 a
4769 a=0
4770 return
4771 end
4772 EOF
4773 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4774 public class foo {
4775 private int a;
4776 public void bar (void) {
4777 a = 0;
4778 }
4779 };
4780 EOF
4781 ])
4782 dnl Parse the compiler output and extract the necessary
4783 dnl objects, libraries and library flags.
4784 if AC_TRY_EVAL(ac_compile); then
4785 # Parse the compiler output and extract the necessary
4786 # objects, libraries and library flags.
4787
4788 # Sentinel used to keep track of whether or not we are before
4789 # the conftest object file.
4790 pre_test_object_deps_done=no
4791
4792 # The `*' in the case matches for architectures that use `case' in
4793 # $output_verbose_cmd can trigger glob expansion during the loop
4794 # eval without this substitution.
4795 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4796
4797 for p in `eval $output_verbose_link_cmd`; do
4798 case $p in
4799
4800 -L* | -R* | -l*)
4801 # Some compilers place space between "-{L,R}" and the path.
4802 # Remove the space.
4803 if test $p = "-L" \
4804 || test $p = "-R"; then
4805 prev=$p
4806 continue
4807 else
4808 prev=
4809 fi
4810
4811 if test "$pre_test_object_deps_done" = no; then
4812 case $p in
4813 -L* | -R*)
4814 # Internal compiler library paths should come after those
4815 # provided the user. The postdeps already come after the
4816 # user supplied libs so there is no need to process them.
4817 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4818 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4819 else
4820 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4821 fi
4822 ;;
4823 # The "-l" case would never come before the object being
4824 # linked, so don't bother handling this case.
4825 esac
4826 else
4827 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4828 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4829 else
4830 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4831 fi
4832 fi
4833 ;;
4834
4835 *.$objext)
4836 # This assumes that the test object file only shows up
4837 # once in the compiler output.
4838 if test "$p" = "conftest.$objext"; then
4839 pre_test_object_deps_done=yes
4840 continue
4841 fi
4842
4843 if test "$pre_test_object_deps_done" = no; then
4844 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4845 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4846 else
4847 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4848 fi
4849 else
4850 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4851 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4852 else
4853 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4854 fi
4855 fi
4856 ;;
4857
4858 *) ;; # Ignore the rest.
4859
4860 esac
4861 done
4862
4863 # Clean up.
4864 rm -f a.out a.exe
4865 else
4866 echo "libtool.m4: error: problem compiling $1 test program"
4867 fi
4868
4869 $rm -f confest.$objext
4870
4871 # PORTME: override above test on systems where it is broken
4872 ifelse([$1],[CXX],
4873 [case $host_os in
4874 interix3*)
4875 # Interix 3.5 installs completely hosed .la files for C++, so rather than
4876 # hack all around it, let's just trust "g++" to DTRT.
4877 _LT_AC_TAGVAR(predep_objects,$1)=
4878 _LT_AC_TAGVAR(postdep_objects,$1)=
4879 _LT_AC_TAGVAR(postdeps,$1)=
4880 ;;
4881
4882 solaris*)
4883 case $cc_basename in
4884 CC*)
4885 # Adding this requires a known-good setup of shared libraries for
4886 # Sun compiler versions before 5.6, else PIC objects from an old
4887 # archive will be linked into the output, leading to subtle bugs.
4888 _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
4889 ;;
4890 esac
4891 ;;
4892 esac
4893 ])
4894
4895 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4896 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4897 esac
4898 ])# AC_LIBTOOL_POSTDEP_PREDEP
4899
4900 # AC_LIBTOOL_LANG_F77_CONFIG
4901 # --------------------------
4902 # Ensure that the configuration vars for the C compiler are
4903 # suitably defined. Those variables are subsequently used by
4904 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4905 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4906 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4907 [AC_REQUIRE([AC_PROG_F77])
4908 AC_LANG_PUSH(Fortran 77)
4909
4910 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4911 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4912 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4913 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4914 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4915 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4916 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4917 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4918 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4919 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4920 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4921 _LT_AC_TAGVAR(module_cmds, $1)=
4922 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4923 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4924 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4925 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4926 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4927 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4928
4929 # Source file extension for f77 test sources.
4930 ac_ext=f
4931
4932 # Object file extension for compiled f77 test sources.
4933 objext=o
4934 _LT_AC_TAGVAR(objext, $1)=$objext
4935
4936 # Code to be used in simple compile tests
4937 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4938
4939 # Code to be used in simple link tests
4940 lt_simple_link_test_code=" program t\n end\n"
4941
4942 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4943 _LT_AC_SYS_COMPILER
4944
4945 # save warnings/boilerplate of simple test code
4946 _LT_COMPILER_BOILERPLATE
4947 _LT_LINKER_BOILERPLATE
4948
4949 # Allow CC to be a program name with arguments.
4950 lt_save_CC="$CC"
4951 CC=${F77-"f77"}
4952 compiler=$CC
4953 _LT_AC_TAGVAR(compiler, $1)=$CC
4954 _LT_CC_BASENAME([$compiler])
4955
4956 AC_MSG_CHECKING([if libtool supports shared libraries])
4957 AC_MSG_RESULT([$can_build_shared])
4958
4959 AC_MSG_CHECKING([whether to build shared libraries])
4960 test "$can_build_shared" = "no" && enable_shared=no
4961
4962 # On AIX, shared libraries and static libraries use the same namespace, and
4963 # are all built from PIC.
4964 case $host_os in
4965 aix3*)
4966 test "$enable_shared" = yes && enable_static=no
4967 if test -n "$RANLIB"; then
4968 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4969 postinstall_cmds='$RANLIB $lib'
4970 fi
4971 ;;
4972 aix4* | aix5*)
4973 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4974 test "$enable_shared" = yes && enable_static=no
4975 fi
4976 ;;
4977 esac
4978 AC_MSG_RESULT([$enable_shared])
4979
4980 AC_MSG_CHECKING([whether to build static libraries])
4981 # Make sure either enable_shared or enable_static is yes.
4982 test "$enable_shared" = yes || enable_static=yes
4983 AC_MSG_RESULT([$enable_static])
4984
4985 _LT_AC_TAGVAR(GCC, $1)="$G77"
4986 _LT_AC_TAGVAR(LD, $1)="$LD"
4987
4988 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4989 AC_LIBTOOL_PROG_CC_C_O($1)
4990 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4991 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4992 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4993 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4994
4995 AC_LIBTOOL_CONFIG($1)
4996
4997 AC_LANG_POP
4998 CC="$lt_save_CC"
4999 ])# AC_LIBTOOL_LANG_F77_CONFIG
5000
5001
5002 # AC_LIBTOOL_LANG_GCJ_CONFIG
5003 # --------------------------
5004 # Ensure that the configuration vars for the C compiler are
5005 # suitably defined. Those variables are subsequently used by
5006 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5007 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5008 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5009 [AC_LANG_SAVE
5010
5011 # Source file extension for Java test sources.
5012 ac_ext=java
5013
5014 # Object file extension for compiled Java test sources.
5015 objext=o
5016 _LT_AC_TAGVAR(objext, $1)=$objext
5017
5018 # Code to be used in simple compile tests
5019 lt_simple_compile_test_code="class foo {}\n"
5020
5021 # Code to be used in simple link tests
5022 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
5023
5024 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5025 _LT_AC_SYS_COMPILER
5026
5027 # save warnings/boilerplate of simple test code
5028 _LT_COMPILER_BOILERPLATE
5029 _LT_LINKER_BOILERPLATE
5030
5031 # Allow CC to be a program name with arguments.
5032 lt_save_CC="$CC"
5033 CC=${GCJ-"gcj"}
5034 compiler=$CC
5035 _LT_AC_TAGVAR(compiler, $1)=$CC
5036 _LT_CC_BASENAME([$compiler])
5037
5038 # GCJ did not exist at the time GCC didn't implicitly link libc in.
5039 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5040
5041 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5042
5043 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5044 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5045 AC_LIBTOOL_PROG_CC_C_O($1)
5046 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5047 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5048 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5049 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5050
5051 AC_LIBTOOL_CONFIG($1)
5052
5053 AC_LANG_RESTORE
5054 CC="$lt_save_CC"
5055 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
5056
5057
5058 # AC_LIBTOOL_LANG_RC_CONFIG
5059 # -------------------------
5060 # Ensure that the configuration vars for the Windows resource compiler are
5061 # suitably defined. Those variables are subsequently used by
5062 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5063 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5064 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5065 [AC_LANG_SAVE
5066
5067 # Source file extension for RC test sources.
5068 ac_ext=rc
5069
5070 # Object file extension for compiled RC test sources.
5071 objext=o
5072 _LT_AC_TAGVAR(objext, $1)=$objext
5073
5074 # Code to be used in simple compile tests
5075 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
5076
5077 # Code to be used in simple link tests
5078 lt_simple_link_test_code="$lt_simple_compile_test_code"
5079
5080 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5081 _LT_AC_SYS_COMPILER
5082
5083 # save warnings/boilerplate of simple test code
5084 _LT_COMPILER_BOILERPLATE
5085 _LT_LINKER_BOILERPLATE
5086
5087 # Allow CC to be a program name with arguments.
5088 lt_save_CC="$CC"
5089 CC=${RC-"windres"}
5090 compiler=$CC
5091 _LT_AC_TAGVAR(compiler, $1)=$CC
5092 _LT_CC_BASENAME([$compiler])
5093 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5094
5095 AC_LIBTOOL_CONFIG($1)
5096
5097 AC_LANG_RESTORE
5098 CC="$lt_save_CC"
5099 ])# AC_LIBTOOL_LANG_RC_CONFIG
5100
5101
5102 # AC_LIBTOOL_CONFIG([TAGNAME])
5103 # ----------------------------
5104 # If TAGNAME is not passed, then create an initial libtool script
5105 # with a default configuration from the untagged config vars. Otherwise
5106 # add code to config.status for appending the configuration named by
5107 # TAGNAME from the matching tagged config vars.
5108 AC_DEFUN([AC_LIBTOOL_CONFIG],
5109 [# The else clause should only fire when bootstrapping the
5110 # libtool distribution, otherwise you forgot to ship ltmain.sh
5111 # with your package, and you will get complaints that there are
5112 # no rules to generate ltmain.sh.
5113 if test -f "$ltmain"; then
5114 # See if we are running on zsh, and set the options which allow our commands through
5115 # without removal of \ escapes.
5116 if test -n "${ZSH_VERSION+set}" ; then
5117 setopt NO_GLOB_SUBST
5118 fi
5119 # Now quote all the things that may contain metacharacters while being
5120 # careful not to overquote the AC_SUBSTed values. We take copies of the
5121 # variables and quote the copies for generation of the libtool script.
5122 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
5123 SED SHELL STRIP \
5124 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5125 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5126 deplibs_check_method reload_flag reload_cmds need_locks \
5127 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5128 lt_cv_sys_global_symbol_to_c_name_address \
5129 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5130 old_postinstall_cmds old_postuninstall_cmds \
5131 _LT_AC_TAGVAR(compiler, $1) \
5132 _LT_AC_TAGVAR(CC, $1) \
5133 _LT_AC_TAGVAR(LD, $1) \
5134 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5135 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5136 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5137 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5138 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5139 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5140 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5141 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5142 _LT_AC_TAGVAR(old_archive_cmds, $1) \
5143 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5144 _LT_AC_TAGVAR(predep_objects, $1) \
5145 _LT_AC_TAGVAR(postdep_objects, $1) \
5146 _LT_AC_TAGVAR(predeps, $1) \
5147 _LT_AC_TAGVAR(postdeps, $1) \
5148 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5149 _LT_AC_TAGVAR(archive_cmds, $1) \
5150 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5151 _LT_AC_TAGVAR(postinstall_cmds, $1) \
5152 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5153 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5154 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5155 _LT_AC_TAGVAR(no_undefined_flag, $1) \
5156 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5157 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5158 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5159 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5160 _LT_AC_TAGVAR(hardcode_automatic, $1) \
5161 _LT_AC_TAGVAR(module_cmds, $1) \
5162 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5163 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5164 _LT_AC_TAGVAR(exclude_expsyms, $1) \
5165 _LT_AC_TAGVAR(include_expsyms, $1); do
5166
5167 case $var in
5168 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5169 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5170 _LT_AC_TAGVAR(archive_cmds, $1) | \
5171 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5172 _LT_AC_TAGVAR(module_cmds, $1) | \
5173 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5174 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5175 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5176 extract_expsyms_cmds | reload_cmds | finish_cmds | \
5177 postinstall_cmds | postuninstall_cmds | \
5178 old_postinstall_cmds | old_postuninstall_cmds | \
5179 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5180 # Double-quote double-evaled strings.
5181 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5182 ;;
5183 *)
5184 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5185 ;;
5186 esac
5187 done
5188
5189 case $lt_echo in
5190 *'\[$]0 --fallback-echo"')
5191 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5192 ;;
5193 esac
5194
5195 ifelse([$1], [],
5196 [cfgfile="${ofile}T"
5197 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5198 $rm -f "$cfgfile"
5199 AC_MSG_NOTICE([creating $ofile])],
5200 [cfgfile="$ofile"])
5201
5202 cat <<__EOF__ >> "$cfgfile"
5203 ifelse([$1], [],
5204 [#! $SHELL
5205
5206 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5207 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5208 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
5209 #
5210 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5211 # Free Software Foundation, Inc.
5212 #
5213 # This file is part of GNU Libtool:
5214 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5215 #
5216 # This program is free software; you can redistribute it and/or modify
5217 # it under the terms of the GNU General Public License as published by
5218 # the Free Software Foundation; either version 2 of the License, or
5219 # (at your option) any later version.
5220 #
5221 # This program is distributed in the hope that it will be useful, but
5222 # WITHOUT ANY WARRANTY; without even the implied warranty of
5223 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5224 # General Public License for more details.
5225 #
5226 # You should have received a copy of the GNU General Public License
5227 # along with this program; if not, write to the Free Software
5228 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5229 #
5230 # As a special exception to the GNU General Public License, if you
5231 # distribute this file as part of a program that contains a
5232 # configuration script generated by Autoconf, you may include it under
5233 # the same distribution terms that you use for the rest of that program.
5234
5235 # A sed program that does not truncate output.
5236 SED=$lt_SED
5237
5238 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
5239 Xsed="$SED -e 1s/^X//"
5240
5241 # The HP-UX ksh and POSIX shell print the target directory to stdout
5242 # if CDPATH is set.
5243 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5244
5245 # The names of the tagged configurations supported by this script.
5246 available_tags=
5247
5248 # ### BEGIN LIBTOOL CONFIG],
5249 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5250
5251 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5252
5253 # Shell to use when invoking shell scripts.
5254 SHELL=$lt_SHELL
5255
5256 # Whether or not to build shared libraries.
5257 build_libtool_libs=$enable_shared
5258
5259 # Whether or not to build static libraries.
5260 build_old_libs=$enable_static
5261
5262 # Whether or not to add -lc for building shared libraries.
5263 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5264
5265 # Whether or not to disallow shared libs when runtime libs are static
5266 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5267
5268 # Whether or not to optimize for fast installation.
5269 fast_install=$enable_fast_install
5270
5271 # The host system.
5272 host_alias=$host_alias
5273 host=$host
5274 host_os=$host_os
5275
5276 # The build system.
5277 build_alias=$build_alias
5278 build=$build
5279 build_os=$build_os
5280
5281 # An echo program that does not interpret backslashes.
5282 echo=$lt_echo
5283
5284 # The archiver.
5285 AR=$lt_AR
5286 AR_FLAGS=$lt_AR_FLAGS
5287
5288 # A C compiler.
5289 LTCC=$lt_LTCC
5290
5291 # LTCC compiler flags.
5292 LTCFLAGS=$lt_LTCFLAGS
5293
5294 # A language-specific compiler.
5295 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5296
5297 # Is the compiler the GNU C compiler?
5298 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5299
5300 # An ERE matcher.
5301 EGREP=$lt_EGREP
5302
5303 # The linker used to build libraries.
5304 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5305
5306 # Whether we need hard or soft links.
5307 LN_S=$lt_LN_S
5308
5309 # A BSD-compatible nm program.
5310 NM=$lt_NM
5311
5312 # A symbol stripping program
5313 STRIP=$lt_STRIP
5314
5315 # Used to examine libraries when file_magic_cmd begins "file"
5316 MAGIC_CMD=$MAGIC_CMD
5317
5318 # Used on cygwin: DLL creation program.
5319 DLLTOOL="$DLLTOOL"
5320
5321 # Used on cygwin: object dumper.
5322 OBJDUMP="$OBJDUMP"
5323
5324 # Used on cygwin: assembler.
5325 AS="$AS"
5326
5327 # The name of the directory that contains temporary libtool files.
5328 objdir=$objdir
5329
5330 # How to create reloadable object files.
5331 reload_flag=$lt_reload_flag
5332 reload_cmds=$lt_reload_cmds
5333
5334 # How to pass a linker flag through the compiler.
5335 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5336
5337 # Object file suffix (normally "o").
5338 objext="$ac_objext"
5339
5340 # Old archive suffix (normally "a").
5341 libext="$libext"
5342
5343 # Shared library suffix (normally ".so").
5344 shrext_cmds='$shrext_cmds'
5345
5346 # Executable file suffix (normally "").
5347 exeext="$exeext"
5348
5349 # Additional compiler flags for building library objects.
5350 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5351 pic_mode=$pic_mode
5352
5353 # What is the maximum length of a command?
5354 max_cmd_len=$lt_cv_sys_max_cmd_len
5355
5356 # Does compiler simultaneously support -c and -o options?
5357 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5358
5359 # Must we lock files when doing compilation?
5360 need_locks=$lt_need_locks
5361
5362 # Do we need the lib prefix for modules?
5363 need_lib_prefix=$need_lib_prefix
5364
5365 # Do we need a version for libraries?
5366 need_version=$need_version
5367
5368 # Whether dlopen is supported.
5369 dlopen_support=$enable_dlopen
5370
5371 # Whether dlopen of programs is supported.
5372 dlopen_self=$enable_dlopen_self
5373
5374 # Whether dlopen of statically linked programs is supported.
5375 dlopen_self_static=$enable_dlopen_self_static
5376
5377 # Compiler flag to prevent dynamic linking.
5378 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5379
5380 # Compiler flag to turn off builtin functions.
5381 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5382
5383 # Compiler flag to allow reflexive dlopens.
5384 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5385
5386 # Compiler flag to generate shared objects directly from archives.
5387 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5388
5389 # Compiler flag to generate thread-safe objects.
5390 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5391
5392 # Library versioning type.
5393 version_type=$version_type
5394
5395 # Format of library name prefix.
5396 libname_spec=$lt_libname_spec
5397
5398 # List of archive names. First name is the real one, the rest are links.
5399 # The last name is the one that the linker finds with -lNAME.
5400 library_names_spec=$lt_library_names_spec
5401
5402 # The coded name of the library, if different from the real name.
5403 soname_spec=$lt_soname_spec
5404
5405 # Commands used to build and install an old-style archive.
5406 RANLIB=$lt_RANLIB
5407 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5408 old_postinstall_cmds=$lt_old_postinstall_cmds
5409 old_postuninstall_cmds=$lt_old_postuninstall_cmds
5410
5411 # Create an old-style archive from a shared archive.
5412 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5413
5414 # Create a temporary old-style archive to link instead of a shared archive.
5415 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5416
5417 # Commands used to build and install a shared archive.
5418 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5419 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5420 postinstall_cmds=$lt_postinstall_cmds
5421 postuninstall_cmds=$lt_postuninstall_cmds
5422
5423 # Commands used to build a loadable module (assumed same as above if empty)
5424 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5425 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5426
5427 # Commands to strip libraries.
5428 old_striplib=$lt_old_striplib
5429 striplib=$lt_striplib
5430
5431 # Dependencies to place before the objects being linked to create a
5432 # shared library.
5433 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5434
5435 # Dependencies to place after the objects being linked to create a
5436 # shared library.
5437 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5438
5439 # Dependencies to place before the objects being linked to create a
5440 # shared library.
5441 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5442
5443 # Dependencies to place after the objects being linked to create a
5444 # shared library.
5445 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5446
5447 # The library search path used internally by the compiler when linking
5448 # a shared library.
5449 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5450
5451 # Method to check whether dependent libraries are shared objects.
5452 deplibs_check_method=$lt_deplibs_check_method
5453
5454 # Command to use when deplibs_check_method == file_magic.
5455 file_magic_cmd=$lt_file_magic_cmd
5456
5457 # Flag that allows shared libraries with undefined symbols to be built.
5458 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5459
5460 # Flag that forces no undefined symbols.
5461 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5462
5463 # Commands used to finish a libtool library installation in a directory.
5464 finish_cmds=$lt_finish_cmds
5465
5466 # Same as above, but a single script fragment to be evaled but not shown.
5467 finish_eval=$lt_finish_eval
5468
5469 # Take the output of nm and produce a listing of raw symbols and C names.
5470 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5471
5472 # Transform the output of nm in a proper C declaration
5473 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5474
5475 # Transform the output of nm in a C name address pair
5476 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5477
5478 # This is the shared library runtime path variable.
5479 runpath_var=$runpath_var
5480
5481 # This is the shared library path variable.
5482 shlibpath_var=$shlibpath_var
5483
5484 # Is shlibpath searched before the hard-coded library search path?
5485 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5486
5487 # How to hardcode a shared library path into an executable.
5488 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5489
5490 # Whether we should hardcode library paths into libraries.
5491 hardcode_into_libs=$hardcode_into_libs
5492
5493 # Flag to hardcode \$libdir into a binary during linking.
5494 # This must work even if \$libdir does not exist.
5495 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5496
5497 # If ld is used when linking, flag to hardcode \$libdir into
5498 # a binary during linking. This must work even if \$libdir does
5499 # not exist.
5500 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5501
5502 # Whether we need a single -rpath flag with a separated argument.
5503 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5504
5505 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5506 # resulting binary.
5507 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5508
5509 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5510 # resulting binary.
5511 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5512
5513 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5514 # the resulting binary.
5515 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5516
5517 # Set to yes if building a shared library automatically hardcodes DIR into the library
5518 # and all subsequent libraries and executables linked against it.
5519 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5520
5521 # Variables whose values should be saved in libtool wrapper scripts and
5522 # restored at relink time.
5523 variables_saved_for_relink="$variables_saved_for_relink"
5524
5525 # Whether libtool must link a program against all its dependency libraries.
5526 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5527
5528 # Compile-time system search path for libraries
5529 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5530
5531 # Run-time system search path for libraries
5532 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5533
5534 # Fix the shell variable \$srcfile for the compiler.
5535 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5536
5537 # Set to yes if exported symbols are required.
5538 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5539
5540 # The commands to list exported symbols.
5541 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5542
5543 # The commands to extract the exported symbol list from a shared archive.
5544 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5545
5546 # Symbols that should not be listed in the preloaded symbols.
5547 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5548
5549 # Symbols that must always be exported.
5550 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5551
5552 ifelse([$1],[],
5553 [# ### END LIBTOOL CONFIG],
5554 [# ### END LIBTOOL TAG CONFIG: $tagname])
5555
5556 __EOF__
5557
5558 ifelse([$1],[], [
5559 case $host_os in
5560 aix3*)
5561 cat <<\EOF >> "$cfgfile"
5562
5563 # AIX sometimes has problems with the GCC collect2 program. For some
5564 # reason, if we set the COLLECT_NAMES environment variable, the problems
5565 # vanish in a puff of smoke.
5566 if test "X${COLLECT_NAMES+set}" != Xset; then
5567 COLLECT_NAMES=
5568 export COLLECT_NAMES
5569 fi
5570 EOF
5571 ;;
5572 esac
5573
5574 # We use sed instead of cat because bash on DJGPP gets confused if
5575 # if finds mixed CR/LF and LF-only lines. Since sed operates in
5576 # text mode, it properly converts lines to CR/LF. This bash problem
5577 # is reportedly fixed, but why not run on old versions too?
5578 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5579
5580 mv -f "$cfgfile" "$ofile" || \
5581 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5582 chmod +x "$ofile"
5583 ])
5584 else
5585 # If there is no Makefile yet, we rely on a make rule to execute
5586 # `config.status --recheck' to rerun these tests and create the
5587 # libtool script then.
5588 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5589 if test -f "$ltmain_in"; then
5590 test -f Makefile && make "$ltmain"
5591 fi
5592 fi
5593 ])# AC_LIBTOOL_CONFIG
5594
5595
5596 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5597 # -------------------------------------------
5598 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5599 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5600
5601 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5602
5603 if test "$GCC" = yes; then
5604 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5605
5606 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5607 lt_cv_prog_compiler_rtti_exceptions,
5608 [-fno-rtti -fno-exceptions], [],
5609 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5610 fi
5611 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5612
5613
5614 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5615 # ---------------------------------
5616 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5617 [AC_REQUIRE([AC_CANONICAL_HOST])
5618 AC_REQUIRE([AC_PROG_NM])
5619 AC_REQUIRE([AC_OBJEXT])
5620 # Check for command to grab the raw symbol name followed by C symbol from nm.
5621 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5622 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5623 [
5624 # These are sane defaults that work on at least a few old systems.
5625 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5626
5627 # Character class describing NM global symbol codes.
5628 symcode='[[BCDEGRST]]'
5629
5630 # Regexp to match symbols that can be accessed directly from C.
5631 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5632
5633 # Transform an extracted symbol line into a proper C declaration
5634 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5635
5636 # Transform an extracted symbol line into symbol name and symbol address
5637 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5638
5639 # Define system-specific variables.
5640 case $host_os in
5641 aix*)
5642 symcode='[[BCDT]]'
5643 ;;
5644 cygwin* | mingw* | pw32*)
5645 symcode='[[ABCDGISTW]]'
5646 ;;
5647 hpux*) # Its linker distinguishes data from code symbols
5648 if test "$host_cpu" = ia64; then
5649 symcode='[[ABCDEGRST]]'
5650 fi
5651 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5652 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5653 ;;
5654 linux*)
5655 if test "$host_cpu" = ia64; then
5656 symcode='[[ABCDGIRSTW]]'
5657 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5658 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5659 fi
5660 ;;
5661 irix* | nonstopux*)
5662 symcode='[[BCDEGRST]]'
5663 ;;
5664 osf*)
5665 symcode='[[BCDEGQRST]]'
5666 ;;
5667 solaris*)
5668 symcode='[[BDRT]]'
5669 ;;
5670 sco3.2v5*)
5671 symcode='[[DT]]'
5672 ;;
5673 sysv4.2uw2*)
5674 symcode='[[DT]]'
5675 ;;
5676 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5677 symcode='[[ABDT]]'
5678 ;;
5679 sysv4)
5680 symcode='[[DFNSTU]]'
5681 ;;
5682 esac
5683
5684 # Handle CRLF in mingw tool chain
5685 opt_cr=
5686 case $build_os in
5687 mingw*)
5688 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5689 ;;
5690 esac
5691
5692 # If we're using GNU nm, then use its standard symbol codes.
5693 case `$NM -V 2>&1` in
5694 *GNU* | *'with BFD'*)
5695 symcode='[[ABCDGIRSTW]]' ;;
5696 esac
5697
5698 # Try without a prefix undercore, then with it.
5699 for ac_symprfx in "" "_"; do
5700
5701 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5702 symxfrm="\\1 $ac_symprfx\\2 \\2"
5703
5704 # Write the raw and C identifiers.
5705 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5706
5707 # Check to see that the pipe works correctly.
5708 pipe_works=no
5709
5710 rm -f conftest*
5711 cat > conftest.$ac_ext <<EOF
5712 #ifdef __cplusplus
5713 extern "C" {
5714 #endif
5715 char nm_test_var;
5716 void nm_test_func(){}
5717 #ifdef __cplusplus
5718 }
5719 #endif
5720 int main(){nm_test_var='a';nm_test_func();return(0);}
5721 EOF
5722
5723 if AC_TRY_EVAL(ac_compile); then
5724 # Now try to grab the symbols.
5725 nlist=conftest.nm
5726 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5727 # Try sorting and uniquifying the output.
5728 if sort "$nlist" | uniq > "$nlist"T; then
5729 mv -f "$nlist"T "$nlist"
5730 else
5731 rm -f "$nlist"T
5732 fi
5733
5734 # Make sure that we snagged all the symbols we need.
5735 if grep ' nm_test_var$' "$nlist" >/dev/null; then
5736 if grep ' nm_test_func$' "$nlist" >/dev/null; then
5737 cat <<EOF > conftest.$ac_ext
5738 #ifdef __cplusplus
5739 extern "C" {
5740 #endif
5741
5742 EOF
5743 # Now generate the symbol file.
5744 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5745
5746 cat <<EOF >> conftest.$ac_ext
5747 #if defined (__STDC__) && __STDC__
5748 # define lt_ptr_t void *
5749 #else
5750 # define lt_ptr_t char *
5751 # define const
5752 #endif
5753
5754 /* The mapping between symbol names and symbols. */
5755 const struct {
5756 const char *name;
5757 lt_ptr_t address;
5758 }
5759 lt_preloaded_symbols[[]] =
5760 {
5761 EOF
5762 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5763 cat <<\EOF >> conftest.$ac_ext
5764 {0, (lt_ptr_t) 0}
5765 };
5766
5767 #ifdef __cplusplus
5768 }
5769 #endif
5770 EOF
5771 # Now try linking the two files.
5772 mv conftest.$ac_objext conftstm.$ac_objext
5773 lt_save_LIBS="$LIBS"
5774 lt_save_CFLAGS="$CFLAGS"
5775 LIBS="conftstm.$ac_objext"
5776 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5777 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5778 pipe_works=yes
5779 fi
5780 LIBS="$lt_save_LIBS"
5781 CFLAGS="$lt_save_CFLAGS"
5782 else
5783 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5784 fi
5785 else
5786 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5787 fi
5788 else
5789 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5790 fi
5791 else
5792 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5793 cat conftest.$ac_ext >&5
5794 fi
5795 rm -f conftest* conftst*
5796
5797 # Do not use the global_symbol_pipe unless it works.
5798 if test "$pipe_works" = yes; then
5799 break
5800 else
5801 lt_cv_sys_global_symbol_pipe=
5802 fi
5803 done
5804 ])
5805 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5806 lt_cv_sys_global_symbol_to_cdecl=
5807 fi
5808 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5809 AC_MSG_RESULT(failed)
5810 else
5811 AC_MSG_RESULT(ok)
5812 fi
5813 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5814
5815
5816 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5817 # ---------------------------------------
5818 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5819 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5820 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5821 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5822
5823 AC_MSG_CHECKING([for $compiler option to produce PIC])
5824 ifelse([$1],[CXX],[
5825 # C++ specific cases for pic, static, wl, etc.
5826 if test "$GXX" = yes; then
5827 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5828 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5829
5830 case $host_os in
5831 aix*)
5832 # All AIX code is PIC.
5833 if test "$host_cpu" = ia64; then
5834 # AIX 5 now supports IA64 processor
5835 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5836 fi
5837 ;;
5838 amigaos*)
5839 # FIXME: we need at least 68020 code to build shared libraries, but
5840 # adding the `-m68020' flag to GCC prevents building anything better,
5841 # like `-m68040'.
5842 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5843 ;;
5844 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5845 # PIC is the default for these OSes.
5846 ;;
5847 mingw* | os2* | pw32*)
5848 # This hack is so that the source file can tell whether it is being
5849 # built for inclusion in a dll (and should export symbols for example).
5850 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5851 ;;
5852 darwin* | rhapsody*)
5853 # PIC is the default on this platform
5854 # Common symbols not allowed in MH_DYLIB files
5855 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5856 ;;
5857 *djgpp*)
5858 # DJGPP does not support shared libraries at all
5859 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5860 ;;
5861 interix3*)
5862 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5863 # Instead, we relocate shared libraries at runtime.
5864 ;;
5865 sysv4*MP*)
5866 if test -d /usr/nec; then
5867 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5868 fi
5869 ;;
5870 hpux*)
5871 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5872 # not for PA HP-UX.
5873 case $host_cpu in
5874 hppa*64*|ia64*)
5875 ;;
5876 *)
5877 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5878 ;;
5879 esac
5880 ;;
5881 *)
5882 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5883 ;;
5884 esac
5885 else
5886 case $host_os in
5887 aix4* | aix5*)
5888 # All AIX code is PIC.
5889 if test "$host_cpu" = ia64; then
5890 # AIX 5 now supports IA64 processor
5891 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5892 else
5893 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5894 fi
5895 ;;
5896 chorus*)
5897 case $cc_basename in
5898 cxch68*)
5899 # Green Hills C++ Compiler
5900 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5901 ;;
5902 esac
5903 ;;
5904 darwin*)
5905 # PIC is the default on this platform
5906 # Common symbols not allowed in MH_DYLIB files
5907 case $cc_basename in
5908 xlc*)
5909 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5910 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5911 ;;
5912 esac
5913 ;;
5914 dgux*)
5915 case $cc_basename in
5916 ec++*)
5917 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5918 ;;
5919 ghcx*)
5920 # Green Hills C++ Compiler
5921 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5922 ;;
5923 *)
5924 ;;
5925 esac
5926 ;;
5927 freebsd* | kfreebsd*-gnu | dragonfly*)
5928 # FreeBSD uses GNU C++
5929 ;;
5930 hpux9* | hpux10* | hpux11*)
5931 case $cc_basename in
5932 CC*)
5933 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5934 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5935 if test "$host_cpu" != ia64; then
5936 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5937 fi
5938 ;;
5939 aCC*)
5940 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5941 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5942 case $host_cpu in
5943 hppa*64*|ia64*)
5944 # +Z the default
5945 ;;
5946 *)
5947 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5948 ;;
5949 esac
5950 ;;
5951 *)
5952 ;;
5953 esac
5954 ;;
5955 interix*)
5956 # This is c89, which is MS Visual C++ (no shared libs)
5957 # Anyone wants to do a port?
5958 ;;
5959 irix5* | irix6* | nonstopux*)
5960 case $cc_basename in
5961 CC*)
5962 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5963 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5964 # CC pic flag -KPIC is the default.
5965 ;;
5966 *)
5967 ;;
5968 esac
5969 ;;
5970 linux*)
5971 case $cc_basename in
5972 KCC*)
5973 # KAI C++ Compiler
5974 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5975 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5976 ;;
5977 icpc* | ecpc*)
5978 # Intel C++
5979 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5980 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5981 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5982 ;;
5983 pgCC*)
5984 # Portland Group C++ compiler.
5985 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5986 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5987 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5988 ;;
5989 cxx*)
5990 # Compaq C++
5991 # Make sure the PIC flag is empty. It appears that all Alpha
5992 # Linux and Compaq Tru64 Unix objects are PIC.
5993 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5994 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5995 ;;
5996 *)
5997 ;;
5998 esac
5999 ;;
6000 lynxos*)
6001 ;;
6002 m88k*)
6003 ;;
6004 mvs*)
6005 case $cc_basename in
6006 cxx*)
6007 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6008 ;;
6009 *)
6010 ;;
6011 esac
6012 ;;
6013 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
6014 ;;
6015 osf3* | osf4* | osf5*)
6016 case $cc_basename in
6017 KCC*)
6018 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6019 ;;
6020 RCC*)
6021 # Rational C++ 2.4.1
6022 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6023 ;;
6024 cxx*)
6025 # Digital/Compaq C++
6026 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6027 # Make sure the PIC flag is empty. It appears that all Alpha
6028 # Linux and Compaq Tru64 Unix objects are PIC.
6029 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6030 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6031 ;;
6032 *)
6033 ;;
6034 esac
6035 ;;
6036 psos*)
6037 ;;
6038 solaris*)
6039 case $cc_basename in
6040 CC*)
6041 # Sun C++ 4.2, 5.x and Centerline C++
6042 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6043 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6044 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6045 ;;
6046 gcx*)
6047 # Green Hills C++ Compiler
6048 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6049 ;;
6050 *)
6051 ;;
6052 esac
6053 ;;
6054 sunos4*)
6055 case $cc_basename in
6056 CC*)
6057 # Sun C++ 4.x
6058 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6059 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6060 ;;
6061 lcc*)
6062 # Lucid
6063 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6064 ;;
6065 *)
6066 ;;
6067 esac
6068 ;;
6069 tandem*)
6070 case $cc_basename in
6071 NCC*)
6072 # NonStop-UX NCC 3.20
6073 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6074 ;;
6075 *)
6076 ;;
6077 esac
6078 ;;
6079 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6080 case $cc_basename in
6081 CC*)
6082 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6083 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6084 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6085 ;;
6086 esac
6087 ;;
6088 vxworks*)
6089 ;;
6090 *)
6091 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6092 ;;
6093 esac
6094 fi
6095 ],
6096 [
6097 if test "$GCC" = yes; then
6098 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6099 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6100
6101 case $host_os in
6102 aix*)
6103 # All AIX code is PIC.
6104 if test "$host_cpu" = ia64; then
6105 # AIX 5 now supports IA64 processor
6106 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6107 fi
6108 ;;
6109
6110 amigaos*)
6111 # FIXME: we need at least 68020 code to build shared libraries, but
6112 # adding the `-m68020' flag to GCC prevents building anything better,
6113 # like `-m68040'.
6114 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6115 ;;
6116
6117 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6118 # PIC is the default for these OSes.
6119 ;;
6120
6121 mingw* | pw32* | os2*)
6122 # This hack is so that the source file can tell whether it is being
6123 # built for inclusion in a dll (and should export symbols for example).
6124 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6125 ;;
6126
6127 darwin* | rhapsody*)
6128 # PIC is the default on this platform
6129 # Common symbols not allowed in MH_DYLIB files
6130 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6131 ;;
6132
6133 interix3*)
6134 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6135 # Instead, we relocate shared libraries at runtime.
6136 ;;
6137
6138 msdosdjgpp*)
6139 # Just because we use GCC doesn't mean we suddenly get shared libraries
6140 # on systems that don't support them.
6141 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6142 enable_shared=no
6143 ;;
6144
6145 sysv4*MP*)
6146 if test -d /usr/nec; then
6147 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6148 fi
6149 ;;
6150
6151 hpux*)
6152 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6153 # not for PA HP-UX.
6154 case $host_cpu in
6155 hppa*64*|ia64*)
6156 # +Z the default
6157 ;;
6158 *)
6159 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6160 ;;
6161 esac
6162 ;;
6163
6164 *)
6165 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6166 ;;
6167 esac
6168 else
6169 # PORTME Check for flag to pass linker flags through the system compiler.
6170 case $host_os in
6171 aix*)
6172 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6173 if test "$host_cpu" = ia64; then
6174 # AIX 5 now supports IA64 processor
6175 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6176 else
6177 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6178 fi
6179 ;;
6180 darwin*)
6181 # PIC is the default on this platform
6182 # Common symbols not allowed in MH_DYLIB files
6183 case $cc_basename in
6184 xlc*)
6185 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6186 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6187 ;;
6188 esac
6189 ;;
6190
6191 mingw* | pw32* | os2*)
6192 # This hack is so that the source file can tell whether it is being
6193 # built for inclusion in a dll (and should export symbols for example).
6194 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6195 ;;
6196
6197 hpux9* | hpux10* | hpux11*)
6198 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6199 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6200 # not for PA HP-UX.
6201 case $host_cpu in
6202 hppa*64*|ia64*)
6203 # +Z the default
6204 ;;
6205 *)
6206 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6207 ;;
6208 esac
6209 # Is there a better lt_prog_compiler_static that works with the bundled CC?
6210 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6211 ;;
6212
6213 irix5* | irix6* | nonstopux*)
6214 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6215 # PIC (with -KPIC) is the default.
6216 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6217 ;;
6218
6219 newsos6)
6220 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6221 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6222 ;;
6223
6224 linux*)
6225 case $cc_basename in
6226 icc* | ecc*)
6227 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6228 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6229 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6230 ;;
6231 pgcc* | pgf77* | pgf90* | pgf95*)
6232 # Portland Group compilers (*not* the Pentium gcc compiler,
6233 # which looks to be a dead project)
6234 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6235 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6236 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6237 ;;
6238 ccc*)
6239 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6240 # All Alpha code is PIC.
6241 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6242 ;;
6243 esac
6244 ;;
6245
6246 osf3* | osf4* | osf5*)
6247 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6248 # All OSF/1 code is PIC.
6249 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6250 ;;
6251
6252 solaris*)
6253 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6254 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6255 case $cc_basename in
6256 f77* | f90* | f95*)
6257 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6258 *)
6259 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6260 esac
6261 ;;
6262
6263 sunos4*)
6264 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6265 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6266 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6267 ;;
6268
6269 sysv4 | sysv4.2uw2* | sysv4.3*)
6270 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6271 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6272 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6273 ;;
6274
6275 sysv4*MP*)
6276 if test -d /usr/nec ;then
6277 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6278 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6279 fi
6280 ;;
6281
6282 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6283 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6284 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6285 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6286 ;;
6287
6288 unicos*)
6289 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6290 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6291 ;;
6292
6293 uts4*)
6294 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6295 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6296 ;;
6297
6298 *)
6299 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6300 ;;
6301 esac
6302 fi
6303 ])
6304 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6305
6306 #
6307 # Check to make sure the PIC flag actually works.
6308 #
6309 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6310 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6311 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6312 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6313 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6314 "" | " "*) ;;
6315 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6316 esac],
6317 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6318 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6319 fi
6320 case $host_os in
6321 # For platforms which do not support PIC, -DPIC is meaningless:
6322 *djgpp*)
6323 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6324 ;;
6325 *)
6326 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6327 ;;
6328 esac
6329
6330 #
6331 # Check to make sure the static flag actually works.
6332 #
6333 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
6334 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6335 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
6336 $lt_tmp_static_flag,
6337 [],
6338 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
6339 ])
6340
6341
6342 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6343 # ------------------------------------
6344 # See if the linker supports building shared libraries.
6345 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6346 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6347 ifelse([$1],[CXX],[
6348 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6349 case $host_os in
6350 aix4* | aix5*)
6351 # If we're using GNU nm, then we don't want the "-C" option.
6352 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6353 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6354 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6355 else
6356 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6357 fi
6358 ;;
6359 pw32*)
6360 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6361 ;;
6362 cygwin* | mingw*)
6363 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6364 ;;
6365 kfreebsd*-gnu)
6366 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6367 ;;
6368 linux*)
6369 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6370 ;;
6371 *)
6372 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6373 ;;
6374 esac
6375 ],[
6376 runpath_var=
6377 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6378 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6379 _LT_AC_TAGVAR(archive_cmds, $1)=
6380 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6381 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6382 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6383 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6384 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6385 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6386 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6387 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6388 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6389 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6390 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6391 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6392 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6393 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6394 _LT_AC_TAGVAR(module_cmds, $1)=
6395 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6396 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6397 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6398 # include_expsyms should be a list of space-separated symbols to be *always*
6399 # included in the symbol list
6400 _LT_AC_TAGVAR(include_expsyms, $1)=
6401 # exclude_expsyms can be an extended regexp of symbols to exclude
6402 # it will be wrapped by ` (' and `)$', so one must not match beginning or
6403 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6404 # as well as any symbol that contains `d'.
6405 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6406 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6407 # platforms (ab)use it in PIC code, but their linkers get confused if
6408 # the symbol is explicitly referenced. Since portable code cannot
6409 # rely on this symbol name, it's probably fine to never include it in
6410 # preloaded symbol tables.
6411 extract_expsyms_cmds=
6412 # Just being paranoid about ensuring that cc_basename is set.
6413 _LT_CC_BASENAME([$compiler])
6414 case $host_os in
6415 cygwin* | mingw* | pw32*)
6416 # FIXME: the MSVC++ port hasn't been tested in a loooong time
6417 # When not using gcc, we currently assume that we are using
6418 # Microsoft Visual C++.
6419 if test "$GCC" != yes; then
6420 with_gnu_ld=no
6421 fi
6422 ;;
6423 interix*)
6424 # we just hope/assume this is gcc and not c89 (= MSVC++)
6425 with_gnu_ld=yes
6426 ;;
6427 openbsd*)
6428 with_gnu_ld=no
6429 ;;
6430 esac
6431
6432 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6433 if test "$with_gnu_ld" = yes; then
6434 # If archive_cmds runs LD, not CC, wlarc should be empty
6435 wlarc='${wl}'
6436
6437 # Set some defaults for GNU ld with shared library support. These
6438 # are reset later if shared libraries are not supported. Putting them
6439 # here allows them to be overridden if necessary.
6440 runpath_var=LD_RUN_PATH
6441 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6442 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6443 # ancient GNU ld didn't support --whole-archive et. al.
6444 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6445 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6446 else
6447 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6448 fi
6449 supports_anon_versioning=no
6450 case `$LD -v 2>/dev/null` in
6451 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6452 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6453 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6454 *\ 2.11.*) ;; # other 2.11 versions
6455 *) supports_anon_versioning=yes ;;
6456 esac
6457
6458 # See if GNU ld supports shared libraries.
6459 case $host_os in
6460 aix3* | aix4* | aix5*)
6461 # On AIX/PPC, the GNU linker is very broken
6462 if test "$host_cpu" != ia64; then
6463 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6464 cat <<EOF 1>&2
6465
6466 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6467 *** to be unable to reliably create shared libraries on AIX.
6468 *** Therefore, libtool is disabling shared libraries support. If you
6469 *** really care for shared libraries, you may want to modify your PATH
6470 *** so that a non-GNU linker is found, and then restart.
6471
6472 EOF
6473 fi
6474 ;;
6475
6476 amigaos*)
6477 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6478 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6479 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6480
6481 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6482 # that the semantics of dynamic libraries on AmigaOS, at least up
6483 # to version 4, is to share data among multiple programs linked
6484 # with the same dynamic library. Since this doesn't match the
6485 # behavior of shared libraries on other platforms, we can't use
6486 # them.
6487 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6488 ;;
6489
6490 beos*)
6491 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6492 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6493 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6494 # support --undefined. This deserves some investigation. FIXME
6495 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6496 else
6497 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6498 fi
6499 ;;
6500
6501 cygwin* | mingw* | pw32*)
6502 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6503 # as there is no search path for DLLs.
6504 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6505 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6506 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6507 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6508 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6509
6510 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6511 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6512 # If the export-symbols file already is a .def file (1st line
6513 # is EXPORTS), use it as is; otherwise, prepend...
6514 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6515 cp $export_symbols $output_objdir/$soname.def;
6516 else
6517 echo EXPORTS > $output_objdir/$soname.def;
6518 cat $export_symbols >> $output_objdir/$soname.def;
6519 fi~
6520 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6521 else
6522 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6523 fi
6524 ;;
6525
6526 interix3*)
6527 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6528 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6529 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6530 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6531 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6532 # Instead, shared libraries are loaded at an image base (0x10000000 by
6533 # default) and relocated if they conflict, which is a slow very memory
6534 # consuming and fragmenting process. To avoid this, we pick a random,
6535 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6536 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6537 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6538 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6539 ;;
6540
6541 linux*)
6542 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6543 tmp_addflag=
6544 case $cc_basename,$host_cpu in
6545 pgcc*) # Portland Group C compiler
6546 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6547 tmp_addflag=' $pic_flag'
6548 ;;
6549 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
6550 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6551 tmp_addflag=' $pic_flag -Mnomain' ;;
6552 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6553 tmp_addflag=' -i_dynamic' ;;
6554 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6555 tmp_addflag=' -i_dynamic -nofor_main' ;;
6556 ifc* | ifort*) # Intel Fortran compiler
6557 tmp_addflag=' -nofor_main' ;;
6558 esac
6559 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6560
6561 if test $supports_anon_versioning = yes; then
6562 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6563 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6564 $echo "local: *; };" >> $output_objdir/$libname.ver~
6565 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6566 fi
6567 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6568 else
6569 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6570 fi
6571 ;;
6572
6573 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
6574 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6575 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6576 wlarc=
6577 else
6578 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6579 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6580 fi
6581 ;;
6582
6583 solaris*)
6584 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6585 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6586 cat <<EOF 1>&2
6587
6588 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6589 *** create shared libraries on Solaris systems. Therefore, libtool
6590 *** is disabling shared libraries support. We urge you to upgrade GNU
6591 *** binutils to release 2.9.1 or newer. Another option is to modify
6592 *** your PATH or compiler configuration so that the native linker is
6593 *** used, and then restart.
6594
6595 EOF
6596 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6597 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6598 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6599 else
6600 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6601 fi
6602 ;;
6603
6604 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6605 case `$LD -v 2>&1` in
6606 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6607 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6608 cat <<_LT_EOF 1>&2
6609
6610 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6611 *** reliably create shared libraries on SCO systems. Therefore, libtool
6612 *** is disabling shared libraries support. We urge you to upgrade GNU
6613 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
6614 *** your PATH or compiler configuration so that the native linker is
6615 *** used, and then restart.
6616
6617 _LT_EOF
6618 ;;
6619 *)
6620 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6621 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
6622 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
6623 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
6624 else
6625 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6626 fi
6627 ;;
6628 esac
6629 ;;
6630
6631 sunos4*)
6632 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6633 wlarc=
6634 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6635 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6636 ;;
6637
6638 *)
6639 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6640 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6641 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6642 else
6643 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6644 fi
6645 ;;
6646 esac
6647
6648 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6649 runpath_var=
6650 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6651 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6652 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6653 fi
6654 else
6655 # PORTME fill in a description of your system's linker (not GNU ld)
6656 case $host_os in
6657 aix3*)
6658 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6659 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6660 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
6661 # Note: this linker hardcodes the directories in LIBPATH if there
6662 # are no directories specified by -L.
6663 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6664 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6665 # Neither direct hardcoding nor static linking is supported with a
6666 # broken collect2.
6667 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6668 fi
6669 ;;
6670
6671 aix4* | aix5*)
6672 if test "$host_cpu" = ia64; then
6673 # On IA64, the linker does run time linking by default, so we don't
6674 # have to do anything special.
6675 aix_use_runtimelinking=no
6676 exp_sym_flag='-Bexport'
6677 no_entry_flag=""
6678 else
6679 # If we're using GNU nm, then we don't want the "-C" option.
6680 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6681 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6682 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6683 else
6684 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6685 fi
6686 aix_use_runtimelinking=no
6687
6688 # Test if we are trying to use run time linking or normal
6689 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6690 # need to do runtime linking.
6691 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6692 for ld_flag in $LDFLAGS; do
6693 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6694 aix_use_runtimelinking=yes
6695 break
6696 fi
6697 done
6698 ;;
6699 esac
6700
6701 exp_sym_flag='-bexport'
6702 no_entry_flag='-bnoentry'
6703 fi
6704
6705 # When large executables or shared objects are built, AIX ld can
6706 # have problems creating the table of contents. If linking a library
6707 # or program results in "error TOC overflow" add -mminimal-toc to
6708 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6709 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6710
6711 _LT_AC_TAGVAR(archive_cmds, $1)=''
6712 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6713 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6714 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6715
6716 if test "$GCC" = yes; then
6717 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6718 # We only want to do this on AIX 4.2 and lower, the check
6719 # below for broken collect2 doesn't work under 4.3+
6720 collect2name=`${CC} -print-prog-name=collect2`
6721 if test -f "$collect2name" && \
6722 strings "$collect2name" | grep resolve_lib_name >/dev/null
6723 then
6724 # We have reworked collect2
6725 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6726 else
6727 # We have old collect2
6728 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6729 # It fails to find uninstalled libraries when the uninstalled
6730 # path is not listed in the libpath. Setting hardcode_minus_L
6731 # to unsupported forces relinking
6732 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6733 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6734 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6735 fi
6736 ;;
6737 esac
6738 shared_flag='-shared'
6739 if test "$aix_use_runtimelinking" = yes; then
6740 shared_flag="$shared_flag "'${wl}-G'
6741 fi
6742 else
6743 # not using gcc
6744 if test "$host_cpu" = ia64; then
6745 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6746 # chokes on -Wl,-G. The following line is correct:
6747 shared_flag='-G'
6748 else
6749 if test "$aix_use_runtimelinking" = yes; then
6750 shared_flag='${wl}-G'
6751 else
6752 shared_flag='${wl}-bM:SRE'
6753 fi
6754 fi
6755 fi
6756
6757 # It seems that -bexpall does not export symbols beginning with
6758 # underscore (_), so it is better to generate a list of symbols to export.
6759 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6760 if test "$aix_use_runtimelinking" = yes; then
6761 # Warning - without using the other runtime loading flags (-brtl),
6762 # -berok will link without error, but may produce a broken library.
6763 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6764 # Determine the default libpath from the value encoded in an empty executable.
6765 _LT_AC_SYS_LIBPATH_AIX
6766 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6767 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6768 else
6769 if test "$host_cpu" = ia64; then
6770 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6771 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6772 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6773 else
6774 # Determine the default libpath from the value encoded in an empty executable.
6775 _LT_AC_SYS_LIBPATH_AIX
6776 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6777 # Warning - without using the other run time loading flags,
6778 # -berok will link without error, but may produce a broken library.
6779 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6780 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6781 # Exported symbols can be pulled into shared objects from archives
6782 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6783 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6784 # This is similar to how AIX traditionally builds its shared libraries.
6785 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6786 fi
6787 fi
6788 ;;
6789
6790 amigaos*)
6791 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6792 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6793 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6794 # see comment about different semantics on the GNU ld section
6795 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6796 ;;
6797
6798 bsdi[[45]]*)
6799 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6800 ;;
6801
6802 cygwin* | mingw* | pw32*)
6803 # When not using gcc, we currently assume that we are using
6804 # Microsoft Visual C++.
6805 # hardcode_libdir_flag_spec is actually meaningless, as there is
6806 # no search path for DLLs.
6807 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6808 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6809 # Tell ltmain to make .lib files, not .a files.
6810 libext=lib
6811 # Tell ltmain to make .dll files, not .so files.
6812 shrext_cmds=".dll"
6813 # FIXME: Setting linknames here is a bad hack.
6814 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6815 # The linker will automatically build a .lib file if we build a DLL.
6816 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6817 # FIXME: Should let the user specify the lib program.
6818 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6819 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6820 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6821 ;;
6822
6823 darwin* | rhapsody*)
6824 case $host_os in
6825 rhapsody* | darwin1.[[012]])
6826 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6827 ;;
6828 *) # Darwin 1.3 on
6829 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6830 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6831 else
6832 case ${MACOSX_DEPLOYMENT_TARGET} in
6833 10.[[012]])
6834 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6835 ;;
6836 10.*)
6837 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6838 ;;
6839 esac
6840 fi
6841 ;;
6842 esac
6843 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6844 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6845 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6846 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6847 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6848 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6849 if test "$GCC" = yes ; then
6850 output_verbose_link_cmd='echo'
6851 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6852 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6853 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6854 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6855 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6856 else
6857 case $cc_basename in
6858 xlc*)
6859 output_verbose_link_cmd='echo'
6860 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
6861 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6862 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6863 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6864 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6865 ;;
6866 *)
6867 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6868 ;;
6869 esac
6870 fi
6871 ;;
6872
6873 dgux*)
6874 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6875 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6876 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6877 ;;
6878
6879 freebsd1*)
6880 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6881 ;;
6882
6883 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6884 # support. Future versions do this automatically, but an explicit c++rt0.o
6885 # does not break anything, and helps significantly (at the cost of a little
6886 # extra space).
6887 freebsd2.2*)
6888 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6889 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6890 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6891 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6892 ;;
6893
6894 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6895 freebsd2*)
6896 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6897 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6898 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6899 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6900 ;;
6901
6902 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6903 freebsd* | dragonfly*)
6904 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6905 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6906 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6907 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6908 ;;
6909
6910 # GNU/kFreeBSD uses gcc -shared to do shared libraries.
6911 kfreebsd*-gnu)
6912 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6913 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6914 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6915 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6916 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6917 ;;
6918
6919 hpux9*)
6920 if test "$GCC" = yes; then
6921 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6922 else
6923 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6924 fi
6925 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6926 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6927 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6928
6929 # hardcode_minus_L: Not really in the search PATH,
6930 # but as the default location of the library.
6931 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6932 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6933 ;;
6934
6935 hpux10*)
6936 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6937 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6938 else
6939 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6940 fi
6941 if test "$with_gnu_ld" = no; then
6942 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6943 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6944
6945 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6946 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6947
6948 # hardcode_minus_L: Not really in the search PATH,
6949 # but as the default location of the library.
6950 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6951 fi
6952 ;;
6953
6954 hpux11*)
6955 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6956 case $host_cpu in
6957 hppa*64*)
6958 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6959 ;;
6960 ia64*)
6961 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6962 ;;
6963 *)
6964 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6965 ;;
6966 esac
6967 else
6968 case $host_cpu in
6969 hppa*64*)
6970 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6971 ;;
6972 ia64*)
6973 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6974 ;;
6975 *)
6976 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6977 ;;
6978 esac
6979 fi
6980 if test "$with_gnu_ld" = no; then
6981 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6982 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6983
6984 case $host_cpu in
6985 hppa*64*|ia64*)
6986 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6987 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6988 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6989 ;;
6990 *)
6991 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6992 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6993
6994 # hardcode_minus_L: Not really in the search PATH,
6995 # but as the default location of the library.
6996 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6997 ;;
6998 esac
6999 fi
7000 ;;
7001
7002 irix5* | irix6* | nonstopux*)
7003 if test "$GCC" = yes; then
7004 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7005 else
7006 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7007 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7008 fi
7009 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7010 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7011 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7012 ;;
7013
7014 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
7015 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7016 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
7017 else
7018 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
7019 fi
7020 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7021 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7022 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7023 ;;
7024
7025 newsos6)
7026 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7027 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7028 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7029 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7030 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7031 ;;
7032
7033 openbsd*)
7034 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7035 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7036 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7037 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7038 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7039 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7040 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7041 else
7042 case $host_os in
7043 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7044 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7045 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7046 ;;
7047 *)
7048 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7049 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7050 ;;
7051 esac
7052 fi
7053 ;;
7054
7055 os2*)
7056 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7057 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7058 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7059 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
7060 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7061 ;;
7062
7063 osf3*)
7064 if test "$GCC" = yes; then
7065 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7066 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7067 else
7068 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7069 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7070 fi
7071 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7072 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7073 ;;
7074
7075 osf4* | osf5*) # as osf3* with the addition of -msym flag
7076 if test "$GCC" = yes; then
7077 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7078 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7079 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7080 else
7081 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7082 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7083 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
7084 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
7085
7086 # Both c and cxx compiler support -rpath directly
7087 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7088 fi
7089 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7090 ;;
7091
7092 solaris*)
7093 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7094 if test "$GCC" = yes; then
7095 wlarc='${wl}'
7096 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7097 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7098 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
7099 else
7100 wlarc=''
7101 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7102 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7103 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7104 fi
7105 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7106 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7107 case $host_os in
7108 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7109 *)
7110 # The compiler driver will combine linker options so we
7111 # cannot just pass the convience library names through
7112 # without $wl, iff we do not link with $LD.
7113 # Luckily, gcc supports the same syntax we need for Sun Studio.
7114 # Supported since Solaris 2.6 (maybe 2.5.1?)
7115 case $wlarc in
7116 '')
7117 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
7118 *)
7119 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
7120 esac ;;
7121 esac
7122 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7123 ;;
7124
7125 sunos4*)
7126 if test "x$host_vendor" = xsequent; then
7127 # Use $CC to link under sequent, because it throws in some extra .o
7128 # files that make .init and .fini sections work.
7129 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7130 else
7131 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7132 fi
7133 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7134 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7135 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7136 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7137 ;;
7138
7139 sysv4)
7140 case $host_vendor in
7141 sni)
7142 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7143 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7144 ;;
7145 siemens)
7146 ## LD is ld it makes a PLAMLIB
7147 ## CC just makes a GrossModule.
7148 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7149 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7150 _LT_AC_TAGVAR(hardcode_direct, $1)=no
7151 ;;
7152 motorola)
7153 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7154 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7155 ;;
7156 esac
7157 runpath_var='LD_RUN_PATH'
7158 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7159 ;;
7160
7161 sysv4.3*)
7162 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7163 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7164 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7165 ;;
7166
7167 sysv4*MP*)
7168 if test -d /usr/nec; then
7169 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7170 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7171 runpath_var=LD_RUN_PATH
7172 hardcode_runpath_var=yes
7173 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7174 fi
7175 ;;
7176
7177 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
7178 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7179 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7180 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7181 runpath_var='LD_RUN_PATH'
7182
7183 if test "$GCC" = yes; then
7184 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7185 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7186 else
7187 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7188 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7189 fi
7190 ;;
7191
7192 sysv5* | sco3.2v5* | sco5v6*)
7193 # Note: We can NOT use -z defs as we might desire, because we do not
7194 # link with -lc, and that would cause any symbols used from libc to
7195 # always be unresolved, which means just about no library would
7196 # ever link correctly. If we're not using GNU ld we use -z text
7197 # though, which does catch some bad symbols but isn't as heavy-handed
7198 # as -z defs.
7199 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7200 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7201 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7202 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7203 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
7204 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7205 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7206 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7207 runpath_var='LD_RUN_PATH'
7208
7209 if test "$GCC" = yes; then
7210 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7211 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7212 else
7213 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7214 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7215 fi
7216 ;;
7217
7218 uts4*)
7219 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7220 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7221 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7222 ;;
7223
7224 *)
7225 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7226 ;;
7227 esac
7228 fi
7229 ])
7230 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7231 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7232
7233 #
7234 # Do we need to explicitly link libc?
7235 #
7236 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7237 x|xyes)
7238 # Assume -lc should be added
7239 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7240
7241 if test "$enable_shared" = yes && test "$GCC" = yes; then
7242 case $_LT_AC_TAGVAR(archive_cmds, $1) in
7243 *'~'*)
7244 # FIXME: we may have to deal with multi-command sequences.
7245 ;;
7246 '$CC '*)
7247 # Test whether the compiler implicitly links with -lc since on some
7248 # systems, -lgcc has to come before -lc. If gcc already passes -lc
7249 # to ld, don't add -lc before -lgcc.
7250 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7251 $rm conftest*
7252 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7253
7254 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7255 soname=conftest
7256 lib=conftest
7257 libobjs=conftest.$ac_objext
7258 deplibs=
7259 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7260 pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
7261 compiler_flags=-v
7262 linker_flags=-v
7263 verstring=
7264 output_objdir=.
7265 libname=conftest
7266 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7267 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7268 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7269 then
7270 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7271 else
7272 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7273 fi
7274 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7275 else
7276 cat conftest.err 1>&5
7277 fi
7278 $rm conftest*
7279 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7280 ;;
7281 esac
7282 fi
7283 ;;
7284 esac
7285 ])# AC_LIBTOOL_PROG_LD_SHLIBS
7286
7287
7288 # _LT_AC_FILE_LTDLL_C
7289 # -------------------
7290 # Be careful that the start marker always follows a newline.
7291 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7292 # /* ltdll.c starts here */
7293 # #define WIN32_LEAN_AND_MEAN
7294 # #include <windows.h>
7295 # #undef WIN32_LEAN_AND_MEAN
7296 # #include <stdio.h>
7297 #
7298 # #ifndef __CYGWIN__
7299 # # ifdef __CYGWIN32__
7300 # # define __CYGWIN__ __CYGWIN32__
7301 # # endif
7302 # #endif
7303 #
7304 # #ifdef __cplusplus
7305 # extern "C" {
7306 # #endif
7307 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7308 # #ifdef __cplusplus
7309 # }
7310 # #endif
7311 #
7312 # #ifdef __CYGWIN__
7313 # #include <cygwin/cygwin_dll.h>
7314 # DECLARE_CYGWIN_DLL( DllMain );
7315 # #endif
7316 # HINSTANCE __hDllInstance_base;
7317 #
7318 # BOOL APIENTRY
7319 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7320 # {
7321 # __hDllInstance_base = hInst;
7322 # return TRUE;
7323 # }
7324 # /* ltdll.c ends here */
7325 ])# _LT_AC_FILE_LTDLL_C
7326
7327
7328 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7329 # ---------------------------------
7330 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7331
7332
7333 # old names
7334 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
7335 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7336 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7337 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7338 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7339 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
7340 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
7341
7342 # This is just to silence aclocal about the macro not being used
7343 ifelse([AC_DISABLE_FAST_INSTALL])
7344
7345 AC_DEFUN([LT_AC_PROG_GCJ],
7346 [AC_CHECK_TOOL(GCJ, gcj, no)
7347 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7348 AC_SUBST(GCJFLAGS)
7349 ])
7350
7351 AC_DEFUN([LT_AC_PROG_RC],
7352 [AC_CHECK_TOOL(RC, windres, no)
7353 ])
7354
7355 # NOTE: This macro has been submitted for inclusion into #
7356 # GNU Autoconf as AC_PROG_SED. When it is available in #
7357 # a released version of Autoconf we should remove this #
7358 # macro and use it instead. #
7359 # LT_AC_PROG_SED
7360 # --------------
7361 # Check for a fully-functional sed program, that truncates
7362 # as few characters as possible. Prefer GNU sed if found.
7363 AC_DEFUN([LT_AC_PROG_SED],
7364 [AC_MSG_CHECKING([for a sed that does not truncate output])
7365 AC_CACHE_VAL(lt_cv_path_SED,
7366 [# Loop through the user's path and test for sed and gsed.
7367 # Then use that list of sed's as ones to test for truncation.
7368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7369 for as_dir in $PATH
7370 do
7371 IFS=$as_save_IFS
7372 test -z "$as_dir" && as_dir=.
7373 for lt_ac_prog in sed gsed; do
7374 for ac_exec_ext in '' $ac_executable_extensions; do
7375 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7376 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7377 fi
7378 done
7379 done
7380 done
7381 lt_ac_max=0
7382 lt_ac_count=0
7383 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7384 # along with /bin/sed that truncates output.
7385 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7386 test ! -f $lt_ac_sed && continue
7387 cat /dev/null > conftest.in
7388 lt_ac_count=0
7389 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7390 # Check for GNU sed and select it if it is found.
7391 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7392 lt_cv_path_SED=$lt_ac_sed
7393 break
7394 fi
7395 while true; do
7396 cat conftest.in conftest.in >conftest.tmp
7397 mv conftest.tmp conftest.in
7398 cp conftest.in conftest.nl
7399 echo >>conftest.nl
7400 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7401 cmp -s conftest.out conftest.nl || break
7402 # 10000 chars as input seems more than enough
7403 test $lt_ac_count -gt 10 && break
7404 lt_ac_count=`expr $lt_ac_count + 1`
7405 if test $lt_ac_count -gt $lt_ac_max; then
7406 lt_ac_max=$lt_ac_count
7407 lt_cv_path_SED=$lt_ac_sed
7408 fi
7409 done
7410 done
7411 ])
7412 SED=$lt_cv_path_SED
7413 AC_MSG_RESULT([$SED])
7414 ])
7415
7416 # gettext.m4 serial 37 (gettext-0.14.4)
7417 dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
7418 dnl This file is free software; the Free Software Foundation
7419 dnl gives unlimited permission to copy and/or distribute it,
7420 dnl with or without modifications, as long as this notice is preserved.
7421 dnl
7422 dnl This file can can be used in projects which are not available under
7423 dnl the GNU General Public License or the GNU Library General Public
7424 dnl License but which still want to provide support for the GNU gettext
7425 dnl functionality.
7426 dnl Please note that the actual code of the GNU gettext library is covered
7427 dnl by the GNU Library General Public License, and the rest of the GNU
7428 dnl gettext package package is covered by the GNU General Public License.
7429 dnl They are *not* in the public domain.
7430
7431 dnl Authors:
7432 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
7433 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
7434
7435 dnl Macro to add for using GNU gettext.
7436
7437 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
7438 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
7439 dnl default (if it is not specified or empty) is 'no-libtool'.
7440 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
7441 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
7442 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
7443 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
7444 dnl depending on --{enable,disable}-{shared,static} and on the presence of
7445 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
7446 dnl $(top_builddir)/intl/libintl.a will be created.
7447 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
7448 dnl implementations (in libc or libintl) without the ngettext() function
7449 dnl will be ignored. If NEEDSYMBOL is specified and is
7450 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
7451 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
7452 dnl INTLDIR is used to find the intl libraries. If empty,
7453 dnl the value `$(top_builddir)/intl/' is used.
7454 dnl
7455 dnl The result of the configuration is one of three cases:
7456 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
7457 dnl and used.
7458 dnl Catalog format: GNU --> install in $(datadir)
7459 dnl Catalog extension: .mo after installation, .gmo in source tree
7460 dnl 2) GNU gettext has been found in the system's C library.
7461 dnl Catalog format: GNU --> install in $(datadir)
7462 dnl Catalog extension: .mo after installation, .gmo in source tree
7463 dnl 3) No internationalization, always use English msgid.
7464 dnl Catalog format: none
7465 dnl Catalog extension: none
7466 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
7467 dnl The use of .gmo is historical (it was needed to avoid overwriting the
7468 dnl GNU format catalogs when building on a platform with an X/Open gettext),
7469 dnl but we keep it in order not to force irrelevant filename changes on the
7470 dnl maintainers.
7471 dnl
7472 AC_DEFUN([AM_GNU_GETTEXT],
7473 [
7474 dnl Argument checking.
7475 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
7476 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
7477 ])])])])])
7478 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
7479 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
7480 ])])])])
7481 define([gt_included_intl], ifelse([$1], [external], [no], [yes]))
7482 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
7483
7484 AC_REQUIRE([AM_PO_SUBDIRS])dnl
7485 ifelse(gt_included_intl, yes, [
7486 AC_REQUIRE([AM_INTL_SUBDIR])dnl
7487 ])
7488
7489 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
7490 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
7491 AC_REQUIRE([AC_LIB_RPATH])
7492
7493 dnl Sometimes libintl requires libiconv, so first search for libiconv.
7494 dnl Ideally we would do this search only after the
7495 dnl if test "$USE_NLS" = "yes"; then
7496 dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
7497 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
7498 dnl the configure script would need to contain the same shell code
7499 dnl again, outside any 'if'. There are two solutions:
7500 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
7501 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
7502 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
7503 dnl documented, we avoid it.
7504 ifelse(gt_included_intl, yes, , [
7505 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
7506 ])
7507
7508 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
7509 gt_INTL_MACOSX
7510
7511 dnl Set USE_NLS.
7512 AM_NLS
7513
7514 ifelse(gt_included_intl, yes, [
7515 BUILD_INCLUDED_LIBINTL=no
7516 USE_INCLUDED_LIBINTL=no
7517 ])
7518 LIBINTL=
7519 LTLIBINTL=
7520 POSUB=
7521
7522 dnl If we use NLS figure out what method
7523 if test "$USE_NLS" = "yes"; then
7524 gt_use_preinstalled_gnugettext=no
7525 ifelse(gt_included_intl, yes, [
7526 AC_MSG_CHECKING([whether included gettext is requested])
7527 AC_ARG_WITH(included-gettext,
7528 [ --with-included-gettext use the GNU gettext library included here],
7529 nls_cv_force_use_gnu_gettext=$withval,
7530 nls_cv_force_use_gnu_gettext=no)
7531 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
7532
7533 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7534 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7535 ])
7536 dnl User does not insist on using GNU NLS library. Figure out what
7537 dnl to use. If GNU gettext is available we use this. Else we have
7538 dnl to fall back to GNU NLS library.
7539
7540 dnl Add a version number to the cache macros.
7541 define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
7542 define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
7543 define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
7544
7545 AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
7546 [AC_TRY_LINK([#include <libintl.h>
7547 ]ifelse([$2], [need-formatstring-macros],
7548 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
7549 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
7550 #endif
7551 changequote(,)dnl
7552 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
7553 changequote([,])dnl
7554 ], [])[extern int _nl_msg_cat_cntr;
7555 extern int *_nl_domain_bindings;],
7556 [bindtextdomain ("", "");
7557 return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
7558 gt_cv_func_gnugettext_libc=yes,
7559 gt_cv_func_gnugettext_libc=no)])
7560
7561 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
7562 dnl Sometimes libintl requires libiconv, so first search for libiconv.
7563 ifelse(gt_included_intl, yes, , [
7564 AM_ICONV_LINK
7565 ])
7566 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
7567 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
7568 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
7569 dnl even if libiconv doesn't exist.
7570 AC_LIB_LINKFLAGS_BODY([intl])
7571 AC_CACHE_CHECK([for GNU gettext in libintl],
7572 gt_cv_func_gnugettext_libintl,
7573 [gt_save_CPPFLAGS="$CPPFLAGS"
7574 CPPFLAGS="$CPPFLAGS $INCINTL"
7575 gt_save_LIBS="$LIBS"
7576 LIBS="$LIBS $LIBINTL"
7577 dnl Now see whether libintl exists and does not depend on libiconv.
7578 AC_TRY_LINK([#include <libintl.h>
7579 ]ifelse([$2], [need-formatstring-macros],
7580 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
7581 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
7582 #endif
7583 changequote(,)dnl
7584 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
7585 changequote([,])dnl
7586 ], [])[extern int _nl_msg_cat_cntr;
7587 extern
7588 #ifdef __cplusplus
7589 "C"
7590 #endif
7591 const char *_nl_expand_alias (const char *);],
7592 [bindtextdomain ("", "");
7593 return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
7594 gt_cv_func_gnugettext_libintl=yes,
7595 gt_cv_func_gnugettext_libintl=no)
7596 dnl Now see whether libintl exists and depends on libiconv.
7597 if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
7598 LIBS="$LIBS $LIBICONV"
7599 AC_TRY_LINK([#include <libintl.h>
7600 ]ifelse([$2], [need-formatstring-macros],
7601 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
7602 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
7603 #endif
7604 changequote(,)dnl
7605 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
7606 changequote([,])dnl
7607 ], [])[extern int _nl_msg_cat_cntr;
7608 extern
7609 #ifdef __cplusplus
7610 "C"
7611 #endif
7612 const char *_nl_expand_alias (const char *);],
7613 [bindtextdomain ("", "");
7614 return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
7615 [LIBINTL="$LIBINTL $LIBICONV"
7616 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
7617 gt_cv_func_gnugettext_libintl=yes
7618 ])
7619 fi
7620 CPPFLAGS="$gt_save_CPPFLAGS"
7621 LIBS="$gt_save_LIBS"])
7622 fi
7623
7624 dnl If an already present or preinstalled GNU gettext() is found,
7625 dnl use it. But if this macro is used in GNU gettext, and GNU
7626 dnl gettext is already preinstalled in libintl, we update this
7627 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
7628 if test "$gt_cv_func_gnugettext_libc" = "yes" \
7629 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
7630 && test "$PACKAGE" != gettext-runtime \
7631 && test "$PACKAGE" != gettext-tools; }; then
7632 gt_use_preinstalled_gnugettext=yes
7633 else
7634 dnl Reset the values set by searching for libintl.
7635 LIBINTL=
7636 LTLIBINTL=
7637 INCINTL=
7638 fi
7639
7640 ifelse(gt_included_intl, yes, [
7641 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
7642 dnl GNU gettext is not found in the C library.
7643 dnl Fall back on included GNU gettext library.
7644 nls_cv_use_gnu_gettext=yes
7645 fi
7646 fi
7647
7648 if test "$nls_cv_use_gnu_gettext" = "yes"; then
7649 dnl Mark actions used to generate GNU NLS library.
7650 BUILD_INCLUDED_LIBINTL=yes
7651 USE_INCLUDED_LIBINTL=yes
7652 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
7653 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
7654 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
7655 fi
7656
7657 CATOBJEXT=
7658 if test "$gt_use_preinstalled_gnugettext" = "yes" \
7659 || test "$nls_cv_use_gnu_gettext" = "yes"; then
7660 dnl Mark actions to use GNU gettext tools.
7661 CATOBJEXT=.gmo
7662 fi
7663 ])
7664
7665 if test -n "$INTL_MACOSX_LIBS"; then
7666 if test "$gt_use_preinstalled_gnugettext" = "yes" \
7667 || test "$nls_cv_use_gnu_gettext" = "yes"; then
7668 dnl Some extra flags are needed during linking.
7669 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
7670 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
7671 fi
7672 fi
7673
7674 if test "$gt_use_preinstalled_gnugettext" = "yes" \
7675 || test "$nls_cv_use_gnu_gettext" = "yes"; then
7676 AC_DEFINE(ENABLE_NLS, 1,
7677 [Define to 1 if translation of program messages to the user's native language
7678 is requested.])
7679 else
7680 USE_NLS=no
7681 fi
7682 fi
7683
7684 AC_MSG_CHECKING([whether to use NLS])
7685 AC_MSG_RESULT([$USE_NLS])
7686 if test "$USE_NLS" = "yes"; then
7687 AC_MSG_CHECKING([where the gettext function comes from])
7688 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
7689 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
7690 gt_source="external libintl"
7691 else
7692 gt_source="libc"
7693 fi
7694 else
7695 gt_source="included intl directory"
7696 fi
7697 AC_MSG_RESULT([$gt_source])
7698 fi
7699
7700 if test "$USE_NLS" = "yes"; then
7701
7702 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
7703 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
7704 AC_MSG_CHECKING([how to link with libintl])
7705 AC_MSG_RESULT([$LIBINTL])
7706 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
7707 fi
7708
7709 dnl For backward compatibility. Some packages may be using this.
7710 AC_DEFINE(HAVE_GETTEXT, 1,
7711 [Define if the GNU gettext() function is already present or preinstalled.])
7712 AC_DEFINE(HAVE_DCGETTEXT, 1,
7713 [Define if the GNU dcgettext() function is already present or preinstalled.])
7714 fi
7715
7716 dnl We need to process the po/ directory.
7717 POSUB=po
7718 fi
7719
7720 ifelse(gt_included_intl, yes, [
7721 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
7722 dnl to 'yes' because some of the testsuite requires it.
7723 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
7724 BUILD_INCLUDED_LIBINTL=yes
7725 fi
7726
7727 dnl Make all variables we use known to autoconf.
7728 AC_SUBST(BUILD_INCLUDED_LIBINTL)
7729 AC_SUBST(USE_INCLUDED_LIBINTL)
7730 AC_SUBST(CATOBJEXT)
7731
7732 dnl For backward compatibility. Some configure.ins may be using this.
7733 nls_cv_header_intl=
7734 nls_cv_header_libgt=
7735
7736 dnl For backward compatibility. Some Makefiles may be using this.
7737 DATADIRNAME=share
7738 AC_SUBST(DATADIRNAME)
7739
7740 dnl For backward compatibility. Some Makefiles may be using this.
7741 INSTOBJEXT=.mo
7742 AC_SUBST(INSTOBJEXT)
7743
7744 dnl For backward compatibility. Some Makefiles may be using this.
7745 GENCAT=gencat
7746 AC_SUBST(GENCAT)
7747
7748 dnl For backward compatibility. Some Makefiles may be using this.
7749 INTLOBJS=
7750 if test "$USE_INCLUDED_LIBINTL" = yes; then
7751 INTLOBJS="\$(GETTOBJS)"
7752 fi
7753 AC_SUBST(INTLOBJS)
7754
7755 dnl Enable libtool support if the surrounding package wishes it.
7756 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
7757 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
7758 ])
7759
7760 dnl For backward compatibility. Some Makefiles may be using this.
7761 INTLLIBS="$LIBINTL"
7762 AC_SUBST(INTLLIBS)
7763
7764 dnl Make all documented variables known to autoconf.
7765 AC_SUBST(LIBINTL)
7766 AC_SUBST(LTLIBINTL)
7767 AC_SUBST(POSUB)
7768 ])
7769
7770
7771 dnl Checks for all prerequisites of the intl subdirectory,
7772 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
7773 dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
7774 AC_DEFUN([AM_INTL_SUBDIR],
7775 [
7776 AC_REQUIRE([AC_PROG_INSTALL])dnl
7777 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
7778 AC_REQUIRE([AC_PROG_CC])dnl
7779 AC_REQUIRE([AC_CANONICAL_HOST])dnl
7780 AC_REQUIRE([gt_GLIBC2])dnl
7781 AC_REQUIRE([AC_PROG_RANLIB])dnl
7782 AC_REQUIRE([AC_ISC_POSIX])dnl
7783 AC_REQUIRE([AC_HEADER_STDC])dnl
7784 AC_REQUIRE([AC_C_CONST])dnl
7785 AC_REQUIRE([bh_C_SIGNED])dnl
7786 AC_REQUIRE([AC_C_INLINE])dnl
7787 AC_REQUIRE([AC_TYPE_OFF_T])dnl
7788 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
7789 AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
7790 AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
7791 AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
7792 AC_REQUIRE([gt_TYPE_WINT_T])dnl
7793 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
7794 AC_REQUIRE([gl_AC_HEADER_STDINT_H])
7795 AC_REQUIRE([gt_TYPE_INTMAX_T])
7796 AC_REQUIRE([gt_PRINTF_POSIX])
7797 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
7798 AC_REQUIRE([AC_FUNC_MMAP])dnl
7799 AC_REQUIRE([gl_GLIBC21])dnl
7800 AC_REQUIRE([gt_INTDIV0])dnl
7801 AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
7802 AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
7803 AC_REQUIRE([gt_INTTYPES_PRI])dnl
7804 AC_REQUIRE([gl_XSIZE])dnl
7805 AC_REQUIRE([gt_INTL_MACOSX])dnl
7806
7807 AC_CHECK_TYPE([ptrdiff_t], ,
7808 [AC_DEFINE([ptrdiff_t], [long],
7809 [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
7810 ])
7811 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
7812 stdlib.h string.h unistd.h sys/param.h])
7813 AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
7814 mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
7815 strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
7816 __fsetlocking])
7817
7818 dnl Use the _snprintf function only if it is declared (because on NetBSD it
7819 dnl is defined as a weak alias of snprintf; we prefer to use the latter).
7820 gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
7821 gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
7822
7823 dnl Use the *_unlocked functions only if they are declared.
7824 dnl (because some of them were defined without being declared in Solaris
7825 dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
7826 dnl on Solaris 2.5.1 to run on Solaris 2.6).
7827 dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
7828 gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
7829 gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
7830 gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
7831
7832 case $gt_cv_func_printf_posix in
7833 *yes) HAVE_POSIX_PRINTF=1 ;;
7834 *) HAVE_POSIX_PRINTF=0 ;;
7835 esac
7836 AC_SUBST([HAVE_POSIX_PRINTF])
7837 if test "$ac_cv_func_asprintf" = yes; then
7838 HAVE_ASPRINTF=1
7839 else
7840 HAVE_ASPRINTF=0
7841 fi
7842 AC_SUBST([HAVE_ASPRINTF])
7843 if test "$ac_cv_func_snprintf" = yes; then
7844 HAVE_SNPRINTF=1
7845 else
7846 HAVE_SNPRINTF=0
7847 fi
7848 AC_SUBST([HAVE_SNPRINTF])
7849 if test "$ac_cv_func_wprintf" = yes; then
7850 HAVE_WPRINTF=1
7851 else
7852 HAVE_WPRINTF=0
7853 fi
7854 AC_SUBST([HAVE_WPRINTF])
7855
7856 AM_ICONV
7857 AM_LANGINFO_CODESET
7858 if test $ac_cv_header_locale_h = yes; then
7859 gt_LC_MESSAGES
7860 fi
7861
7862 if test -n "$INTL_MACOSX_LIBS"; then
7863 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
7864 fi
7865
7866 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
7867 dnl because plural.y uses bison specific features. It requires at least
7868 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
7869 dnl compile.
7870 dnl bison is only needed for the maintainer (who touches plural.y). But in
7871 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
7872 dnl the rule in general Makefile. Now, some people carelessly touch the
7873 dnl files or have a broken "make" program, hence the plural.c rule will
7874 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
7875 dnl present or too old.
7876 AC_CHECK_PROGS([INTLBISON], [bison])
7877 if test -z "$INTLBISON"; then
7878 ac_verc_fail=yes
7879 else
7880 dnl Found it, now check the version.
7881 AC_MSG_CHECKING([version of bison])
7882 changequote(<<,>>)dnl
7883 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
7884 case $ac_prog_version in
7885 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
7886 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
7887 changequote([,])dnl
7888 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
7889 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
7890 esac
7891 AC_MSG_RESULT([$ac_prog_version])
7892 fi
7893 if test $ac_verc_fail = yes; then
7894 INTLBISON=:
7895 fi
7896 ])
7897
7898
7899 dnl Checks for special options needed on MacOS X.
7900 dnl Defines INTL_MACOSX_LIBS.
7901 AC_DEFUN([gt_INTL_MACOSX],
7902 [
7903 dnl Check for API introduced in MacOS X 10.2.
7904 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
7905 gt_cv_func_CFPreferencesCopyAppValue,
7906 [gt_save_CPPFLAGS="$CPPFLAGS"
7907 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
7908 gt_save_LIBS="$LIBS"
7909 LIBS="$LIBS -framework CoreFoundation"
7910 AC_TRY_LINK([#include <CFPreferences.h>],
7911 [CFPreferencesCopyAppValue(NULL, NULL)],
7912 [gt_cv_func_CFPreferencesCopyAppValue=yes],
7913 [gt_cv_func_CFPreferencesCopyAppValue=no])
7914 CPPFLAGS="$gt_save_CPPFLAGS"
7915 LIBS="$gt_save_LIBS"])
7916 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
7917 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
7918 [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
7919 fi
7920 dnl Check for API introduced in MacOS X 10.3.
7921 AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
7922 [gt_save_CPPFLAGS="$CPPFLAGS"
7923 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
7924 gt_save_LIBS="$LIBS"
7925 LIBS="$LIBS -framework CoreFoundation"
7926 AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],
7927 [gt_cv_func_CFLocaleCopyCurrent=yes],
7928 [gt_cv_func_CFLocaleCopyCurrent=no])
7929 CPPFLAGS="$gt_save_CPPFLAGS"
7930 LIBS="$gt_save_LIBS"])
7931 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
7932 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
7933 [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
7934 fi
7935 INTL_MACOSX_LIBS=
7936 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
7937 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
7938 fi
7939 AC_SUBST([INTL_MACOSX_LIBS])
7940 ])
7941
7942
7943 dnl gt_CHECK_DECL(FUNC, INCLUDES)
7944 dnl Check whether a function is declared.
7945 AC_DEFUN([gt_CHECK_DECL],
7946 [
7947 AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
7948 [AC_TRY_COMPILE([$2], [
7949 #ifndef $1
7950 char *p = (char *) $1;
7951 #endif
7952 ], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
7953 if test $ac_cv_have_decl_$1 = yes; then
7954 gt_value=1
7955 else
7956 gt_value=0
7957 fi
7958 AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
7959 [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
7960 ])
7961
7962
7963 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
7964 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
7965
7966 # po.m4 serial 7 (gettext-0.14.3)
7967 dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
7968 dnl This file is free software; the Free Software Foundation
7969 dnl gives unlimited permission to copy and/or distribute it,
7970 dnl with or without modifications, as long as this notice is preserved.
7971 dnl
7972 dnl This file can can be used in projects which are not available under
7973 dnl the GNU General Public License or the GNU Library General Public
7974 dnl License but which still want to provide support for the GNU gettext
7975 dnl functionality.
7976 dnl Please note that the actual code of the GNU gettext library is covered
7977 dnl by the GNU Library General Public License, and the rest of the GNU
7978 dnl gettext package package is covered by the GNU General Public License.
7979 dnl They are *not* in the public domain.
7980
7981 dnl Authors:
7982 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
7983 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
7984
7985 AC_PREREQ(2.50)
7986
7987 dnl Checks for all prerequisites of the po subdirectory.
7988 AC_DEFUN([AM_PO_SUBDIRS],
7989 [
7990 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
7991 AC_REQUIRE([AC_PROG_INSTALL])dnl
7992 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
7993 AC_REQUIRE([AM_NLS])dnl
7994
7995 dnl Perform the following tests also if --disable-nls has been given,
7996 dnl because they are needed for "make dist" to work.
7997
7998 dnl Search for GNU msgfmt in the PATH.
7999 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
8000 dnl The second test excludes FreeBSD msgfmt.
8001 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
8002 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
8003 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
8004 :)
8005 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
8006
8007 dnl Search for GNU xgettext 0.12 or newer in the PATH.
8008 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
8009 dnl The second test excludes FreeBSD xgettext.
8010 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
8011 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
8012 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
8013 :)
8014 dnl Remove leftover from FreeBSD xgettext call.
8015 rm -f messages.po
8016
8017 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
8018 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
8019 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
8020
8021 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
8022 dnl Test whether we really found GNU msgfmt.
8023 if test "$GMSGFMT" != ":"; then
8024 dnl If it is no GNU msgfmt we define it as : so that the
8025 dnl Makefiles still can work.
8026 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
8027 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
8028 : ;
8029 else
8030 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
8031 AC_MSG_RESULT(
8032 [found $GMSGFMT program is not GNU msgfmt; ignore it])
8033 GMSGFMT=":"
8034 fi
8035 fi
8036
8037 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
8038 dnl Test whether we really found GNU xgettext.
8039 if test "$XGETTEXT" != ":"; then
8040 dnl If it is no GNU xgettext we define it as : so that the
8041 dnl Makefiles still can work.
8042 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
8043 (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
8044 : ;
8045 else
8046 AC_MSG_RESULT(
8047 [found xgettext program is not GNU xgettext; ignore it])
8048 XGETTEXT=":"
8049 fi
8050 dnl Remove leftover from FreeBSD xgettext call.
8051 rm -f messages.po
8052 fi
8053
8054 AC_OUTPUT_COMMANDS([
8055 for ac_file in $CONFIG_FILES; do
8056 # Support "outfile[:infile[:infile...]]"
8057 case "$ac_file" in
8058 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8059 esac
8060 # PO directories have a Makefile.in generated from Makefile.in.in.
8061 case "$ac_file" in */Makefile.in)
8062 # Adjust a relative srcdir.
8063 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
8064 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
8065 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
8066 # In autoconf-2.13 it is called $ac_given_srcdir.
8067 # In autoconf-2.50 it is called $srcdir.
8068 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
8069 case "$ac_given_srcdir" in
8070 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
8071 /*) top_srcdir="$ac_given_srcdir" ;;
8072 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
8073 esac
8074 # Treat a directory as a PO directory if and only if it has a
8075 # POTFILES.in file. This allows packages to have multiple PO
8076 # directories under different names or in different locations.
8077 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
8078 rm -f "$ac_dir/POTFILES"
8079 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
8080 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
8081 POMAKEFILEDEPS="POTFILES.in"
8082 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
8083 # on $ac_dir but don't depend on user-specified configuration
8084 # parameters.
8085 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
8086 # The LINGUAS file contains the set of available languages.
8087 if test -n "$OBSOLETE_ALL_LINGUAS"; then
8088 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
8089 fi
8090 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
8091 # Hide the ALL_LINGUAS assigment from automake.
8092 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
8093 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
8094 else
8095 # The set of available languages was given in configure.in.
8096 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
8097 fi
8098 # Compute POFILES
8099 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
8100 # Compute UPDATEPOFILES
8101 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
8102 # Compute DUMMYPOFILES
8103 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
8104 # Compute GMOFILES
8105 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
8106 case "$ac_given_srcdir" in
8107 .) srcdirpre= ;;
8108 *) srcdirpre='$(srcdir)/' ;;
8109 esac
8110 POFILES=
8111 UPDATEPOFILES=
8112 DUMMYPOFILES=
8113 GMOFILES=
8114 for lang in $ALL_LINGUAS; do
8115 POFILES="$POFILES $srcdirpre$lang.po"
8116 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
8117 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
8118 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
8119 done
8120 # CATALOGS depends on both $ac_dir and the user's LINGUAS
8121 # environment variable.
8122 INST_LINGUAS=
8123 if test -n "$ALL_LINGUAS"; then
8124 for presentlang in $ALL_LINGUAS; do
8125 useit=no
8126 if test "%UNSET%" != "$LINGUAS"; then
8127 desiredlanguages="$LINGUAS"
8128 else
8129 desiredlanguages="$ALL_LINGUAS"
8130 fi
8131 for desiredlang in $desiredlanguages; do
8132 # Use the presentlang catalog if desiredlang is
8133 # a. equal to presentlang, or
8134 # b. a variant of presentlang (because in this case,
8135 # presentlang can be used as a fallback for messages
8136 # which are not translated in the desiredlang catalog).
8137 case "$desiredlang" in
8138 "$presentlang"*) useit=yes;;
8139 esac
8140 done
8141 if test $useit = yes; then
8142 INST_LINGUAS="$INST_LINGUAS $presentlang"
8143 fi
8144 done
8145 fi
8146 CATALOGS=
8147 if test -n "$INST_LINGUAS"; then
8148 for lang in $INST_LINGUAS; do
8149 CATALOGS="$CATALOGS $lang.gmo"
8150 done
8151 fi
8152 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
8153 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
8154 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
8155 if test -f "$f"; then
8156 case "$f" in
8157 *.orig | *.bak | *~) ;;
8158 *) cat "$f" >> "$ac_dir/Makefile" ;;
8159 esac
8160 fi
8161 done
8162 fi
8163 ;;
8164 esac
8165 done],
8166 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
8167 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
8168 # from automake.
8169 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
8170 # Capture the value of LINGUAS because we need it to compute CATALOGS.
8171 LINGUAS="${LINGUAS-%UNSET%}"
8172 ])
8173 ])
8174
8175 dnl Postprocesses a Makefile in a directory containing PO files.
8176 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
8177 [
8178 # When this code is run, in config.status, two variables have already been
8179 # set:
8180 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
8181 # - LINGUAS is the value of the environment variable LINGUAS at configure
8182 # time.
8183
8184 changequote(,)dnl
8185 # Adjust a relative srcdir.
8186 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
8187 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
8188 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
8189 # In autoconf-2.13 it is called $ac_given_srcdir.
8190 # In autoconf-2.50 it is called $srcdir.
8191 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
8192 case "$ac_given_srcdir" in
8193 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
8194 /*) top_srcdir="$ac_given_srcdir" ;;
8195 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
8196 esac
8197
8198 # Find a way to echo strings without interpreting backslash.
8199 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
8200 gt_echo='echo'
8201 else
8202 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
8203 gt_echo='printf %s\n'
8204 else
8205 echo_func () {
8206 cat <<EOT
8207 $*
8208 EOT
8209 }
8210 gt_echo='echo_func'
8211 fi
8212 fi
8213
8214 # A sed script that extracts the value of VARIABLE from a Makefile.
8215 sed_x_variable='
8216 # Test if the hold space is empty.
8217 x
8218 s/P/P/
8219 x
8220 ta
8221 # Yes it was empty. Look if we have the expected variable definition.
8222 /^[ ]*VARIABLE[ ]*=/{
8223 # Seen the first line of the variable definition.
8224 s/^[ ]*VARIABLE[ ]*=//
8225 ba
8226 }
8227 bd
8228 :a
8229 # Here we are processing a line from the variable definition.
8230 # Remove comment, more precisely replace it with a space.
8231 s/#.*$/ /
8232 # See if the line ends in a backslash.
8233 tb
8234 :b
8235 s/\\$//
8236 # Print the line, without the trailing backslash.
8237 p
8238 tc
8239 # There was no trailing backslash. The end of the variable definition is
8240 # reached. Clear the hold space.
8241 s/^.*$//
8242 x
8243 bd
8244 :c
8245 # A trailing backslash means that the variable definition continues in the
8246 # next line. Put a nonempty string into the hold space to indicate this.
8247 s/^.*$/P/
8248 x
8249 :d
8250 '
8251 changequote([,])dnl
8252
8253 # Set POTFILES to the value of the Makefile variable POTFILES.
8254 sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
8255 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
8256 # Compute POTFILES_DEPS as
8257 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
8258 POTFILES_DEPS=
8259 for file in $POTFILES; do
8260 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
8261 done
8262 POMAKEFILEDEPS=""
8263
8264 if test -n "$OBSOLETE_ALL_LINGUAS"; then
8265 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
8266 fi
8267 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
8268 # The LINGUAS file contains the set of available languages.
8269 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
8270 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
8271 else
8272 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
8273 sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
8274 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
8275 fi
8276 # Hide the ALL_LINGUAS assigment from automake.
8277 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
8278 # Compute POFILES
8279 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
8280 # Compute UPDATEPOFILES
8281 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
8282 # Compute DUMMYPOFILES
8283 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
8284 # Compute GMOFILES
8285 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
8286 # Compute PROPERTIESFILES
8287 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
8288 # Compute CLASSFILES
8289 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
8290 # Compute QMFILES
8291 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
8292 # Compute MSGFILES
8293 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
8294 # Compute RESOURCESDLLFILES
8295 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
8296 case "$ac_given_srcdir" in
8297 .) srcdirpre= ;;
8298 *) srcdirpre='$(srcdir)/' ;;
8299 esac
8300 POFILES=
8301 UPDATEPOFILES=
8302 DUMMYPOFILES=
8303 GMOFILES=
8304 PROPERTIESFILES=
8305 CLASSFILES=
8306 QMFILES=
8307 MSGFILES=
8308 RESOURCESDLLFILES=
8309 for lang in $ALL_LINGUAS; do
8310 POFILES="$POFILES $srcdirpre$lang.po"
8311 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
8312 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
8313 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
8314 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
8315 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
8316 QMFILES="$QMFILES $srcdirpre$lang.qm"
8317 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
8318 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
8319 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
8320 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
8321 done
8322 # CATALOGS depends on both $ac_dir and the user's LINGUAS
8323 # environment variable.
8324 INST_LINGUAS=
8325 if test -n "$ALL_LINGUAS"; then
8326 for presentlang in $ALL_LINGUAS; do
8327 useit=no
8328 if test "%UNSET%" != "$LINGUAS"; then
8329 desiredlanguages="$LINGUAS"
8330 else
8331 desiredlanguages="$ALL_LINGUAS"
8332 fi
8333 for desiredlang in $desiredlanguages; do
8334 # Use the presentlang catalog if desiredlang is
8335 # a. equal to presentlang, or
8336 # b. a variant of presentlang (because in this case,
8337 # presentlang can be used as a fallback for messages
8338 # which are not translated in the desiredlang catalog).
8339 case "$desiredlang" in
8340 "$presentlang"*) useit=yes;;
8341 esac
8342 done
8343 if test $useit = yes; then
8344 INST_LINGUAS="$INST_LINGUAS $presentlang"
8345 fi
8346 done
8347 fi
8348 CATALOGS=
8349 JAVACATALOGS=
8350 QTCATALOGS=
8351 TCLCATALOGS=
8352 CSHARPCATALOGS=
8353 if test -n "$INST_LINGUAS"; then
8354 for lang in $INST_LINGUAS; do
8355 CATALOGS="$CATALOGS $lang.gmo"
8356 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
8357 QTCATALOGS="$QTCATALOGS $lang.qm"
8358 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
8359 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
8360 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
8361 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
8362 done
8363 fi
8364
8365 sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
8366 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
8367 # Add dependencies that cannot be formulated as a simple suffix rule.
8368 for lang in $ALL_LINGUAS; do
8369 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
8370 cat >> "$ac_file.tmp" <<EOF
8371 $frobbedlang.msg: $lang.po
8372 @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
8373 \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
8374 EOF
8375 done
8376 fi
8377 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
8378 # Add dependencies that cannot be formulated as a simple suffix rule.
8379 for lang in $ALL_LINGUAS; do
8380 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
8381 cat >> "$ac_file.tmp" <<EOF
8382 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
8383 @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
8384 \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
8385 EOF
8386 done
8387 fi
8388 if test -n "$POMAKEFILEDEPS"; then
8389 cat >> "$ac_file.tmp" <<EOF
8390 Makefile: $POMAKEFILEDEPS
8391 EOF
8392 fi
8393 mv "$ac_file.tmp" "$ac_file"
8394 ])
8395
8396 # nls.m4 serial 2 (gettext-0.14.3)
8397 dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc.
8398 dnl This file is free software; the Free Software Foundation
8399 dnl gives unlimited permission to copy and/or distribute it,
8400 dnl with or without modifications, as long as this notice is preserved.
8401 dnl
8402 dnl This file can can be used in projects which are not available under
8403 dnl the GNU General Public License or the GNU Library General Public
8404 dnl License but which still want to provide support for the GNU gettext
8405 dnl functionality.
8406 dnl Please note that the actual code of the GNU gettext library is covered
8407 dnl by the GNU Library General Public License, and the rest of the GNU
8408 dnl gettext package package is covered by the GNU General Public License.
8409 dnl They are *not* in the public domain.
8410
8411 dnl Authors:
8412 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
8413 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
8414
8415 AC_PREREQ(2.50)
8416
8417 AC_DEFUN([AM_NLS],
8418 [
8419 AC_MSG_CHECKING([whether NLS is requested])
8420 dnl Default is enabled NLS
8421 AC_ARG_ENABLE(nls,
8422 [ --disable-nls do not use Native Language Support],
8423 USE_NLS=$enableval, USE_NLS=yes)
8424 AC_MSG_RESULT($USE_NLS)
8425 AC_SUBST(USE_NLS)
8426 ])
8427
8428 AC_DEFUN([AM_MKINSTALLDIRS],
8429 [
8430 dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing.
8431 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])])
8432 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
8433 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
8434 dnl Try to locate it.
8435 MKINSTALLDIRS=
8436 if test -n "$ac_aux_dir"; then
8437 case "$ac_aux_dir" in
8438 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
8439 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
8440 esac
8441 fi
8442 if test -z "$MKINSTALLDIRS"; then
8443 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8444 fi
8445 AC_SUBST(MKINSTALLDIRS)
8446 ])
8447
8448 # progtest.m4 serial 4 (gettext-0.14.2)
8449 dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
8450 dnl This file is free software; the Free Software Foundation
8451 dnl gives unlimited permission to copy and/or distribute it,
8452 dnl with or without modifications, as long as this notice is preserved.
8453 dnl
8454 dnl This file can can be used in projects which are not available under
8455 dnl the GNU General Public License or the GNU Library General Public
8456 dnl License but which still want to provide support for the GNU gettext
8457 dnl functionality.
8458 dnl Please note that the actual code of the GNU gettext library is covered
8459 dnl by the GNU Library General Public License, and the rest of the GNU
8460 dnl gettext package package is covered by the GNU General Public License.
8461 dnl They are *not* in the public domain.
8462
8463 dnl Authors:
8464 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
8465
8466 AC_PREREQ(2.50)
8467
8468 # Search path for a program which passes the given test.
8469
8470 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
8471 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
8472 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
8473 [
8474 # Prepare PATH_SEPARATOR.
8475 # The user is always right.
8476 if test "${PATH_SEPARATOR+set}" != set; then
8477 echo "#! /bin/sh" >conf$$.sh
8478 echo "exit 0" >>conf$$.sh
8479 chmod +x conf$$.sh
8480 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8481 PATH_SEPARATOR=';'
8482 else
8483 PATH_SEPARATOR=:
8484 fi
8485 rm -f conf$$.sh
8486 fi
8487
8488 # Find out how to test for executable files. Don't use a zero-byte file,
8489 # as systems may use methods other than mode bits to determine executability.
8490 cat >conf$$.file <<_ASEOF
8491 #! /bin/sh
8492 exit 0
8493 _ASEOF
8494 chmod +x conf$$.file
8495 if test -x conf$$.file >/dev/null 2>&1; then
8496 ac_executable_p="test -x"
8497 else
8498 ac_executable_p="test -f"
8499 fi
8500 rm -f conf$$.file
8501
8502 # Extract the first word of "$2", so it can be a program name with args.
8503 set dummy $2; ac_word=[$]2
8504 AC_MSG_CHECKING([for $ac_word])
8505 AC_CACHE_VAL(ac_cv_path_$1,
8506 [case "[$]$1" in
8507 [[\\/]]* | ?:[[\\/]]*)
8508 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
8509 ;;
8510 *)
8511 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
8512 for ac_dir in ifelse([$5], , $PATH, [$5]); do
8513 IFS="$ac_save_IFS"
8514 test -z "$ac_dir" && ac_dir=.
8515 for ac_exec_ext in '' $ac_executable_extensions; do
8516 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
8517 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
8518 if [$3]; then
8519 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
8520 break 2
8521 fi
8522 fi
8523 done
8524 done
8525 IFS="$ac_save_IFS"
8526 dnl If no 4th arg is given, leave the cache variable unset,
8527 dnl so AC_PATH_PROGS will keep looking.
8528 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
8529 ])dnl
8530 ;;
8531 esac])dnl
8532 $1="$ac_cv_path_$1"
8533 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
8534 AC_MSG_RESULT([$]$1)
8535 else
8536 AC_MSG_RESULT(no)
8537 fi
8538 AC_SUBST($1)dnl
8539 ])
8540
8541 # iconv.m4 serial AM4 (gettext-0.11.3)
8542 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
8543 dnl This file is free software; the Free Software Foundation
8544 dnl gives unlimited permission to copy and/or distribute it,
8545 dnl with or without modifications, as long as this notice is preserved.
8546
8547 dnl From Bruno Haible.
8548
8549 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
8550 [
8551 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
8552 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
8553 AC_REQUIRE([AC_LIB_RPATH])
8554
8555 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
8556 dnl accordingly.
8557 AC_LIB_LINKFLAGS_BODY([iconv])
8558 ])
8559
8560 AC_DEFUN([AM_ICONV_LINK],
8561 [
8562 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
8563 dnl those with the standalone portable GNU libiconv installed).
8564
8565 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
8566 dnl accordingly.
8567 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
8568
8569 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
8570 dnl because if the user has installed libiconv and not disabled its use
8571 dnl via --without-libiconv-prefix, he wants to use it. The first
8572 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
8573 am_save_CPPFLAGS="$CPPFLAGS"
8574 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
8575
8576 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
8577 am_cv_func_iconv="no, consider installing GNU libiconv"
8578 am_cv_lib_iconv=no
8579 AC_TRY_LINK([#include <stdlib.h>
8580 #include <iconv.h>],
8581 [iconv_t cd = iconv_open("","");
8582 iconv(cd,NULL,NULL,NULL,NULL);
8583 iconv_close(cd);],
8584 am_cv_func_iconv=yes)
8585 if test "$am_cv_func_iconv" != yes; then
8586 am_save_LIBS="$LIBS"
8587 LIBS="$LIBS $LIBICONV"
8588 AC_TRY_LINK([#include <stdlib.h>
8589 #include <iconv.h>],
8590 [iconv_t cd = iconv_open("","");
8591 iconv(cd,NULL,NULL,NULL,NULL);
8592 iconv_close(cd);],
8593 am_cv_lib_iconv=yes
8594 am_cv_func_iconv=yes)
8595 LIBS="$am_save_LIBS"
8596 fi
8597 ])
8598 if test "$am_cv_func_iconv" = yes; then
8599 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
8600 fi
8601 if test "$am_cv_lib_iconv" = yes; then
8602 AC_MSG_CHECKING([how to link with libiconv])
8603 AC_MSG_RESULT([$LIBICONV])
8604 else
8605 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
8606 dnl either.
8607 CPPFLAGS="$am_save_CPPFLAGS"
8608 LIBICONV=
8609 LTLIBICONV=
8610 fi
8611 AC_SUBST(LIBICONV)
8612 AC_SUBST(LTLIBICONV)
8613 ])
8614
8615 AC_DEFUN([AM_ICONV],
8616 [
8617 AM_ICONV_LINK
8618 if test "$am_cv_func_iconv" = yes; then
8619 AC_MSG_CHECKING([for iconv declaration])
8620 AC_CACHE_VAL(am_cv_proto_iconv, [
8621 AC_TRY_COMPILE([
8622 #include <stdlib.h>
8623 #include <iconv.h>
8624 extern
8625 #ifdef __cplusplus
8626 "C"
8627 #endif
8628 #if defined(__STDC__) || defined(__cplusplus)
8629 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8630 #else
8631 size_t iconv();
8632 #endif
8633 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
8634 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
8635 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8636 AC_MSG_RESULT([$]{ac_t:-
8637 }[$]am_cv_proto_iconv)
8638 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
8639 [Define as const if the declaration of iconv() needs const.])
8640 fi
8641 ])
8642
8643 # glibc2.m4 serial 1
8644 dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
8645 dnl This file is free software; the Free Software Foundation
8646 dnl gives unlimited permission to copy and/or distribute it,
8647 dnl with or without modifications, as long as this notice is preserved.
8648
8649 # Test for the GNU C Library, version 2.0 or newer.
8650 # From Bruno Haible.
8651
8652 AC_DEFUN([gt_GLIBC2],
8653 [
8654 AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
8655 ac_cv_gnu_library_2,
8656 [AC_EGREP_CPP([Lucky GNU user],
8657 [
8658 #include <features.h>
8659 #ifdef __GNU_LIBRARY__
8660 #if (__GLIBC__ >= 2)
8661 Lucky GNU user
8662 #endif
8663 #endif
8664 ],
8665 ac_cv_gnu_library_2=yes,
8666 ac_cv_gnu_library_2=no)
8667 ]
8668 )
8669 AC_SUBST(GLIBC2)
8670 GLIBC2="$ac_cv_gnu_library_2"
8671 ]
8672 )
8673
8674 # signed.m4 serial 1 (gettext-0.10.40)
8675 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
8676 dnl This file is free software; the Free Software Foundation
8677 dnl gives unlimited permission to copy and/or distribute it,
8678 dnl with or without modifications, as long as this notice is preserved.
8679
8680 dnl From Bruno Haible.
8681
8682 AC_DEFUN([bh_C_SIGNED],
8683 [
8684 AC_CACHE_CHECK([for signed], bh_cv_c_signed,
8685 [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
8686 if test $bh_cv_c_signed = no; then
8687 AC_DEFINE(signed, ,
8688 [Define to empty if the C compiler doesn't support this keyword.])
8689 fi
8690 ])
8691
8692 # longlong.m4 serial 5
8693 dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
8694 dnl This file is free software; the Free Software Foundation
8695 dnl gives unlimited permission to copy and/or distribute it,
8696 dnl with or without modifications, as long as this notice is preserved.
8697
8698 dnl From Paul Eggert.
8699
8700 # Define HAVE_LONG_LONG if 'long long' works.
8701
8702 AC_DEFUN([gl_AC_TYPE_LONG_LONG],
8703 [
8704 AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
8705 [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
8706 [long long llmax = (long long) -1;
8707 return ll << i | ll >> i | llmax / ll | llmax % ll;],
8708 ac_cv_type_long_long=yes,
8709 ac_cv_type_long_long=no)])
8710 if test $ac_cv_type_long_long = yes; then
8711 AC_DEFINE(HAVE_LONG_LONG, 1,
8712 [Define if you have the 'long long' type.])
8713 fi
8714 ])
8715
8716 # longdouble.m4 serial 1 (gettext-0.12)
8717 dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
8718 dnl This file is free software; the Free Software Foundation
8719 dnl gives unlimited permission to copy and/or distribute it,
8720 dnl with or without modifications, as long as this notice is preserved.
8721
8722 dnl From Bruno Haible.
8723 dnl Test whether the compiler supports the 'long double' type.
8724 dnl Prerequisite: AC_PROG_CC
8725
8726 AC_DEFUN([gt_TYPE_LONGDOUBLE],
8727 [
8728 AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
8729 [if test "$GCC" = yes; then
8730 gt_cv_c_long_double=yes
8731 else
8732 AC_TRY_COMPILE([
8733 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
8734 long double foo = 0.0;
8735 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8736 int array [2*(sizeof(long double) >= sizeof(double)) - 1];
8737 ], ,
8738 gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
8739 fi])
8740 if test $gt_cv_c_long_double = yes; then
8741 AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
8742 fi
8743 ])
8744
8745 # wchar_t.m4 serial 1 (gettext-0.12)
8746 dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
8747 dnl This file is free software; the Free Software Foundation
8748 dnl gives unlimited permission to copy and/or distribute it,
8749 dnl with or without modifications, as long as this notice is preserved.
8750
8751 dnl From Bruno Haible.
8752 dnl Test whether <stddef.h> has the 'wchar_t' type.
8753 dnl Prerequisite: AC_PROG_CC
8754
8755 AC_DEFUN([gt_TYPE_WCHAR_T],
8756 [
8757 AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
8758 [AC_TRY_COMPILE([#include <stddef.h>
8759 wchar_t foo = (wchar_t)'\0';], ,
8760 gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
8761 if test $gt_cv_c_wchar_t = yes; then
8762 AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
8763 fi
8764 ])
8765
8766 # wint_t.m4 serial 1 (gettext-0.12)
8767 dnl Copyright (C) 2003 Free Software Foundation, Inc.
8768 dnl This file is free software; the Free Software Foundation
8769 dnl gives unlimited permission to copy and/or distribute it,
8770 dnl with or without modifications, as long as this notice is preserved.
8771
8772 dnl From Bruno Haible.
8773 dnl Test whether <wchar.h> has the 'wint_t' type.
8774 dnl Prerequisite: AC_PROG_CC
8775
8776 AC_DEFUN([gt_TYPE_WINT_T],
8777 [
8778 AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
8779 [AC_TRY_COMPILE([#include <wchar.h>
8780 wint_t foo = (wchar_t)'\0';], ,
8781 gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
8782 if test $gt_cv_c_wint_t = yes; then
8783 AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
8784 fi
8785 ])
8786
8787 # inttypes_h.m4 serial 6
8788 dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
8789 dnl This file is free software; the Free Software Foundation
8790 dnl gives unlimited permission to copy and/or distribute it,
8791 dnl with or without modifications, as long as this notice is preserved.
8792
8793 dnl From Paul Eggert.
8794
8795 # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
8796 # doesn't clash with <sys/types.h>, and declares uintmax_t.
8797
8798 AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
8799 [
8800 AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
8801 [AC_TRY_COMPILE(
8802 [#include <sys/types.h>
8803 #include <inttypes.h>],
8804 [uintmax_t i = (uintmax_t) -1;],
8805 gl_cv_header_inttypes_h=yes,
8806 gl_cv_header_inttypes_h=no)])
8807 if test $gl_cv_header_inttypes_h = yes; then
8808 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
8809 [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
8810 and declares uintmax_t. ])
8811 fi
8812 ])
8813
8814 # stdint_h.m4 serial 5
8815 dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
8816 dnl This file is free software; the Free Software Foundation
8817 dnl gives unlimited permission to copy and/or distribute it,
8818 dnl with or without modifications, as long as this notice is preserved.
8819
8820 dnl From Paul Eggert.
8821
8822 # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
8823 # doesn't clash with <sys/types.h>, and declares uintmax_t.
8824
8825 AC_DEFUN([gl_AC_HEADER_STDINT_H],
8826 [
8827 AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
8828 [AC_TRY_COMPILE(
8829 [#include <sys/types.h>
8830 #include <stdint.h>],
8831 [uintmax_t i = (uintmax_t) -1;],
8832 gl_cv_header_stdint_h=yes,
8833 gl_cv_header_stdint_h=no)])
8834 if test $gl_cv_header_stdint_h = yes; then
8835 AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
8836 [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
8837 and declares uintmax_t. ])
8838 fi
8839 ])
8840
8841 # intmax.m4 serial 2 (gettext-0.14.2)
8842 dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
8843 dnl This file is free software; the Free Software Foundation
8844 dnl gives unlimited permission to copy and/or distribute it,
8845 dnl with or without modifications, as long as this notice is preserved.
8846
8847 dnl From Bruno Haible.
8848 dnl Test whether the system has the 'intmax_t' type, but don't attempt to
8849 dnl find a replacement if it is lacking.
8850
8851 AC_DEFUN([gt_TYPE_INTMAX_T],
8852 [
8853 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
8854 AC_REQUIRE([gl_AC_HEADER_STDINT_H])
8855 AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
8856 [AC_TRY_COMPILE([
8857 #include <stddef.h>
8858 #include <stdlib.h>
8859 #if HAVE_STDINT_H_WITH_UINTMAX
8860 #include <stdint.h>
8861 #endif
8862 #if HAVE_INTTYPES_H_WITH_UINTMAX
8863 #include <inttypes.h>
8864 #endif
8865 ], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
8866 if test $gt_cv_c_intmax_t = yes; then
8867 AC_DEFINE(HAVE_INTMAX_T, 1,
8868 [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
8869 fi
8870 ])
8871
8872 # printf-posix.m4 serial 2 (gettext-0.13.1)
8873 dnl Copyright (C) 2003 Free Software Foundation, Inc.
8874 dnl This file is free software; the Free Software Foundation
8875 dnl gives unlimited permission to copy and/or distribute it,
8876 dnl with or without modifications, as long as this notice is preserved.
8877
8878 dnl From Bruno Haible.
8879 dnl Test whether the printf() function supports POSIX/XSI format strings with
8880 dnl positions.
8881
8882 AC_DEFUN([gt_PRINTF_POSIX],
8883 [
8884 AC_REQUIRE([AC_PROG_CC])
8885 AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
8886 gt_cv_func_printf_posix,
8887 [
8888 AC_TRY_RUN([
8889 #include <stdio.h>
8890 #include <string.h>
8891 /* The string "%2$d %1$d", with dollar characters protected from the shell's
8892 dollar expansion (possibly an autoconf bug). */
8893 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
8894 static char buf[100];
8895 int main ()
8896 {
8897 sprintf (buf, format, 33, 55);
8898 return (strcmp (buf, "55 33") != 0);
8899 }], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
8900 [
8901 AC_EGREP_CPP(notposix, [
8902 #if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
8903 notposix
8904 #endif
8905 ], gt_cv_func_printf_posix="guessing no",
8906 gt_cv_func_printf_posix="guessing yes")
8907 ])
8908 ])
8909 case $gt_cv_func_printf_posix in
8910 *yes)
8911 AC_DEFINE(HAVE_POSIX_PRINTF, 1,
8912 [Define if your printf() function supports format strings with positions.])
8913 ;;
8914 esac
8915 ])
8916
8917 # glibc21.m4 serial 3
8918 dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
8919 dnl This file is free software; the Free Software Foundation
8920 dnl gives unlimited permission to copy and/or distribute it,
8921 dnl with or without modifications, as long as this notice is preserved.
8922
8923 # Test for the GNU C Library, version 2.1 or newer.
8924 # From Bruno Haible.
8925
8926 AC_DEFUN([gl_GLIBC21],
8927 [
8928 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
8929 ac_cv_gnu_library_2_1,
8930 [AC_EGREP_CPP([Lucky GNU user],
8931 [
8932 #include <features.h>
8933 #ifdef __GNU_LIBRARY__
8934 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
8935 Lucky GNU user
8936 #endif
8937 #endif
8938 ],
8939 ac_cv_gnu_library_2_1=yes,
8940 ac_cv_gnu_library_2_1=no)
8941 ]
8942 )
8943 AC_SUBST(GLIBC21)
8944 GLIBC21="$ac_cv_gnu_library_2_1"
8945 ]
8946 )
8947
8948 # intdiv0.m4 serial 1 (gettext-0.11.3)
8949 dnl Copyright (C) 2002 Free Software Foundation, Inc.
8950 dnl This file is free software; the Free Software Foundation
8951 dnl gives unlimited permission to copy and/or distribute it,
8952 dnl with or without modifications, as long as this notice is preserved.
8953
8954 dnl From Bruno Haible.
8955
8956 AC_DEFUN([gt_INTDIV0],
8957 [
8958 AC_REQUIRE([AC_PROG_CC])dnl
8959 AC_REQUIRE([AC_CANONICAL_HOST])dnl
8960
8961 AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
8962 gt_cv_int_divbyzero_sigfpe,
8963 [
8964 AC_TRY_RUN([
8965 #include <stdlib.h>
8966 #include <signal.h>
8967
8968 static void
8969 #ifdef __cplusplus
8970 sigfpe_handler (int sig)
8971 #else
8972 sigfpe_handler (sig) int sig;
8973 #endif
8974 {
8975 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
8976 exit (sig != SIGFPE);
8977 }
8978
8979 int x = 1;
8980 int y = 0;
8981 int z;
8982 int nan;
8983
8984 int main ()
8985 {
8986 signal (SIGFPE, sigfpe_handler);
8987 /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
8988 #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
8989 signal (SIGTRAP, sigfpe_handler);
8990 #endif
8991 /* Linux/SPARC yields signal SIGILL. */
8992 #if defined (__sparc__) && defined (__linux__)
8993 signal (SIGILL, sigfpe_handler);
8994 #endif
8995
8996 z = x / y;
8997 nan = y / y;
8998 exit (1);
8999 }
9000 ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
9001 [
9002 # Guess based on the CPU.
9003 case "$host_cpu" in
9004 alpha* | i[34567]86 | m68k | s390*)
9005 gt_cv_int_divbyzero_sigfpe="guessing yes";;
9006 *)
9007 gt_cv_int_divbyzero_sigfpe="guessing no";;
9008 esac
9009 ])
9010 ])
9011 case "$gt_cv_int_divbyzero_sigfpe" in
9012 *yes) value=1;;
9013 *) value=0;;
9014 esac
9015 AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
9016 [Define if integer division by zero raises signal SIGFPE.])
9017 ])
9018
9019 # uintmax_t.m4 serial 9
9020 dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
9021 dnl This file is free software; the Free Software Foundation
9022 dnl gives unlimited permission to copy and/or distribute it,
9023 dnl with or without modifications, as long as this notice is preserved.
9024
9025 dnl From Paul Eggert.
9026
9027 AC_PREREQ(2.13)
9028
9029 # Define uintmax_t to 'unsigned long' or 'unsigned long long'
9030 # if it is not already defined in <stdint.h> or <inttypes.h>.
9031
9032 AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
9033 [
9034 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
9035 AC_REQUIRE([gl_AC_HEADER_STDINT_H])
9036 if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
9037 AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
9038 test $ac_cv_type_unsigned_long_long = yes \
9039 && ac_type='unsigned long long' \
9040 || ac_type='unsigned long'
9041 AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
9042 [Define to unsigned long or unsigned long long
9043 if <stdint.h> and <inttypes.h> don't define.])
9044 else
9045 AC_DEFINE(HAVE_UINTMAX_T, 1,
9046 [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
9047 fi
9048 ])
9049
9050 # ulonglong.m4 serial 4
9051 dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
9052 dnl This file is free software; the Free Software Foundation
9053 dnl gives unlimited permission to copy and/or distribute it,
9054 dnl with or without modifications, as long as this notice is preserved.
9055
9056 dnl From Paul Eggert.
9057
9058 # Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
9059
9060 AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
9061 [
9062 AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
9063 [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
9064 [unsigned long long ullmax = (unsigned long long) -1;
9065 return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
9066 ac_cv_type_unsigned_long_long=yes,
9067 ac_cv_type_unsigned_long_long=no)])
9068 if test $ac_cv_type_unsigned_long_long = yes; then
9069 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
9070 [Define if you have the 'unsigned long long' type.])
9071 fi
9072 ])
9073
9074 # inttypes.m4 serial 1 (gettext-0.11.4)
9075 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
9076 dnl This file is free software; the Free Software Foundation
9077 dnl gives unlimited permission to copy and/or distribute it,
9078 dnl with or without modifications, as long as this notice is preserved.
9079
9080 dnl From Paul Eggert.
9081
9082 # Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
9083 # <sys/types.h>.
9084
9085 AC_DEFUN([gt_HEADER_INTTYPES_H],
9086 [
9087 AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
9088 [
9089 AC_TRY_COMPILE(
9090 [#include <sys/types.h>
9091 #include <inttypes.h>],
9092 [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
9093 ])
9094 if test $gt_cv_header_inttypes_h = yes; then
9095 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
9096 [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
9097 fi
9098 ])
9099
9100 # inttypes-pri.m4 serial 1 (gettext-0.11.4)
9101 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
9102 dnl This file is free software; the Free Software Foundation
9103 dnl gives unlimited permission to copy and/or distribute it,
9104 dnl with or without modifications, as long as this notice is preserved.
9105
9106 dnl From Bruno Haible.
9107
9108 # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
9109 # macros to non-string values. This is the case on AIX 4.3.3.
9110
9111 AC_DEFUN([gt_INTTYPES_PRI],
9112 [
9113 AC_REQUIRE([gt_HEADER_INTTYPES_H])
9114 if test $gt_cv_header_inttypes_h = yes; then
9115 AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
9116 gt_cv_inttypes_pri_broken,
9117 [
9118 AC_TRY_COMPILE([#include <inttypes.h>
9119 #ifdef PRId32
9120 char *p = PRId32;
9121 #endif
9122 ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
9123 ])
9124 fi
9125 if test "$gt_cv_inttypes_pri_broken" = yes; then
9126 AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
9127 [Define if <inttypes.h> exists and defines unusable PRI* macros.])
9128 fi
9129 ])
9130
9131 # xsize.m4 serial 3
9132 dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
9133 dnl This file is free software; the Free Software Foundation
9134 dnl gives unlimited permission to copy and/or distribute it,
9135 dnl with or without modifications, as long as this notice is preserved.
9136
9137 AC_DEFUN([gl_XSIZE],
9138 [
9139 dnl Prerequisites of lib/xsize.h.
9140 AC_REQUIRE([gl_SIZE_MAX])
9141 AC_REQUIRE([AC_C_INLINE])
9142 AC_CHECK_HEADERS(stdint.h)
9143 ])
9144
9145 # size_max.m4 serial 2
9146 dnl Copyright (C) 2003 Free Software Foundation, Inc.
9147 dnl This file is free software; the Free Software Foundation
9148 dnl gives unlimited permission to copy and/or distribute it,
9149 dnl with or without modifications, as long as this notice is preserved.
9150
9151 dnl From Bruno Haible.
9152
9153 AC_DEFUN([gl_SIZE_MAX],
9154 [
9155 AC_CHECK_HEADERS(stdint.h)
9156 dnl First test whether the system already has SIZE_MAX.
9157 AC_MSG_CHECKING([for SIZE_MAX])
9158 result=
9159 AC_EGREP_CPP([Found it], [
9160 #include <limits.h>
9161 #if HAVE_STDINT_H
9162 #include <stdint.h>
9163 #endif
9164 #ifdef SIZE_MAX
9165 Found it
9166 #endif
9167 ], result=yes)
9168 if test -z "$result"; then
9169 dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
9170 dnl than the type 'unsigned long'.
9171 dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
9172 dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
9173 _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
9174 [#include <stddef.h>], result=?)
9175 _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
9176 [#include <stddef.h>], result=?)
9177 _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
9178 [#include <stddef.h>], result=?)
9179 if test "$fits_in_uint" = 1; then
9180 dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
9181 dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
9182 AC_TRY_COMPILE([#include <stddef.h>
9183 extern size_t foo;
9184 extern unsigned long foo;
9185 ], [], fits_in_uint=0)
9186 fi
9187 if test -z "$result"; then
9188 if test "$fits_in_uint" = 1; then
9189 result="$res_hi$res_lo"U
9190 else
9191 result="$res_hi$res_lo"UL
9192 fi
9193 else
9194 dnl Shouldn't happen, but who knows...
9195 result='~(size_t)0'
9196 fi
9197 fi
9198 AC_MSG_RESULT([$result])
9199 if test "$result" != yes; then
9200 AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
9201 [Define as the maximum value of type 'size_t', if the system doesn't define it.])
9202 fi
9203 ])
9204
9205 # codeset.m4 serial AM1 (gettext-0.10.40)
9206 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
9207 dnl This file is free software; the Free Software Foundation
9208 dnl gives unlimited permission to copy and/or distribute it,
9209 dnl with or without modifications, as long as this notice is preserved.
9210
9211 dnl From Bruno Haible.
9212
9213 AC_DEFUN([AM_LANGINFO_CODESET],
9214 [
9215 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
9216 [AC_TRY_LINK([#include <langinfo.h>],
9217 [char* cs = nl_langinfo(CODESET);],
9218 am_cv_langinfo_codeset=yes,
9219 am_cv_langinfo_codeset=no)
9220 ])
9221 if test $am_cv_langinfo_codeset = yes; then
9222 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
9223 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
9224 fi
9225 ])
9226
9227 # lcmessage.m4 serial 4 (gettext-0.14.2)
9228 dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc.
9229 dnl This file is free software; the Free Software Foundation
9230 dnl gives unlimited permission to copy and/or distribute it,
9231 dnl with or without modifications, as long as this notice is preserved.
9232 dnl
9233 dnl This file can can be used in projects which are not available under
9234 dnl the GNU General Public License or the GNU Library General Public
9235 dnl License but which still want to provide support for the GNU gettext
9236 dnl functionality.
9237 dnl Please note that the actual code of the GNU gettext library is covered
9238 dnl by the GNU Library General Public License, and the rest of the GNU
9239 dnl gettext package package is covered by the GNU General Public License.
9240 dnl They are *not* in the public domain.
9241
9242 dnl Authors:
9243 dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
9244
9245 # Check whether LC_MESSAGES is available in <locale.h>.
9246
9247 AC_DEFUN([gt_LC_MESSAGES],
9248 [
9249 AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES,
9250 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
9251 gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)])
9252 if test $gt_cv_val_LC_MESSAGES = yes; then
9253 AC_DEFINE(HAVE_LC_MESSAGES, 1,
9254 [Define if your <locale.h> file defines LC_MESSAGES.])
9255 fi
9256 ])
9257
0 SUBDIRS = python perl pascal
0 # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
1
2 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
3 # This Makefile.in is free software; the Free Software Foundation
4 # gives unlimited permission to copy and/or distribute it,
5 # with or without modifications, as long as this notice is preserved.
6
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
9 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 # PARTICULAR PURPOSE.
11
12
13 SHELL = @SHELL@
14
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 VPATH = @srcdir@
18 prefix = @prefix@
19 exec_prefix = @exec_prefix@
20
21 bindir = @bindir@
22 sbindir = @sbindir@
23 libexecdir = @libexecdir@
24 datadir = @datadir@
25 sysconfdir = @sysconfdir@
26 sharedstatedir = @sharedstatedir@
27 localstatedir = @localstatedir@
28 libdir = @libdir@
29 infodir = @infodir@
30 mandir = @mandir@
31 includedir = @includedir@
32 oldincludedir = /usr/include
33
34 DESTDIR =
35
36 pkgdatadir = $(datadir)/@PACKAGE@
37 pkglibdir = $(libdir)/@PACKAGE@
38 pkgincludedir = $(includedir)/@PACKAGE@
39
40 top_builddir = ..
41
42 ACLOCAL = @ACLOCAL@
43 AUTOCONF = @AUTOCONF@
44 AUTOMAKE = @AUTOMAKE@
45 AUTOHEADER = @AUTOHEADER@
46
47 INSTALL = @INSTALL@
48 INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
49 INSTALL_DATA = @INSTALL_DATA@
50 INSTALL_SCRIPT = @INSTALL_SCRIPT@
51 transform = @program_transform_name@
52
53 NORMAL_INSTALL = :
54 PRE_INSTALL = :
55 POST_INSTALL = :
56 NORMAL_UNINSTALL = :
57 PRE_UNINSTALL = :
58 POST_UNINSTALL = :
59 host_alias = @host_alias@
60 host_triplet = @host@
61 AR = @AR@
62 AS = @AS@
63 BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
64 CATOBJEXT = @CATOBJEXT@
65 CC = @CC@
66 CFLAGS = @CFLAGS@
67 CXX = @CXX@
68 CXXCPP = @CXXCPP@
69 DATADIRNAME = @DATADIRNAME@
70 DLLTOOL = @DLLTOOL@
71 ECHO = @ECHO@
72 EGREP = @EGREP@
73 EXEEXT = @EXEEXT@
74 F77 = @F77@
75 GCJ = @GCJ@
76 GCJFLAGS = @GCJFLAGS@
77 GENCAT = @GENCAT@
78 GLIBC2 = @GLIBC2@
79 GLIBC21 = @GLIBC21@
80 GMSGFMT = @GMSGFMT@
81 HAVE_ASPRINTF = @HAVE_ASPRINTF@
82 HAVE_LIB = @HAVE_LIB@
83 HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
84 HAVE_SNPRINTF = @HAVE_SNPRINTF@
85 HAVE_WPRINTF = @HAVE_WPRINTF@
86 INSTOBJEXT = @INSTOBJEXT@
87 INTLBISON = @INTLBISON@
88 INTLLIBS = @INTLLIBS@
89 INTLOBJS = @INTLOBJS@
90 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
91 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
92 LIB = @LIB@
93 LIBICONV = @LIBICONV@
94 LIBINTL = @LIBINTL@
95 LIBS = @LIBS@
96 LIBTOOL = @LIBTOOL@
97 LN_S = @LN_S@
98 LTLIB = @LTLIB@
99 LTLIBICONV = @LTLIBICONV@
100 LTLIBINTL = @LTLIBINTL@
101 MAINT = @MAINT@
102 MAKEINFO = @MAKEINFO@
103 MKINSTALLDIRS = @MKINSTALLDIRS@
104 OBJDUMP = @OBJDUMP@
105 OBJEXT = @OBJEXT@
106 PACKAGE = @PACKAGE@
107 PA_MODULES_PATH = @PA_MODULES_PATH@
108 PA_VERSION = @PA_VERSION@
109 PE_CFLAGS = @PE_CFLAGS@
110 PE_MODULES_PATH = @PE_MODULES_PATH@
111 PKG_CONFIG = @PKG_CONFIG@
112 POSUB = @POSUB@
113 PY_CFLAGS = @PY_CFLAGS@
114 PY_MODULES_PATH = @PY_MODULES_PATH@
115 PY_VERSION = @PY_VERSION@
116 RANLIB = @RANLIB@
117 RC = @RC@
118 STRIP = @STRIP@
119 USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
120 USE_NLS = @USE_NLS@
121 VERSION = @VERSION@
122 VERSION_INFO = @VERSION_INFO@
123 have_pascal = @have_pascal@
124 have_perl = @have_perl@
125 have_python = @have_python@
126 have_swig = @have_swig@
127
128 SUBDIRS = python perl pascal
129 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
130 CONFIG_CLEAN_FILES =
131 DIST_COMMON = Makefile.am Makefile.in
132
133
134 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
135
136 TAR = tar
137 GZIP_ENV = --best
138 all: all-redirect
139 .SUFFIXES:
140 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
141 cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps bindings/Makefile
142
143 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
144 cd $(top_builddir) \
145 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
146
147
148 # This directory's subdirectories are mostly independent; you can cd
149 # into them and run `make' without going through this Makefile.
150 # To change the values of `make' variables: instead of editing Makefiles,
151 # (1) if the variable is set in `config.status', edit `config.status'
152 # (which will cause the Makefiles to be regenerated when you run `make');
153 # (2) otherwise, pass the desired values on the `make' command line.
154
155 @SET_MAKE@
156
157 all-recursive install-data-recursive install-exec-recursive \
158 installdirs-recursive install-recursive uninstall-recursive \
159 check-recursive installcheck-recursive info-recursive dvi-recursive:
160 @set fnord $(MAKEFLAGS); amf=$$2; \
161 dot_seen=no; \
162 target=`echo $@ | sed s/-recursive//`; \
163 list='$(SUBDIRS)'; for subdir in $$list; do \
164 echo "Making $$target in $$subdir"; \
165 if test "$$subdir" = "."; then \
166 dot_seen=yes; \
167 local_target="$$target-am"; \
168 else \
169 local_target="$$target"; \
170 fi; \
171 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
172 || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
173 done; \
174 if test "$$dot_seen" = "no"; then \
175 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
176 fi; test -z "$$fail"
177
178 mostlyclean-recursive clean-recursive distclean-recursive \
179 maintainer-clean-recursive:
180 @set fnord $(MAKEFLAGS); amf=$$2; \
181 dot_seen=no; \
182 rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
183 rev="$$subdir $$rev"; \
184 test "$$subdir" != "." || dot_seen=yes; \
185 done; \
186 test "$$dot_seen" = "no" && rev=". $$rev"; \
187 target=`echo $@ | sed s/-recursive//`; \
188 for subdir in $$rev; do \
189 echo "Making $$target in $$subdir"; \
190 if test "$$subdir" = "."; then \
191 local_target="$$target-am"; \
192 else \
193 local_target="$$target"; \
194 fi; \
195 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
196 || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
197 done && test -z "$$fail"
198 tags-recursive:
199 list='$(SUBDIRS)'; for subdir in $$list; do \
200 test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
201 done
202
203 tags: TAGS
204
205 ID: $(HEADERS) $(SOURCES) $(LISP)
206 list='$(SOURCES) $(HEADERS)'; \
207 unique=`for i in $$list; do echo $$i; done | \
208 awk ' { files[$$0] = 1; } \
209 END { for (i in files) print i; }'`; \
210 here=`pwd` && cd $(srcdir) \
211 && mkid -f$$here/ID $$unique $(LISP)
212
213 TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
214 tags=; \
215 here=`pwd`; \
216 list='$(SUBDIRS)'; for subdir in $$list; do \
217 if test "$$subdir" = .; then :; else \
218 test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
219 fi; \
220 done; \
221 list='$(SOURCES) $(HEADERS)'; \
222 unique=`for i in $$list; do echo $$i; done | \
223 awk ' { files[$$0] = 1; } \
224 END { for (i in files) print i; }'`; \
225 test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
226 || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
227
228 mostlyclean-tags:
229
230 clean-tags:
231
232 distclean-tags:
233 -rm -f TAGS ID
234
235 maintainer-clean-tags:
236
237 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
238
239 subdir = bindings
240
241 distdir: $(DISTFILES)
242 @for file in $(DISTFILES); do \
243 d=$(srcdir); \
244 if test -d $$d/$$file; then \
245 cp -pr $$d/$$file $(distdir)/$$file; \
246 else \
247 test -f $(distdir)/$$file \
248 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
249 || cp -p $$d/$$file $(distdir)/$$file || :; \
250 fi; \
251 done
252 for subdir in $(SUBDIRS); do \
253 if test "$$subdir" = .; then :; else \
254 test -d $(distdir)/$$subdir \
255 || mkdir $(distdir)/$$subdir \
256 || exit 1; \
257 chmod 777 $(distdir)/$$subdir; \
258 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
259 || exit 1; \
260 fi; \
261 done
262 info-am:
263 info: info-recursive
264 dvi-am:
265 dvi: dvi-recursive
266 check-am: all-am
267 check: check-recursive
268 installcheck-am:
269 installcheck: installcheck-recursive
270 install-exec-am:
271 install-exec: install-exec-recursive
272
273 install-data-am:
274 install-data: install-data-recursive
275
276 install-am: all-am
277 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
278 install: install-recursive
279 uninstall-am:
280 uninstall: uninstall-recursive
281 all-am: Makefile
282 all-redirect: all-recursive
283 install-strip:
284 $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
285 installdirs: installdirs-recursive
286 installdirs-am:
287
288
289 mostlyclean-generic:
290
291 clean-generic:
292
293 distclean-generic:
294 -rm -f Makefile $(CONFIG_CLEAN_FILES)
295 -rm -f config.cache config.log stamp-h stamp-h[0-9]*
296
297 maintainer-clean-generic:
298 mostlyclean-am: mostlyclean-tags mostlyclean-generic
299
300 mostlyclean: mostlyclean-recursive
301
302 clean-am: clean-tags clean-generic mostlyclean-am
303
304 clean: clean-recursive
305
306 distclean-am: distclean-tags distclean-generic clean-am
307 -rm -f libtool
308
309 distclean: distclean-recursive
310
311 maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
312 distclean-am
313 @echo "This command is intended for maintainers to use;"
314 @echo "it deletes files that may require special tools to rebuild."
315
316 maintainer-clean: maintainer-clean-recursive
317
318 .PHONY: install-data-recursive uninstall-data-recursive \
319 install-exec-recursive uninstall-exec-recursive installdirs-recursive \
320 uninstalldirs-recursive all-recursive check-recursive \
321 installcheck-recursive info-recursive dvi-recursive \
322 mostlyclean-recursive distclean-recursive clean-recursive \
323 maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
324 distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
325 dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
326 install-exec install-data-am install-data install-am install \
327 uninstall-am uninstall all-redirect all-am all installdirs-am \
328 installdirs mostlyclean-generic distclean-generic clean-generic \
329 maintainer-clean-generic clean mostlyclean distclean maintainer-clean
330
331
332 # Tell versions [3.59,3.63) of GNU make to not export all variables.
333 # Otherwise a system limit (for SysV at least) may be exceeded.
334 .NOEXPORT:
0
1 EXTRA_DIST = Package.fpc hdate.pp hdate_class.pp fpc_README changelog
2
3 if WITH_PASCAL
4
5 DEPS= $(top_builddir)/src/libhdate.la
6
7 CLEANFILES = *.o *.ppu
8
9 all-am: hdate.o hdate_class.o
10
11 hdate.o: hdate.pp
12 fpc hdate.pp
13
14 hdate_class.o: hdate_class.pp hdate.o
15 fpc hdate_class.pp
16
17 install-data-local:hdate_class.o hdate.o Package.fpc
18 $(mkinstalldirs) $(DESTDIR)$(PA_MODULES_PATH)/hdate
19 $(INSTALL_DATA) hdate.o $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate.o
20 $(INSTALL_DATA) hdate_class.o $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate_class.o
21 $(INSTALL_DATA) hdate.ppu $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate.ppu
22 $(INSTALL_DATA) hdate_class.ppu $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate_class.ppu
23 $(INSTALL_DATA) fpc_README $(DESTDIR)$(PA_MODULES_PATH)/hdate/fpc_README
24 $(INSTALL_DATA) Package.fpc $(DESTDIR)$(PA_MODULES_PATH)/hdate/Package.fpc
25 endif
0 # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
1
2 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
3 # This Makefile.in is free software; the Free Software Foundation
4 # gives unlimited permission to copy and/or distribute it,
5 # with or without modifications, as long as this notice is preserved.
6
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
9 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 # PARTICULAR PURPOSE.
11
12
13 SHELL = @SHELL@
14
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 VPATH = @srcdir@
18 prefix = @prefix@
19 exec_prefix = @exec_prefix@
20
21 bindir = @bindir@
22 sbindir = @sbindir@
23 libexecdir = @libexecdir@
24 datadir = @datadir@
25 sysconfdir = @sysconfdir@
26 sharedstatedir = @sharedstatedir@
27 localstatedir = @localstatedir@
28 libdir = @libdir@
29 infodir = @infodir@
30 mandir = @mandir@
31 includedir = @includedir@
32 oldincludedir = /usr/include
33
34 DESTDIR =
35
36 pkgdatadir = $(datadir)/@PACKAGE@
37 pkglibdir = $(libdir)/@PACKAGE@
38 pkgincludedir = $(includedir)/@PACKAGE@
39
40 top_builddir = ../..
41
42 ACLOCAL = @ACLOCAL@
43 AUTOCONF = @AUTOCONF@
44 AUTOMAKE = @AUTOMAKE@
45 AUTOHEADER = @AUTOHEADER@
46
47 INSTALL = @INSTALL@
48 INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
49 INSTALL_DATA = @INSTALL_DATA@
50 INSTALL_SCRIPT = @INSTALL_SCRIPT@
51 transform = @program_transform_name@
52
53 NORMAL_INSTALL = :
54 PRE_INSTALL = :
55 POST_INSTALL = :
56 NORMAL_UNINSTALL = :
57 PRE_UNINSTALL = :
58 POST_UNINSTALL = :
59 host_alias = @host_alias@
60 host_triplet = @host@
61 AR = @AR@
62 AS = @AS@
63 BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
64 CATOBJEXT = @CATOBJEXT@
65 CC = @CC@
66 CFLAGS = @CFLAGS@
67 CXX = @CXX@
68 CXXCPP = @CXXCPP@
69 DATADIRNAME = @DATADIRNAME@
70 DLLTOOL = @DLLTOOL@
71 ECHO = @ECHO@
72 EGREP = @EGREP@
73 EXEEXT = @EXEEXT@
74 F77 = @F77@
75 GCJ = @GCJ@
76 GCJFLAGS = @GCJFLAGS@
77 GENCAT = @GENCAT@
78 GLIBC2 = @GLIBC2@
79 GLIBC21 = @GLIBC21@
80 GMSGFMT = @GMSGFMT@
81 HAVE_ASPRINTF = @HAVE_ASPRINTF@
82 HAVE_LIB = @HAVE_LIB@
83 HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
84 HAVE_SNPRINTF = @HAVE_SNPRINTF@
85 HAVE_WPRINTF = @HAVE_WPRINTF@
86 INSTOBJEXT = @INSTOBJEXT@
87 INTLBISON = @INTLBISON@
88 INTLLIBS = @INTLLIBS@
89 INTLOBJS = @INTLOBJS@
90 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
91 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
92 LIB = @LIB@
93 LIBICONV = @LIBICONV@
94 LIBINTL = @LIBINTL@
95 LIBS = @LIBS@
96 LIBTOOL = @LIBTOOL@
97 LN_S = @LN_S@
98 LTLIB = @LTLIB@
99 LTLIBICONV = @LTLIBICONV@
100 LTLIBINTL = @LTLIBINTL@
101 MAINT = @MAINT@
102 MAKEINFO = @MAKEINFO@
103 MKINSTALLDIRS = @MKINSTALLDIRS@
104 OBJDUMP = @OBJDUMP@
105 OBJEXT = @OBJEXT@
106 PACKAGE = @PACKAGE@
107 PA_MODULES_PATH = @PA_MODULES_PATH@
108 PA_VERSION = @PA_VERSION@
109 PE_CFLAGS = @PE_CFLAGS@
110 PE_MODULES_PATH = @PE_MODULES_PATH@
111 PKG_CONFIG = @PKG_CONFIG@
112 POSUB = @POSUB@
113 PY_CFLAGS = @PY_CFLAGS@
114 PY_MODULES_PATH = @PY_MODULES_PATH@
115 PY_VERSION = @PY_VERSION@
116 RANLIB = @RANLIB@
117 RC = @RC@
118 STRIP = @STRIP@
119 USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
120 USE_NLS = @USE_NLS@
121 VERSION = @VERSION@
122 VERSION_INFO = @VERSION_INFO@
123 have_pascal = @have_pascal@
124 have_perl = @have_perl@
125 have_python = @have_python@
126 have_swig = @have_swig@
127
128 EXTRA_DIST = Package.fpc hdate.pp hdate_class.pp fpc_README changelog
129
130 @WITH_PASCAL_TRUE@DEPS = $(top_builddir)/src/libhdate.la
131
132 @WITH_PASCAL_TRUE@CLEANFILES = *.o *.ppu
133 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
134 CONFIG_CLEAN_FILES =
135 DIST_COMMON = Makefile.am Makefile.in
136
137
138 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
139
140 TAR = tar
141 GZIP_ENV = --best
142 all: all-redirect
143 .SUFFIXES:
144 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
145 cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps bindings/pascal/Makefile
146
147 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
148 cd $(top_builddir) \
149 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
150
151 tags: TAGS
152 TAGS:
153
154
155 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
156
157 subdir = bindings/pascal
158
159 distdir: $(DISTFILES)
160 @for file in $(DISTFILES); do \
161 d=$(srcdir); \
162 if test -d $$d/$$file; then \
163 cp -pr $$d/$$file $(distdir)/$$file; \
164 else \
165 test -f $(distdir)/$$file \
166 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
167 || cp -p $$d/$$file $(distdir)/$$file || :; \
168 fi; \
169 done
170 info-am:
171 info: info-am
172 dvi-am:
173 dvi: dvi-am
174 check-am: all-am
175 check: check-am
176 installcheck-am:
177 installcheck: installcheck-am
178 install-exec-am:
179 install-exec: install-exec-am
180
181 install-data-am: install-data-local
182 install-data: install-data-am
183
184 install-am: all-am
185 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
186 install: install-am
187 uninstall-am:
188 uninstall: uninstall-am
189 all-am: Makefile
190 all-redirect: all-am
191 install-strip:
192 $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
193 installdirs:
194
195
196 mostlyclean-generic:
197
198 clean-generic:
199 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
200
201 distclean-generic:
202 -rm -f Makefile $(CONFIG_CLEAN_FILES)
203 -rm -f config.cache config.log stamp-h stamp-h[0-9]*
204
205 maintainer-clean-generic:
206 mostlyclean-am: mostlyclean-generic
207
208 mostlyclean: mostlyclean-am
209
210 clean-am: clean-generic mostlyclean-am
211
212 clean: clean-am
213
214 distclean-am: distclean-generic clean-am
215 -rm -f libtool
216
217 distclean: distclean-am
218
219 maintainer-clean-am: maintainer-clean-generic distclean-am
220 @echo "This command is intended for maintainers to use;"
221 @echo "it deletes files that may require special tools to rebuild."
222
223 maintainer-clean: maintainer-clean-am
224
225 .PHONY: tags distdir info-am info dvi-am dvi check check-am \
226 installcheck-am installcheck install-exec-am install-exec \
227 install-data-local install-data-am install-data install-am install \
228 uninstall-am uninstall all-redirect all-am all installdirs \
229 mostlyclean-generic distclean-generic clean-generic \
230 maintainer-clean-generic clean mostlyclean distclean maintainer-clean
231
232
233 @WITH_PASCAL_TRUE@all-am: hdate.o hdate_class.o
234
235 @WITH_PASCAL_TRUE@hdate.o: hdate.pp
236 @WITH_PASCAL_TRUE@ fpc hdate.pp
237
238 @WITH_PASCAL_TRUE@hdate_class.o: hdate_class.pp hdate.o
239 @WITH_PASCAL_TRUE@ fpc hdate_class.pp
240
241 @WITH_PASCAL_TRUE@install-data-local:hdate_class.o hdate.o Package.fpc
242 @WITH_PASCAL_TRUE@ $(mkinstalldirs) $(DESTDIR)$(PA_MODULES_PATH)/hdate
243 @WITH_PASCAL_TRUE@ $(INSTALL_DATA) hdate.o $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate.o
244 @WITH_PASCAL_TRUE@ $(INSTALL_DATA) hdate_class.o $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate_class.o
245 @WITH_PASCAL_TRUE@ $(INSTALL_DATA) hdate.ppu $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate.ppu
246 @WITH_PASCAL_TRUE@ $(INSTALL_DATA) hdate_class.ppu $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate_class.ppu
247 @WITH_PASCAL_TRUE@ $(INSTALL_DATA) fpc_README $(DESTDIR)$(PA_MODULES_PATH)/hdate/fpc_README
248 @WITH_PASCAL_TRUE@ $(INSTALL_DATA) Package.fpc $(DESTDIR)$(PA_MODULES_PATH)/hdate/Package.fpc
249
250 # Tell versions [3.59,3.63) of GNU make to not export all variables.
251 # Otherwise a system limit (for SysV at least) may be exceeded.
252 .NOEXPORT:
0 [package]
1 name=hdate
2 version=1.0.0
3 [require]
4 libc=y
5 packages_linux_m68k=
6 packages_linux_powerpc=
7 packages=rtl
8 packages_linux_i386=
9 packages_linux_sparc=
10 packages_linux_x86_64=
11 packages_linux_arm=
0 25/11/2005
1 - Added some constants and fixed comments according the orginal API file
2
3 27/05/2005
4 - Created a Changelog.
5
6 19-21/05/2005
7 - hdate_class.pp was created.
8 - Made changes for Free Pascal 2 support on with the units.
9
10 13/03/2005
11 - Bug fix in hdate.pp - Added {$PACKRECORDS C}
12
13 10-11/03/2005
14 - hdate.pp was created.
15 - hdate_obj.pp was created.
0 About
1 =====
2
3 LibHdate is a small C,C++ library for Hebrew calendar and dates, holidays, and reading sequence (parasha).
4 It is using the source code from Amos Shapir's hdate package fixed and patched by Nadav Har'El.
5 The Torah reading sequence is from tables by Zvi Har'El.
6
7 The LibHdate is GPL library written by Kobi Zamir <kobi_zamir@yahoo.com> and can be found at http://libhdate.sourceforge.net/ .
8
9 The current version of LibHDate is 1.2.1 and contains a Free Pascal binding only that was written by Ido Kanner <idokan@gmail.com>.
10
11 Existed Files:
12 README - This file.
13 licence - A copy of the GPL license.
14 src/ctypes.pp - A unit for making C like integer and floating points variable type.
15 src/hdate.pp - The main low level API of LibHdate binding.
16 src/hdate_obj.pp - An Object Oriented implementation for the hdate.pp API.
17 src/hdate_obj_demo.pp - An example for the use of the Object Oriented unit.
18 src/hdate_class.pp - A self made Object Oriented implementation for the LibHdate API.
19
20 Compiling
21 =========
22
23 The ctypes.pp unit was taken from FPC 1.9.8 version and was modified to contain also some floating point C equivalent.
24 The FPC version 2.0 have the floating points definition. If you are using FPC version 2.0 or above please remove the unit.
25
26 Add the hdate.pp and the hdate_obj.pp (or thier .ppu files after compilation) to the path of fpc.cfg in order to use
27 the units globally with all of your applications.
28
29 =========================================================================
30 the old README from version 1.1.1
31 =========================================================================
32
33 About
34 =====
35
36 LibHdate is a small C,C++ library for Hebrew calendar and dates, holidays, and reading sequence (parasha).
37 It is using the sorce code from Amos Shapir's hdate package fixed and patched by Nadav Har'El.
38 The Torah reading sequence is from tables by Zvi Har'El.
39
40 The LibHdate is GPL library written by Kobi Zamir <kzamir@walla.co.il> and can be found at http://libhdate.sourceforge.net/ .
41
42 This version of LibHDate contains a FreePascal binding that was written by Ido Kanner <idokan@gmail.com>.
43
44 Existed Files:
45 fpc_README - This file.
46 src/ctypes.pp - A unit for making C like integer and floating points variable type.
47 src/hdate.pp - The main low level API of LibHdate binding.
48 src/hdate_obj.pp - An Object Oriented implementation for the hdate.pp API.
49 src/hdate_obj_demo.pp - An example for the use of the Object Oriented unit.
50 src/hcal.pp - An example for the use of the low level API.
51
52 Compiling
53 =========
54
55 The ctypes.pp unit was taken from FPC 1.9.8 version and was modified to contain also some floating point C equivalent.
56 I hope that version 2.0 will contains them as well, if not please keep this unit, otherwise feel free to remove it.
57
58 Add the hdate.pp and the hdate_obj.pp (or thier .ppu files after compilation) to the path of fpc.cfg in order to use
59 the units globally with all of your applications.
60
61
0 (* libhdate
1 Copyright 2004-2005 Yaacov Zamir <kzamir@walla.co.il>
2 Copyright 2005 Ido Kanner <idokan@gmail.com>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Library General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18 History:
19 25/11/2005 - Added some constants and fixed comments according the orginal API file
20 13/03/2005 - Bug Fixed Added {$PACKRECORDS C}
21 10-11/03/2005 - Initial Translation of version 0.31.0
22 *)
23 {$MODE OBJFPC}{$PACKRECORDS C}
24
25 unit hdate;
26
27 interface
28 uses cTypes;
29
30 const
31 LIBHDATE_LIBRARY_NAME = 'hdate';
32
33 (** @def HDATA_DIASPORA_FLAG
34 @brief use diaspora dates and holydays flag
35 *)
36 HDATA_DIASPORA_FLAG = -1;
37
38 (** @def HDATA_ISRAEL_FLAG
39 @brief use israel dates and holydays flag
40 *)
41 HDATA_ISRAEL_FLAG = 0;
42
43 (** @def HDATA_SHORT_FLAG
44 @brief use short strings flag
45 *)
46 HDATA_SHORT_FLAG = -1;
47
48 (** @def HDATA_LONG_FLAG
49 @brief use long strings flag
50 *)
51 HDATA_LONG_FLAG = 0;
52
53
54 { Base structore for hebrew dates }
55
56 type
57 Phdate_struct = ^Thdate_struct;
58 Thdate_struct = record
59 hd_day : cInt; //The number of day in the hebrew month (1..31).
60 hd_mon : cInt; //The number of the hebrew month 1..14 (1 - tishre, 13 - adar 1, 14 - adar 2).
61 hd_year : cInt; //The number of the hebrew year.
62 gd_day : cInt; //The number of the day in the month. (1..31)
63 gd_mon : cInt; //The number of the month 1..12 (1 - jan).
64 gd_year : cInt; //The number of the year.
65 hd_dw : cInt; //The day of the week 1..7 (1 - sunday).
66 hd_size_of_year : cInt; //The length of the year in days.
67 hd_new_year_dw : cInt; //The week day of Hebrew new year.
68 hd_year_type : cInt; //The number type of year.
69 hd_jd : cInt; //The Julian day number
70 hd_days : cInt; //The number of days passed since 1 tishrey
71 hd_weeks : cInt; //The number of weeks passed since 1 tishrey
72 end;
73 (********************************************************************************)
74 (********************************************************************************)
75
76 (**
77 @brief compute date structure from the Gregorian date
78
79 @param h pointer this hdate struct.
80 @param d Day of month 1..31
81 @param m Month 1..12
82 @param y Year in 4 digits e.g. 2001
83 @return pointer to this hdate struct
84 *)
85
86 function hdate_set_gdate (h : Phdate_struct; d, m, y : cInt) : Phdate_struct;
87 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_set_gdate';
88
89 (**
90 @brief compute date structure from the Hebrew date
91
92 @param h pointer this hdate struct.
93 @param d Day of month 1..31
94 @param m Month 1..14 , (13 - Adar 1, 14 - Adar 2)
95 @param y Year in 4 digits e.g. 5731
96 @return pointer to this hdate struct
97 *)
98
99 function hdate_set_hdate (h : Phdate_struct; d, m, y : cInt) : Phdate_struct;
100 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_set_hdate';
101
102 (**
103 @brief compute date structure from the Julian day
104
105 @param h pointer this hdate struct.
106 @param jd the julian day number.
107 @return pointer to this hdate struct
108 *)
109 function hdate_set_jd (h : Phdate_struct; jd : cInt) : Phdate_struct;
110 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_set_jd';
111
112 (*************************************************************)
113 (*************************************************************)
114
115 (**
116 @brief get formated hebrew date.
117
118 return the short ( e.g. "1 Tishrey" ) or
119 long (e.g. "Tuesday 18 Tishrey 5763 Hol hamoed Sukot" ) formated date.
120
121 @param h pointer this hdate struct.
122 @param diaspora if true give diaspora holydays.
123 @param s short flag.
124 @return a static string of foramted date
125 *)
126 function hdate_get_format_date (h : Phdate_struct; diaspora, s : cInt) : PChar;
127 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_format_date';
128
129 (**
130 @brief get the number of hebrew parasha.
131
132 @param h pointer this hdate struct.
133 @param diaspora if true give diaspora readings
134 @return the number of parasha 1. Bereshit etc..
135 (55 trow 61 are joined strings e.g. Vayakhel Pekudei)
136 *)
137 function hdate_get_parasha (h : Phdate_struct; diaspora : cInt) : cInt;
138 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_parasha';
139
140 (**
141 @brief get the number of hebrew holyday.
142
143 @param h pointer this hdate struct.
144 @param diaspora if true give diaspora holydays
145 @return the number of holyday.
146 *)
147 function hdate_get_holyday (h : Phdate_struct; diaspora : cInt) : cInt;
148 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_holyday';
149
150 (*************************************************************)
151 (*************************************************************)
152
153 (**
154 @brief convert an integer to hebrew string.
155
156 @param n The int to convert
157 @return a static string of the hebrew number UTF-8 (logical)
158 @attention ( 0 < n < 10000)
159 *)
160 function hdate_get_int_string (n : cInt) : PChar;
161 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_int_string';
162
163 (**
164 @brief get name of week day.
165
166 @param day The number of the day 1..7 (1 - sun).
167 @param s short flag
168 true - returns a short string: sun, false returns: sunday.
169 @return a static string of the day of the week
170 *)
171 function hdate_get_day_string (day : cInt; s : cInt) : PChar;
172 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_day_string';
173
174 (**
175 @brief name of month.
176
177 @param month the number of the month 1..12 (1 - jan).
178 @param s short flag.
179 @return a static string of month name
180 *)
181 function hdate_get_month_string (month : cInt; s : cInt) : PChar;
182 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_month_string';
183
184 (**
185 @brief name of hebrew month.
186
187 @param month the number of the month 1..14
188 (1 - tishre, 13 - adar 1, 14 - adar 2).
189 @param s short flag.
190 @return a static string of month name
191 *)
192 function hdate_get_hebrew_month_string (month : cInt; s : cInt) : PChar;
193 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_hebrew_month_string';
194
195 (**
196 @brief name of hebrew holyday.
197
198 @param holyday the holyday number.
199 @param s short flag.
200 @return a static string of holyday name
201 *)
202 function hdate_get_holyday_string (holyday, s : cInt) : PChar;
203 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_holyday_string';
204
205 (**
206 @brief name of parasha
207
208 @param parasha the number of parasha 1-Bereshit
209 (55 trow 61 are joined strings e.g. Vayakhel Pekudei)
210 @param s short flag.
211 @return a static string of parasha name
212 *)
213 function hdate_get_parasha_string (parasha, s : cInt) : PChar;
214 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_parasha_string';
215
216 (*************************************************************)
217 (*************************************************************)
218
219 (**
220 @brief get the hebrew holyday type.
221
222 @param holyday the holyday number.
223 @return the number of holyday type.
224 *)
225 function hdate_get_holyday_type (holyday : cInt) : cInt;
226 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_holyday_type';
227
228 (**
229 @brief size of hebrew year in days.
230
231 @param hebrew_year the hebrew year.
232 @return size of Hebrew year
233 *)
234 function hdate_get_size_of_hebrew_year (hebrew_year : cInt) : cInt;
235 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_size_of_hebrew_year';
236
237 (*************************************************************)
238 (*************************************************************)
239
240 (**
241 @brief Days since Tishrey 3744
242
243 @author Amos Shapir 1984 (rev. 1985, 1992) Yaacov Zamir 2003-2005
244
245 @param hebrew_year The Hebrew year
246 @return Number of days since 3,1,3744
247 *)
248 function hdate_days_from_3744 (hebrew_year : cInt) : cInt;
249 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_days_from_3744';
250
251 (**
252 @brief Return Hebrew year type based on size and first week day of year.
253
254 @param size_of_year Length of year in days
255 @param new_year_dw First week day of year
256 @return the number for year type (1..14)
257 *)
258 function hdate_get_year_type (size_of_year, new_year_dw : cInt) : cInt;
259 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_year_type';
260
261 (**
262 @brief Compute Julian day from Gregorian date
263
264 @author Yaacov Zamir (algorithm from Henry F. Fliegel and Thomas C. Van Flandern ,1968)
265
266 @param day Day of month 1..31
267 @param month Month 1..12
268 @param year Year in 4 digits e.g. 2001
269 @return the julian day number
270 *)
271 function hdate_gdate_to_jd (day, month, year : cInt) : cInt;
272 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_gdate_to_jd';
273
274 (**
275 @brief Compute Julian day from Hebrew day, month and year
276
277 @author Amos Shapir 1984 (rev. 1985, 1992) Yaacov Zamir 2003-2005
278
279 @param day Day of month 1..31
280 @param month Month 1..14 (13 - Adar 1, 14 - Adar 2)
281 @param year Hebrew year in 4 digits e.g. 5753
282 @param jd_tishrey1 return the julian number of 1 Tishrey this year
283 @param jd_tishrey1_next_year return the julian number of 1 Tishrey next year
284 @return the julian day number
285 *)
286 function hdate_hdate_to_jd (day, month, year : cInt; jd_tishrey1, jd_tishrey1_next_year : pcInt) : cInt;
287 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_hdate_to_jd';
288
289 (**
290 @brief Converting from the Julian day to the Gregorian date
291
292 @author Yaacov Zamir (Algorithm, Henry F. Fliegel and Thomas C. Van Flandern ,1968)
293
294 @param jd Julian day
295 @param day return Day of month 1..31
296 @param month return Month 1..12
297 @param year return Year in 4 digits e.g. 2001
298 *)
299 procedure hdate_jd_to_gdate (jd : cInt; day, month, year : pcInt);
300 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_jd_to_gdate';
301
302 (**
303 @brief Converting from the Julian day to the Hebrew day
304
305 @author Yaacov Zamir 2005
306
307 @param jd Julian day
308 @param day return Day of month 1..31
309 @param month return Month 1..14 (13 - Adar 1, 14 - Adar 2)
310 @param year return Year in 4 digits e.g. 2001
311 @param jd_tishrey1 return the julian number of 1 Tishrey this year
312 @param jd_tishrey1_next_year return the julian number of 1 Tishrey next year
313 *)
314 procedure hdate_jd_to_hdate (jd : cInt; day, month, year, jd_tishrey1, jd_tishrey1_next_year : pcInt);
315 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_jd_to_hdate';
316
317 (*************************************************************)
318 (*************************************************************)
319
320 (**
321 @brief days from 1 january
322
323 @param day this day of month
324 @param month this month
325 @param year this year
326 @return the days from 1 jan
327 *)
328 function hdate_get_day_of_year (day, month, year : cInt) : cInt;
329 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_day_of_year';
330
331 (**
332 @brief utc sunrise/set time for a gregorian date
333
334 @param day this day of month
335 @param month this month
336 @param year this year
337 @param longitude longitude to use in calculations
338 degrees, negative values are east
339 @param latitude latitude to use in calculations
340 degrees, negative values are south
341 @param sunrise return the utc sunrise in minutes after midnight (00:00)
342 @param sunset return the utc sunset in minutes after midnight (00:00)
343 *)
344 procedure hdate_get_utc_sun_time (day, month, year : cInt; latitude, longitude : cDouble; sunrise, sunset : pcInt);
345 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_utc_sun_time';
346
347 (*************************************************************)
348 (*************************************************************)
349
350 (**
351 @brief get the Gregorian day of the month
352
353 @param h pointer this hdate struct.
354 @return the Gregorian day of the month, 1..31.
355 *)
356 function hdate_get_gday (h : Phdate_struct) : cInt;
357 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_gday';
358
359 (**
360 @brief get the Gregorian month
361
362 @param h pointer this hdate struct.
363 @return the Gregorian month, jan = 1.
364 *)
365 function hdate_get_gmonth (h : Phdate_struct) : cInt;
366 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_gmonth';
367
368 (**
369 @brief get the Gregorian year
370
371 @param h pointer this hdate struct.
372 @return the Gregorian year.
373 *)
374 function hdate_get_gyear (h : Phdate_struct) : cInt;
375 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_gyear';
376
377 (**
378 @brief get the Hebrew day of the month
379
380 @param h pointer this hdate struct.
381 @return the Hebrew day of the month, 1..30.
382 *)
383 function hdate_get_hday (h : Phdate_struct) : cInt;
384 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_hday';
385
386 (**
387 @brief get the Hebrew month
388
389 @param h pointer this hdate struct.
390 @return the Hebrew month, Tishery = 1 .. Adar I =13, Adar II = 14.
391 *)
392 function hdate_get_hmonth (h : Phdate_struct) : cInt;
393 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_hmonth';
394
395 (**
396 @brief get the Hebrew year
397
398 @param h pointer this hdate struct.
399 @return the Hebrew year.
400 *)
401 function hdate_get_hyear (h : Phdate_struct) : cInt;
402 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_hyear';
403
404 (**
405 @brief get the day of the week
406
407 @param h pointer this hdate struct.
408 @return the the day of the week.
409 *)
410 function hdate_get_day_of_the_week (h : Phdate_struct) : cInt;
411 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_day_of_the_week';
412
413 (**
414 @brief get the size of the hebrew year
415
416 @param h pointer this hdate struct.
417 @return the the size of the hebrew year.
418 *)
419 function hdate_get_size_of_year (h : Phdate_struct) : cInt;
420 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_size_of_year';
421
422 (**
423 @brief get the new year day of the week
424
425 @param h pointer this hdate struct.
426 @return the the new year day of the week.
427 *)
428 function hdate_get_new_year_day_of_the_week (h : Phdate_struct) : cInt;
429 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_new_year_day_of_the_week';
430
431 (**
432 @brief get the Julian day number
433
434 @param h pointer this hdate struct.
435 @return the Julian day number.
436 *)
437 function hdate_get_julian (h : Phdate_struct) : cInt;
438 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_julian';
439
440 (**
441 @brief get the number of days passed since 1 tishrey
442
443 @param h pointer this hdate struct.
444 @return the number of days passed since 1 tishrey.
445 *)
446 function hdate_get_days (h : Phdate_struct) : cInt;
447 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_days';
448
449 (**
450 @brief get the number of weeks passed since 1 tishrey
451
452 @param h pointer this hdate struct.
453 @return the number of weeks passed since 1 tishrey.
454 *)
455 function hdate_get_weeks (h : Phdate_struct) : cInt;
456 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_weeks';
457
458 (*************************************************************)
459 (*************************************************************)
460
461 (**
462 @brief creat a new hdate struct object, must be deleted using delete_hdate.
463
464 @return a new hdate object
465 *)
466 function new_hdate : Phdate_struct;
467 cdecl external LIBHDATE_LIBRARY_NAME name 'new_hdate';
468
469 (**
470 @brief delete an hdate struct object.
471
472 @param h pointer this hdate struct.
473 *)
474 function delete_hdate (h : Phdate_struct) : Phdate_struct;
475 cdecl external LIBHDATE_LIBRARY_NAME name 'delete_hdate';
476
477 (*************************************************************)
478 (*************************************************************)
479
480 (**
481 @brief Return a static string, with the package name and version
482
483 @return a a static string, with the package name and version
484 *)
485 function hdate_get_version_string : PChar;
486 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_version_string';
487
488 (**
489 @brief Return a static string, with the name of translator
490
491 @return a a static string, with the name of translator
492 *)
493 function hdate_get_translator_string : PChar;
494 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_translator_string';
495
496 implementation
497
498 end.
0 {
1 This unit create a Pascal object oriented class for libhdate.
2 This unit is created as a true object oriented class.
3
4 Copyright 2005 Ido Kanner <idokan@gmail.com>
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 Library 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 History:
21 19-21/05/2005 - Initial creation
22 }
23 {$IFDEF FPC}
24 {$MODE OBJFPC} {$H+}
25 {$ELSE}
26 {$Warning 'This code was tested with Free Pascal Only.'}
27 {$ENDIF}
28 unit hdate_class;
29
30 interface
31 uses hdate, SysUtils;
32
33 type
34 THdateClass = class
35 private
36 fh : Phdate_struct;
37 FToDestroy : Boolean;
38 fJulianDay : LongInt;
39 fDiaspora : Boolean;
40 fHolyday,
41 fHolydayType : LongInt;
42 fParasha : LongInt;
43 fHebrewDay,
44 fHebrewYear : String;
45
46 procedure InitValue;
47
48 procedure SetHebDay (Value : LongInt);
49 procedure SetGregDay (Value : LongInt);
50 procedure SetJulianDay (Value : LongInt);
51 procedure SetHebMonth (Value : LongInt);
52 procedure SetGregMonth (Value : LongInt);
53 procedure SetGregYear (Value : LongInt);
54 procedure SetHebYear (Value : LongInt);
55 procedure SetDiaspora (Value : Boolean);
56
57 function GetGregDay : LongInt;
58 function GetGregMonth : LongInt;
59 function GetGregYear : LongInt;
60 function GetHebDay : LongInt;
61 function GetHebMonth : LongInt;
62 function GetHebYear : LongInt;
63 public
64 constructor Create; virtual; overload;
65 constructor Create (hDateRec : Phdate_struct); virtual; overload;
66 destructor Destroy; override;
67
68 procedure Assign (Source : THdateClass); virtual;
69
70 function get_format_date (s : LongInt) : String;
71 function get_day_of_week_string (s : LongInt) : String;
72 function get_month_string (s : LongInt) : String;
73 function get_hebrew_month_string (s : LongInt) : String;
74 function get_holyday_string (s : LongInt) : String;
75 function get_parasha_string (s : LongInt) : String;
76 function GetDayOfWeek : LongInt;
77 function get_size_of_year : LongInt;
78 function get_new_year_day_of_the_week : LongInt;
79 function get_days : LongInt;
80 function get_weeks : LongInt;
81 function get_sunrise (latitude, longitude : Double; tz : LongInt) : LongInt;
82 function get_sunset (latitude, longitude : Double; tz : LongInt) : LongInt;
83
84 property Days : LongInt read get_days;
85 property DayOfWeek : LongInt read GetDayOfWeek;
86 property HebrewDay : String read fHebrewDay;
87 property HebrewYear : String read fHebrewYear;
88 property Holyday : LongInt read fHolyday;
89 property HolydayType : LongInt read fHolydayType;
90 property NewYearDayOfWeek : LongInt read get_new_year_day_of_the_week;
91 property Parasha : LongInt read fParasha;
92 property Weeks : LongInt read get_weeks;
93 property YearSize : Longint read get_size_of_year;
94 published
95 property HebDay : LongInt read GetHebDay write SetHebDay;
96 property GregDay : LongInt read GetGregDay write SetGregDay;
97 property Diaspora : Boolean read fDiaspora write SetDiaspora default True;
98 property JulianDay : LongInt read fJulianDay write SetJulianDay;
99 property HebMonth : LongInt read GetHebMonth write SetHebMonth;
100 property GregMonth : LongInt read GetGregMonth write SetGregMonth;
101 property ToDestroy : Boolean read FToDestroy write fToDestroy default True;
102 property GregYear : LongInt read GetGregYear write SetGregYear;
103 property HebYear : LongInt read GetHebYear write SetHebYear;
104 end;
105
106 implementation
107 uses DateUtils, cTypes;
108
109 procedure THdateClass.InitValue;
110 var
111 ADay, AMonth, AYear : Word;
112 begin
113 DecodeDate(SysUtils.Now, AYear, AMonth, ADay);
114
115 hdate_set_gdate (Fh, ADay, AMonth, AYear);
116
117 hdate_set_hdate (fh, hdate_get_hday (fh), hdate_get_hmonth (fh), hdate_get_hyear (fh));
118
119 fHebrewDay := StrPas (hdate_get_int_string (fh^.hd_day));
120 fHebrewYear := StrPas (hdate_get_int_string (fh^.hd_year));
121
122 SetJulianDay (hdate_gdate_to_jd (ADay, AMonth, AYear));
123 SetDiaspora (True);
124 end;
125
126 constructor THdateClass.Create;
127 begin
128 fh := nil;
129 fh := new_hdate;
130 fToDestroy := True;
131 InitValue;
132 end;
133
134 constructor THdateClass.Create (hDateRec : Phdate_struct);
135 begin
136 fh := hDateRec;
137 fToDestroy := False;
138 InitValue;
139 end;
140
141 destructor THdateClass.Destroy;
142 begin
143 if fToDestroy then
144 delete_hdate (fh);
145
146 inherited;
147 end;
148
149 procedure THdateClass.SetHebDay (Value : LongInt);
150 begin
151 hdate_set_hdate (Fh, Value, GetHebMonth, GetHebYear);
152 fHebrewDay := StrPas (hdate_get_int_string (fh^.hd_day));
153 end;
154
155 procedure THdateClass.SetGregDay (Value : LongInt);
156 begin
157 hdate_set_gdate (fh, Value, GetGregMonth, GetGregYear);
158 end;
159
160 procedure THdateClass.SetJulianDay (Value : LongInt);
161 begin
162 fJulianDay := Value;
163 hdate_set_jd (fh, fJulianDay);
164 end;
165
166 procedure THdateClass.SetHebMonth (Value : LongInt);
167 begin
168 hdate_set_hdate (Fh, GetHebDay, Value, GetHebYear);
169 end;
170
171 procedure THdateClass.SetGregMonth (Value : LongInt);
172 begin
173 hdate_set_gdate (fh, GetGregDay, Value, GetGregYear);
174 end;
175
176 procedure THdateClass.SetHebYear (Value : LongInt);
177 begin
178 hdate_set_hdate (fh, GetHebDay, GetGregMonth, Value);
179 fHebrewYear := StrPas (hdate_get_int_string (fh^.hd_year));
180 end;
181
182 procedure THdateClass.SetGregYear (Value : LongInt);
183 begin
184 hdate_set_gdate (fh, GetGregDay, GetGregMonth, Value);
185 end;
186
187 procedure THdateClass.SetDiaspora (Value : Boolean);
188 begin
189 fDiaspora := Value;
190 fHolyday := hdate_get_holyday (fh, cInt(FDiaspora));
191 fHolydayType := hdate_get_holyday_type (fHolyday);
192 fParasha := hdate_get_parasha (fh, cInt(fDiaspora));
193 end;
194
195 function THdateClass.GetGregDay : LongInt;
196 begin
197 Result := hdate_get_gday (fh);
198 end;
199
200 function THdateClass.GetGregMonth : LongInt;
201 begin
202 Result := hdate_get_gmonth (fh);
203 end;
204
205 function THdateClass.GetGregYear : LongInt;
206 begin
207 Result := hdate_get_gyear (fh);
208 end;
209
210 function THdateClass.GetHebDay : LongInt;
211 begin
212 Result := hdate_get_hday (fh);
213 end;
214
215 function THdateClass.GetHebMonth : LongInt;
216 begin
217 Result := hdate_get_hmonth (fh);
218 end;
219
220 function THdateClass.GetHebYear : LongInt;
221 begin
222 Result :=hdate_get_hyear (fh);
223 end;
224
225 procedure THdateClass.Assign (Source : THdateClass);
226 begin
227 if (not Assigned(Source)) then
228 begin
229 raise Exception.Create ('Source is not allocated.');
230 end;
231
232 Assert (Assigned(Source), 'Source is not allocated.'); // Should never happned ... but just in case...
233
234 fToDestroy := Source.ToDestroy;
235
236 HebDay := Source.HebDay;
237 GregDay := Source.GregDay;
238 HebMonth := Source.HebMonth;
239 GregMonth := Source.GregMonth;
240 HebYear := Source.HebYear;
241 GregYear := Source.GregYear;
242
243 SetJulianDay (Source.JulianDay);
244 SetDiaspora (Source.Diaspora);
245 end;
246
247 function THdateClass.get_format_date (s : LongInt) : String;
248 begin
249 Result := StrPas (hdate_get_format_date (fh, cInt(fDiaspora), s));
250 end;
251
252 function THdateClass.get_day_of_week_string (s : LongInt) : String;
253 begin
254 Result := StrPas (hdate_get_day_string (fh^.hd_dw, s));
255 end;
256
257 function THdateClass.get_month_string (s : LongInt) : String;
258 begin
259 Result := StrPas (hdate_get_month_string (fh^.gd_mon, s));
260 end;
261
262 function THdateClass.get_hebrew_month_string (s : LongInt) : String;
263 begin
264 Result := StrPas (hdate_get_hebrew_month_string (fh^.hd_mon, s));
265 end;
266
267 function THdateClass.get_holyday_string (s : LongInt) : String;
268 begin
269 Result := StrPas (hdate_get_holyday_string (fHolyday, s));
270 end;
271
272 function THdateClass.get_parasha_string (s : LongInt) : String;
273 begin
274 Result := StrPas (hdate_get_parasha_string (fParasha, s));
275 end;
276
277 function THdateClass.GetDayOfWeek : LongInt;
278 begin
279 Result := hdate_get_day_of_the_week (fh);
280 end;
281
282 function THdateClass.get_size_of_year : LongInt;
283 begin
284 Result := hdate_get_size_of_year (fh);
285 end;
286
287 function THdateClass.get_new_year_day_of_the_week : LongInt;
288 begin
289 Result := hdate_get_new_year_day_of_the_week (fh);
290 end;
291
292 function THdateClass.get_days : LongInt;
293 begin
294 Result := hdate_get_days (fh);
295 end;
296
297 function THdateClass.get_weeks : LongInt;
298 begin
299 Result := hdate_get_weeks (fh);
300 end;
301
302 function THdateClass.get_sunrise (latitude, longitude : Double; tz : LongInt) : LongInt;
303 var
304 sunrise,
305 sunset : cInt;
306 begin
307 hdate_get_utc_sun_time (fh^.gd_day, fh^.gd_mon, fh^.gd_year, latitude, longitude, @sunrise, @sunset);
308 Result := sunrise + tz * 60;
309 end;
310
311 function THdateClass.get_sunset (latitude, longitude : Double; tz : LongInt) : LongInt;
312 var
313 sunrise,
314 sunset : cInt;
315 begin
316 hdate_get_utc_sun_time (fh^.gd_day, fh^.gd_mon, fh^.gd_year, latitude, longitude, @sunrise, @sunset);
317 Result := sunset + tz * 60;
318 end;
319
320 end.
0
1 EXTRA_DIST = hdate.i
2
3 if WITH_PERL
4
5 DEPS= $(top_builddir)/src/libhdate.la
6
7 CLEANFILES = *.o *.cxx *.so *wrap* *.pm
8
9 all-am: hdate.so
10
11
12 hdate.so: hdate_wrap.cxx
13 g++ -fpic -c hdate_wrap.cxx $(PE_CFLAGS) -I$(top_srcdir)/src
14 g++ -shared ../../src/.libs/libhdate.so hdate_wrap.o -o hdate.so
15
16 hdate_wrap.cxx: hdate.i
17 swig -perl -c++ hdate.i
18
19 install-data-local: hdate.so
20 $(mkinstalldirs) $(DESTDIR)$(PE_MODULES_PATH)/auto/hdate/
21 $(INSTALL_DATA) hdate.so $(DESTDIR)$(PE_MODULES_PATH)/auto/hdate/hdate.so
22 $(INSTALL_DATA) hdate.pm $(DESTDIR)$(PE_MODULES_PATH)/hdate.pm
23
24 endif
0 # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
1
2 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
3 # This Makefile.in is free software; the Free Software Foundation
4 # gives unlimited permission to copy and/or distribute it,
5 # with or without modifications, as long as this notice is preserved.
6
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
9 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 # PARTICULAR PURPOSE.
11
12
13 SHELL = @SHELL@
14
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 VPATH = @srcdir@
18 prefix = @prefix@
19 exec_prefix = @exec_prefix@
20
21 bindir = @bindir@
22 sbindir = @sbindir@
23 libexecdir = @libexecdir@
24 datadir = @datadir@
25 sysconfdir = @sysconfdir@
26 sharedstatedir = @sharedstatedir@
27 localstatedir = @localstatedir@
28 libdir = @libdir@
29 infodir = @infodir@
30 mandir = @mandir@
31 includedir = @includedir@
32 oldincludedir = /usr/include
33
34 DESTDIR =
35
36 pkgdatadir = $(datadir)/@PACKAGE@
37 pkglibdir = $(libdir)/@PACKAGE@
38 pkgincludedir = $(includedir)/@PACKAGE@
39
40 top_builddir = ../..
41
42 ACLOCAL = @ACLOCAL@
43 AUTOCONF = @AUTOCONF@
44 AUTOMAKE = @AUTOMAKE@
45 AUTOHEADER = @AUTOHEADER@
46
47 INSTALL = @INSTALL@
48 INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
49 INSTALL_DATA = @INSTALL_DATA@
50 INSTALL_SCRIPT = @INSTALL_SCRIPT@
51 transform = @program_transform_name@
52
53 NORMAL_INSTALL = :
54 PRE_INSTALL = :
55 POST_INSTALL = :
56 NORMAL_UNINSTALL = :
57 PRE_UNINSTALL = :
58 POST_UNINSTALL = :
59 host_alias = @host_alias@
60 host_triplet = @host@
61 AR = @AR@
62 AS = @AS@
63 BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
64 CATOBJEXT = @CATOBJEXT@
65 CC = @CC@
66 CFLAGS = @CFLAGS@
67 CXX = @CXX@
68 CXXCPP = @CXXCPP@
69 DATADIRNAME = @DATADIRNAME@
70 DLLTOOL = @DLLTOOL@
71 ECHO = @ECHO@
72 EGREP = @EGREP@
73 EXEEXT = @EXEEXT@
74 F77 = @F77@
75 GCJ = @GCJ@
76 GCJFLAGS = @GCJFLAGS@
77 GENCAT = @GENCAT@
78 GLIBC2 = @GLIBC2@
79 GLIBC21 = @GLIBC21@
80 GMSGFMT = @GMSGFMT@
81 HAVE_ASPRINTF = @HAVE_ASPRINTF@
82 HAVE_LIB = @HAVE_LIB@
83 HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
84 HAVE_SNPRINTF = @HAVE_SNPRINTF@
85 HAVE_WPRINTF = @HAVE_WPRINTF@
86 INSTOBJEXT = @INSTOBJEXT@
87 INTLBISON = @INTLBISON@
88 INTLLIBS = @INTLLIBS@
89 INTLOBJS = @INTLOBJS@
90 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
91 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
92 LIB = @LIB@
93 LIBICONV = @LIBICONV@
94 LIBINTL = @LIBINTL@
95 LIBS = @LIBS@
96 LIBTOOL = @LIBTOOL@
97 LN_S = @LN_S@
98 LTLIB = @LTLIB@
99 LTLIBICONV = @LTLIBICONV@
100 LTLIBINTL = @LTLIBINTL@
101 MAINT = @MAINT@
102 MAKEINFO = @MAKEINFO@
103 MKINSTALLDIRS = @MKINSTALLDIRS@
104 OBJDUMP = @OBJDUMP@
105 OBJEXT = @OBJEXT@
106 PACKAGE = @PACKAGE@
107 PA_MODULES_PATH = @PA_MODULES_PATH@
108 PA_VERSION = @PA_VERSION@
109 PE_CFLAGS = @PE_CFLAGS@
110 PE_MODULES_PATH = @PE_MODULES_PATH@
111 PKG_CONFIG = @PKG_CONFIG@
112 POSUB = @POSUB@
113 PY_CFLAGS = @PY_CFLAGS@
114 PY_MODULES_PATH = @PY_MODULES_PATH@
115 PY_VERSION = @PY_VERSION@
116 RANLIB = @RANLIB@
117 RC = @RC@
118 STRIP = @STRIP@
119 USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
120 USE_NLS = @USE_NLS@
121 VERSION = @VERSION@
122 VERSION_INFO = @VERSION_INFO@
123 have_pascal = @have_pascal@
124 have_perl = @have_perl@
125 have_python = @have_python@
126 have_swig = @have_swig@
127
128 EXTRA_DIST = hdate.i
129
130 @WITH_PERL_TRUE@DEPS = $(top_builddir)/src/libhdate.la
131
132 @WITH_PERL_TRUE@CLEANFILES = *.o *.cxx *.so *wrap* *.pm
133 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
134 CONFIG_CLEAN_FILES =
135 DIST_COMMON = Makefile.am Makefile.in
136
137
138 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
139
140 TAR = tar
141 GZIP_ENV = --best
142 all: all-redirect
143 .SUFFIXES:
144 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
145 cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps bindings/perl/Makefile
146
147 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
148 cd $(top_builddir) \
149 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
150
151 tags: TAGS
152 TAGS:
153
154
155 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
156
157 subdir = bindings/perl
158
159 distdir: $(DISTFILES)
160 @for file in $(DISTFILES); do \
161 d=$(srcdir); \
162 if test -d $$d/$$file; then \
163 cp -pr $$d/$$file $(distdir)/$$file; \
164 else \
165 test -f $(distdir)/$$file \
166 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
167 || cp -p $$d/$$file $(distdir)/$$file || :; \
168 fi; \
169 done
170 info-am:
171 info: info-am
172 dvi-am:
173 dvi: dvi-am
174 check-am: all-am
175 check: check-am
176 installcheck-am:
177 installcheck: installcheck-am
178 install-exec-am:
179 install-exec: install-exec-am
180
181 install-data-am: install-data-local
182 install-data: install-data-am
183
184 install-am: all-am
185 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
186 install: install-am
187 uninstall-am:
188 uninstall: uninstall-am
189 all-am: Makefile
190 all-redirect: all-am
191 install-strip:
192 $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
193 installdirs:
194
195
196 mostlyclean-generic:
197
198 clean-generic:
199 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
200
201 distclean-generic:
202 -rm -f Makefile $(CONFIG_CLEAN_FILES)
203 -rm -f config.cache config.log stamp-h stamp-h[0-9]*
204
205 maintainer-clean-generic:
206 mostlyclean-am: mostlyclean-generic
207
208 mostlyclean: mostlyclean-am
209
210 clean-am: clean-generic mostlyclean-am
211
212 clean: clean-am
213
214 distclean-am: distclean-generic clean-am
215 -rm -f libtool
216
217 distclean: distclean-am
218
219 maintainer-clean-am: maintainer-clean-generic distclean-am
220 @echo "This command is intended for maintainers to use;"
221 @echo "it deletes files that may require special tools to rebuild."
222
223 maintainer-clean: maintainer-clean-am
224
225 .PHONY: tags distdir info-am info dvi-am dvi check check-am \
226 installcheck-am installcheck install-exec-am install-exec \
227 install-data-local install-data-am install-data install-am install \
228 uninstall-am uninstall all-redirect all-am all installdirs \
229 mostlyclean-generic distclean-generic clean-generic \
230 maintainer-clean-generic clean mostlyclean distclean maintainer-clean
231
232
233 @WITH_PERL_TRUE@all-am: hdate.so
234
235 @WITH_PERL_TRUE@hdate.so: hdate_wrap.cxx
236 @WITH_PERL_TRUE@ g++ -fpic -c hdate_wrap.cxx $(PE_CFLAGS) -I$(top_srcdir)/src
237 @WITH_PERL_TRUE@ g++ -shared ../../src/.libs/libhdate.so hdate_wrap.o -o hdate.so
238
239 @WITH_PERL_TRUE@hdate_wrap.cxx: hdate.i
240 @WITH_PERL_TRUE@ swig -perl -c++ hdate.i
241
242 @WITH_PERL_TRUE@install-data-local: hdate.so
243 @WITH_PERL_TRUE@ $(mkinstalldirs) $(DESTDIR)$(PE_MODULES_PATH)/auto/hdate/
244 @WITH_PERL_TRUE@ $(INSTALL_DATA) hdate.so $(DESTDIR)$(PE_MODULES_PATH)/auto/hdate/hdate.so
245 @WITH_PERL_TRUE@ $(INSTALL_DATA) hdate.pm $(DESTDIR)$(PE_MODULES_PATH)/hdate.pm
246
247 # Tell versions [3.59,3.63) of GNU make to not export all variables.
248 # Otherwise a system limit (for SysV at least) may be exceeded.
249 .NOEXPORT:
0 // file : hdate.i
1 %module hdate
2 %{
3 #include "../../src/hdatepp.h"
4 %}
5
6 %include ../../src/hdatepp.h
7
8 // on linux do:
9 // swig -perl hdate.i
10 // g++ -fpic -c hdate_wrap.cxx -I/usr/lib/perl5/5.8.6/i686-linux/CORE/
11 // g++ -shared ../../src/*.o hdate_wrap.o -o _hdate.so
0
1 EXTRA_DIST = hdate.i
2
3 if WITH_PYTHON
4
5 DEPS= $(top_builddir)/src/libhdate.la
6
7 CLEANFILES = *.o *.cxx *.so *wrap* *.py
8
9 all-am: _hdate.so
10
11
12 _hdate.so: hdate_wrap.cxx
13 g++ -fpic -c hdate_wrap.cxx $(PY_CFLAGS) -I$(top_srcdir)/src
14 g++ -shared ../../src/.libs/libhdate.so hdate_wrap.o -o _hdate.so
15
16 hdate_wrap.cxx: hdate.i
17 swig -python -c++ hdate.i
18
19 install-data-local: _hdate.so
20 $(mkinstalldirs) $(DESTDIR)$(PY_MODULES_PATH)
21 $(INSTALL_DATA) _hdate.so $(DESTDIR)$(PY_MODULES_PATH)/_hdate.so
22 $(INSTALL_DATA) hdate.py $(DESTDIR)$(PY_MODULES_PATH)/hdate.py
23
24 endif
0 # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
1
2 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
3 # This Makefile.in is free software; the Free Software Foundation
4 # gives unlimited permission to copy and/or distribute it,
5 # with or without modifications, as long as this notice is preserved.
6
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
9 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 # PARTICULAR PURPOSE.
11
12
13 SHELL = @SHELL@
14
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 VPATH = @srcdir@
18 prefix = @prefix@
19 exec_prefix = @exec_prefix@
20
21 bindir = @bindir@
22 sbindir = @sbindir@
23 libexecdir = @libexecdir@
24 datadir = @datadir@
25 sysconfdir = @sysconfdir@
26 sharedstatedir = @sharedstatedir@
27 localstatedir = @localstatedir@
28 libdir = @libdir@
29 infodir = @infodir@
30 mandir = @mandir@
31 includedir = @includedir@
32 oldincludedir = /usr/include
33
34 DESTDIR =
35
36 pkgdatadir = $(datadir)/@PACKAGE@
37 pkglibdir = $(libdir)/@PACKAGE@
38 pkgincludedir = $(includedir)/@PACKAGE@
39
40 top_builddir = ../..
41
42 ACLOCAL = @ACLOCAL@
43 AUTOCONF = @AUTOCONF@
44 AUTOMAKE = @AUTOMAKE@
45 AUTOHEADER = @AUTOHEADER@
46
47 INSTALL = @INSTALL@
48 INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
49 INSTALL_DATA = @INSTALL_DATA@
50 INSTALL_SCRIPT = @INSTALL_SCRIPT@
51 transform = @program_transform_name@
52
53 NORMAL_INSTALL = :
54 PRE_INSTALL = :
55 POST_INSTALL = :
56 NORMAL_UNINSTALL = :
57 PRE_UNINSTALL = :
58 POST_UNINSTALL = :
59 host_alias = @host_alias@
60 host_triplet = @host@
61 AR = @AR@
62 AS = @AS@
63 BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
64 CATOBJEXT = @CATOBJEXT@
65 CC = @CC@
66 CFLAGS = @CFLAGS@
67 CXX = @CXX@
68 CXXCPP = @CXXCPP@
69 DATADIRNAME = @DATADIRNAME@
70 DLLTOOL = @DLLTOOL@
71 ECHO = @ECHO@
72 EGREP = @EGREP@
73 EXEEXT = @EXEEXT@
74 F77 = @F77@
75 GCJ = @GCJ@
76 GCJFLAGS = @GCJFLAGS@
77 GENCAT = @GENCAT@
78 GLIBC2 = @GLIBC2@
79 GLIBC21 = @GLIBC21@
80 GMSGFMT = @GMSGFMT@
81 HAVE_ASPRINTF = @HAVE_ASPRINTF@
82 HAVE_LIB = @HAVE_LIB@
83 HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
84 HAVE_SNPRINTF = @HAVE_SNPRINTF@
85 HAVE_WPRINTF = @HAVE_WPRINTF@
86 INSTOBJEXT = @INSTOBJEXT@
87 INTLBISON = @INTLBISON@
88 INTLLIBS = @INTLLIBS@
89 INTLOBJS = @INTLOBJS@
90 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
91 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
92 LIB = @LIB@
93 LIBICONV = @LIBICONV@
94 LIBINTL = @LIBINTL@
95 LIBS = @LIBS@
96 LIBTOOL = @LIBTOOL@
97 LN_S = @LN_S@
98 LTLIB = @LTLIB@
99 LTLIBICONV = @LTLIBICONV@
100 LTLIBINTL = @LTLIBINTL@
101 MAINT = @MAINT@
102 MAKEINFO = @MAKEINFO@
103 MKINSTALLDIRS = @MKINSTALLDIRS@
104 OBJDUMP = @OBJDUMP@
105 OBJEXT = @OBJEXT@
106 PACKAGE = @PACKAGE@
107 PA_MODULES_PATH = @PA_MODULES_PATH@
108 PA_VERSION = @PA_VERSION@
109 PE_CFLAGS = @PE_CFLAGS@
110 PE_MODULES_PATH = @PE_MODULES_PATH@
111 PKG_CONFIG = @PKG_CONFIG@
112 POSUB = @POSUB@
113 PY_CFLAGS = @PY_CFLAGS@
114 PY_MODULES_PATH = @PY_MODULES_PATH@
115 PY_VERSION = @PY_VERSION@
116 RANLIB = @RANLIB@
117 RC = @RC@
118 STRIP = @STRIP@
119 USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
120 USE_NLS = @USE_NLS@
121 VERSION = @VERSION@
122 VERSION_INFO = @VERSION_INFO@
123 have_pascal = @have_pascal@
124 have_perl = @have_perl@
125 have_python = @have_python@
126 have_swig = @have_swig@
127
128 EXTRA_DIST = hdate.i
129
130 @WITH_PYTHON_TRUE@DEPS = $(top_builddir)/src/libhdate.la
131
132 @WITH_PYTHON_TRUE@CLEANFILES = *.o *.cxx *.so *wrap* *.py
133 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
134 CONFIG_CLEAN_FILES =
135 DIST_COMMON = Makefile.am Makefile.in
136
137
138 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
139
140 TAR = tar
141 GZIP_ENV = --best
142 all: all-redirect
143 .SUFFIXES:
144 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
145 cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps bindings/python/Makefile
146
147 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
148 cd $(top_builddir) \
149 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
150
151 tags: TAGS
152 TAGS:
153
154
155 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
156
157 subdir = bindings/python
158
159 distdir: $(DISTFILES)
160 @for file in $(DISTFILES); do \
161 d=$(srcdir); \
162 if test -d $$d/$$file; then \
163 cp -pr $$d/$$file $(distdir)/$$file; \
164 else \
165 test -f $(distdir)/$$file \
166 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
167 || cp -p $$d/$$file $(distdir)/$$file || :; \
168 fi; \
169 done
170 info-am:
171 info: info-am
172 dvi-am:
173 dvi: dvi-am
174 check-am: all-am
175 check: check-am
176 installcheck-am:
177 installcheck: installcheck-am
178 install-exec-am:
179 install-exec: install-exec-am
180
181 install-data-am: install-data-local
182 install-data: install-data-am
183
184 install-am: all-am
185 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
186 install: install-am
187 uninstall-am:
188 uninstall: uninstall-am
189 all-am: Makefile
190 all-redirect: all-am
191 install-strip:
192 $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
193 installdirs:
194
195
196 mostlyclean-generic:
197
198 clean-generic:
199 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
200
201 distclean-generic:
202 -rm -f Makefile $(CONFIG_CLEAN_FILES)
203 -rm -f config.cache config.log stamp-h stamp-h[0-9]*
204
205 maintainer-clean-generic:
206 mostlyclean-am: mostlyclean-generic
207
208 mostlyclean: mostlyclean-am
209
210 clean-am: clean-generic mostlyclean-am
211
212 clean: clean-am
213
214 distclean-am: distclean-generic clean-am
215 -rm -f libtool
216
217 distclean: distclean-am
218
219 maintainer-clean-am: maintainer-clean-generic distclean-am
220 @echo "This command is intended for maintainers to use;"
221 @echo "it deletes files that may require special tools to rebuild."
222
223 maintainer-clean: maintainer-clean-am
224
225 .PHONY: tags distdir info-am info dvi-am dvi check check-am \
226 installcheck-am installcheck install-exec-am install-exec \
227 install-data-local install-data-am install-data install-am install \
228 uninstall-am uninstall all-redirect all-am all installdirs \
229 mostlyclean-generic distclean-generic clean-generic \
230 maintainer-clean-generic clean mostlyclean distclean maintainer-clean
231
232
233 @WITH_PYTHON_TRUE@all-am: _hdate.so
234
235 @WITH_PYTHON_TRUE@_hdate.so: hdate_wrap.cxx
236 @WITH_PYTHON_TRUE@ g++ -fpic -c hdate_wrap.cxx $(PY_CFLAGS) -I$(top_srcdir)/src
237 @WITH_PYTHON_TRUE@ g++ -shared ../../src/.libs/libhdate.so hdate_wrap.o -o _hdate.so
238
239 @WITH_PYTHON_TRUE@hdate_wrap.cxx: hdate.i
240 @WITH_PYTHON_TRUE@ swig -python -c++ hdate.i
241
242 @WITH_PYTHON_TRUE@install-data-local: _hdate.so
243 @WITH_PYTHON_TRUE@ $(mkinstalldirs) $(DESTDIR)$(PY_MODULES_PATH)
244 @WITH_PYTHON_TRUE@ $(INSTALL_DATA) _hdate.so $(DESTDIR)$(PY_MODULES_PATH)/_hdate.so
245 @WITH_PYTHON_TRUE@ $(INSTALL_DATA) hdate.py $(DESTDIR)$(PY_MODULES_PATH)/hdate.py
246
247 # Tell versions [3.59,3.63) of GNU make to not export all variables.
248 # Otherwise a system limit (for SysV at least) may be exceeded.
249 .NOEXPORT:
0 // file : hdate.i
1 %module hdate
2 %{
3 #include "../../src/hdatepp.h"
4 %}
5
6 %include ../../src/hdatepp.h
7
8 // on linux do:
9 // swig -python hdate.i
10 // g++ -fpic -c hdate_wrap.cxx -I/usr/include/python2.3
11 // g++ -shared ../../src/*.o hdate_wrap.o -o _hdate.so
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 Free Software Foundation, Inc.
4
5 timestamp='2005-08-03'
6
7 # This file is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
20 # 02110-1301, USA.
21 #
22 # As a special exception to the GNU General Public License, if you
23 # distribute this file as part of a program that contains a
24 # configuration script generated by Autoconf, you may include it under
25 # the same distribution terms that you use for the rest of that program.
26
27
28 # Originally written by Per Bothner <per@bothner.com>.
29 # Please send patches to <config-patches@gnu.org>. Submit a context
30 # diff and a properly formatted ChangeLog entry.
31 #
32 # This script attempts to guess a canonical system name similar to
33 # config.sub. If it succeeds, it prints the system name on stdout, and
34 # exits with 0. Otherwise, it exits with 1.
35 #
36 # The plan is that this can be called by configure scripts if you
37 # don't specify an explicit build system type.
38
39 me=`echo "$0" | sed -e 's,.*/,,'`
40
41 usage="\
42 Usage: $0 [OPTION]
43
44 Output the configuration name of the system \`$me' is run on.
45
46 Operation modes:
47 -h, --help print this help, then exit
48 -t, --time-stamp print date of last modification, then exit
49 -v, --version print version number, then exit
50
51 Report bugs and patches to <config-patches@gnu.org>."
52
53 version="\
54 GNU config.guess ($timestamp)
55
56 Originally written by Per Bothner.
57 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
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 -q "$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 tupples: *-*-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 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
163 esac
164 # The Operating System including object format, if it has switched
165 # to ELF recently, or will in the future.
166 case "${UNAME_MACHINE_ARCH}" in
167 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
168 eval $set_cc_for_build
169 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
170 | grep __ELF__ >/dev/null
171 then
172 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
173 # Return netbsd for either. FIX?
174 os=netbsd
175 else
176 os=netbsdelf
177 fi
178 ;;
179 *)
180 os=netbsd
181 ;;
182 esac
183 # The OS release
184 # Debian GNU/NetBSD machines have a different userland, and
185 # thus, need a distinct triplet. However, they do not need
186 # kernel version information, so it can be replaced with a
187 # suitable tag, in the style of linux-gnu.
188 case "${UNAME_VERSION}" in
189 Debian*)
190 release='-gnu'
191 ;;
192 *)
193 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
194 ;;
195 esac
196 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
197 # contains redundant information, the shorter form:
198 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
199 echo "${machine}-${os}${release}"
200 exit ;;
201 *:OpenBSD:*:*)
202 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
203 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
204 exit ;;
205 *:ekkoBSD:*:*)
206 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
207 exit ;;
208 macppc:MirBSD:*:*)
209 echo powerppc-unknown-mirbsd${UNAME_RELEASE}
210 exit ;;
211 *:MirBSD:*:*)
212 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
213 exit ;;
214 alpha:OSF1:*:*)
215 case $UNAME_RELEASE in
216 *4.0)
217 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
218 ;;
219 *5.*)
220 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
221 ;;
222 esac
223 # According to Compaq, /usr/sbin/psrinfo has been available on
224 # OSF/1 and Tru64 systems produced since 1995. I hope that
225 # covers most systems running today. This code pipes the CPU
226 # types through head -n 1, so we only detect the type of CPU 0.
227 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
228 case "$ALPHA_CPU_TYPE" in
229 "EV4 (21064)")
230 UNAME_MACHINE="alpha" ;;
231 "EV4.5 (21064)")
232 UNAME_MACHINE="alpha" ;;
233 "LCA4 (21066/21068)")
234 UNAME_MACHINE="alpha" ;;
235 "EV5 (21164)")
236 UNAME_MACHINE="alphaev5" ;;
237 "EV5.6 (21164A)")
238 UNAME_MACHINE="alphaev56" ;;
239 "EV5.6 (21164PC)")
240 UNAME_MACHINE="alphapca56" ;;
241 "EV5.7 (21164PC)")
242 UNAME_MACHINE="alphapca57" ;;
243 "EV6 (21264)")
244 UNAME_MACHINE="alphaev6" ;;
245 "EV6.7 (21264A)")
246 UNAME_MACHINE="alphaev67" ;;
247 "EV6.8CB (21264C)")
248 UNAME_MACHINE="alphaev68" ;;
249 "EV6.8AL (21264B)")
250 UNAME_MACHINE="alphaev68" ;;
251 "EV6.8CX (21264D)")
252 UNAME_MACHINE="alphaev68" ;;
253 "EV6.9A (21264/EV69A)")
254 UNAME_MACHINE="alphaev69" ;;
255 "EV7 (21364)")
256 UNAME_MACHINE="alphaev7" ;;
257 "EV7.9 (21364A)")
258 UNAME_MACHINE="alphaev79" ;;
259 esac
260 # A Pn.n version is a patched version.
261 # A Vn.n version is a released version.
262 # A Tn.n version is a released field test version.
263 # A Xn.n version is an unreleased experimental baselevel.
264 # 1.2 uses "1.2" for uname -r.
265 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
266 exit ;;
267 Alpha\ *:Windows_NT*:*)
268 # How do we know it's Interix rather than the generic POSIX subsystem?
269 # Should we change UNAME_MACHINE based on the output of uname instead
270 # of the specific Alpha model?
271 echo alpha-pc-interix
272 exit ;;
273 21064:Windows_NT:50:3)
274 echo alpha-dec-winnt3.5
275 exit ;;
276 Amiga*:UNIX_System_V:4.0:*)
277 echo m68k-unknown-sysv4
278 exit ;;
279 *:[Aa]miga[Oo][Ss]:*:*)
280 echo ${UNAME_MACHINE}-unknown-amigaos
281 exit ;;
282 *:[Mm]orph[Oo][Ss]:*:*)
283 echo ${UNAME_MACHINE}-unknown-morphos
284 exit ;;
285 *:OS/390:*:*)
286 echo i370-ibm-openedition
287 exit ;;
288 *:z/VM:*:*)
289 echo s390-ibm-zvmoe
290 exit ;;
291 *:OS400:*:*)
292 echo powerpc-ibm-os400
293 exit ;;
294 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
295 echo arm-acorn-riscix${UNAME_RELEASE}
296 exit ;;
297 arm:riscos:*:*|arm:RISCOS:*:*)
298 echo arm-unknown-riscos
299 exit ;;
300 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
301 echo hppa1.1-hitachi-hiuxmpp
302 exit ;;
303 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
304 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
305 if test "`(/bin/universe) 2>/dev/null`" = att ; then
306 echo pyramid-pyramid-sysv3
307 else
308 echo pyramid-pyramid-bsd
309 fi
310 exit ;;
311 NILE*:*:*:dcosx)
312 echo pyramid-pyramid-svr4
313 exit ;;
314 DRS?6000:unix:4.0:6*)
315 echo sparc-icl-nx6
316 exit ;;
317 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
318 case `/usr/bin/uname -p` in
319 sparc) echo sparc-icl-nx7; exit ;;
320 esac ;;
321 sun4H:SunOS:5.*:*)
322 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
323 exit ;;
324 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
325 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
326 exit ;;
327 i86pc:SunOS:5.*:*)
328 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
329 exit ;;
330 sun4*:SunOS:6*:*)
331 # According to config.sub, this is the proper way to canonicalize
332 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
333 # it's likely to be more like Solaris than SunOS4.
334 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335 exit ;;
336 sun4*:SunOS:*:*)
337 case "`/usr/bin/arch -k`" in
338 Series*|S4*)
339 UNAME_RELEASE=`uname -v`
340 ;;
341 esac
342 # Japanese Language versions have a version number like `4.1.3-JL'.
343 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
344 exit ;;
345 sun3*:SunOS:*:*)
346 echo m68k-sun-sunos${UNAME_RELEASE}
347 exit ;;
348 sun*:*:4.2BSD:*)
349 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
350 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
351 case "`/bin/arch`" in
352 sun3)
353 echo m68k-sun-sunos${UNAME_RELEASE}
354 ;;
355 sun4)
356 echo sparc-sun-sunos${UNAME_RELEASE}
357 ;;
358 esac
359 exit ;;
360 aushp:SunOS:*:*)
361 echo sparc-auspex-sunos${UNAME_RELEASE}
362 exit ;;
363 # The situation for MiNT is a little confusing. The machine name
364 # can be virtually everything (everything which is not
365 # "atarist" or "atariste" at least should have a processor
366 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
367 # to the lowercase version "mint" (or "freemint"). Finally
368 # the system name "TOS" denotes a system which is actually not
369 # MiNT. But MiNT is downward compatible to TOS, so this should
370 # be no problem.
371 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
372 echo m68k-atari-mint${UNAME_RELEASE}
373 exit ;;
374 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
375 echo m68k-atari-mint${UNAME_RELEASE}
376 exit ;;
377 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
378 echo m68k-atari-mint${UNAME_RELEASE}
379 exit ;;
380 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
381 echo m68k-milan-mint${UNAME_RELEASE}
382 exit ;;
383 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
384 echo m68k-hades-mint${UNAME_RELEASE}
385 exit ;;
386 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
387 echo m68k-unknown-mint${UNAME_RELEASE}
388 exit ;;
389 m68k:machten:*:*)
390 echo m68k-apple-machten${UNAME_RELEASE}
391 exit ;;
392 powerpc:machten:*:*)
393 echo powerpc-apple-machten${UNAME_RELEASE}
394 exit ;;
395 RISC*:Mach:*:*)
396 echo mips-dec-mach_bsd4.3
397 exit ;;
398 RISC*:ULTRIX:*:*)
399 echo mips-dec-ultrix${UNAME_RELEASE}
400 exit ;;
401 VAX*:ULTRIX*:*:*)
402 echo vax-dec-ultrix${UNAME_RELEASE}
403 exit ;;
404 2020:CLIX:*:* | 2430:CLIX:*:*)
405 echo clipper-intergraph-clix${UNAME_RELEASE}
406 exit ;;
407 mips:*:*:UMIPS | mips:*:*:RISCos)
408 eval $set_cc_for_build
409 sed 's/^ //' << EOF >$dummy.c
410 #ifdef __cplusplus
411 #include <stdio.h> /* for printf() prototype */
412 int main (int argc, char *argv[]) {
413 #else
414 int main (argc, argv) int argc; char *argv[]; {
415 #endif
416 #if defined (host_mips) && defined (MIPSEB)
417 #if defined (SYSTYPE_SYSV)
418 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
419 #endif
420 #if defined (SYSTYPE_SVR4)
421 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
422 #endif
423 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
424 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
425 #endif
426 #endif
427 exit (-1);
428 }
429 EOF
430 $CC_FOR_BUILD -o $dummy $dummy.c &&
431 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
432 SYSTEM_NAME=`$dummy $dummyarg` &&
433 { echo "$SYSTEM_NAME"; exit; }
434 echo mips-mips-riscos${UNAME_RELEASE}
435 exit ;;
436 Motorola:PowerMAX_OS:*:*)
437 echo powerpc-motorola-powermax
438 exit ;;
439 Motorola:*:4.3:PL8-*)
440 echo powerpc-harris-powermax
441 exit ;;
442 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
443 echo powerpc-harris-powermax
444 exit ;;
445 Night_Hawk:Power_UNIX:*:*)
446 echo powerpc-harris-powerunix
447 exit ;;
448 m88k:CX/UX:7*:*)
449 echo m88k-harris-cxux7
450 exit ;;
451 m88k:*:4*:R4*)
452 echo m88k-motorola-sysv4
453 exit ;;
454 m88k:*:3*:R3*)
455 echo m88k-motorola-sysv3
456 exit ;;
457 AViiON:dgux:*:*)
458 # DG/UX returns AViiON for all architectures
459 UNAME_PROCESSOR=`/usr/bin/uname -p`
460 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
461 then
462 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
463 [ ${TARGET_BINARY_INTERFACE}x = x ]
464 then
465 echo m88k-dg-dgux${UNAME_RELEASE}
466 else
467 echo m88k-dg-dguxbcs${UNAME_RELEASE}
468 fi
469 else
470 echo i586-dg-dgux${UNAME_RELEASE}
471 fi
472 exit ;;
473 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
474 echo m88k-dolphin-sysv3
475 exit ;;
476 M88*:*:R3*:*)
477 # Delta 88k system running SVR3
478 echo m88k-motorola-sysv3
479 exit ;;
480 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
481 echo m88k-tektronix-sysv3
482 exit ;;
483 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
484 echo m68k-tektronix-bsd
485 exit ;;
486 *:IRIX*:*:*)
487 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
488 exit ;;
489 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
490 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
491 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
492 i*86:AIX:*:*)
493 echo i386-ibm-aix
494 exit ;;
495 ia64:AIX:*:*)
496 if [ -x /usr/bin/oslevel ] ; then
497 IBM_REV=`/usr/bin/oslevel`
498 else
499 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
500 fi
501 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
502 exit ;;
503 *:AIX:2:3)
504 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
505 eval $set_cc_for_build
506 sed 's/^ //' << EOF >$dummy.c
507 #include <sys/systemcfg.h>
508
509 main()
510 {
511 if (!__power_pc())
512 exit(1);
513 puts("powerpc-ibm-aix3.2.5");
514 exit(0);
515 }
516 EOF
517 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
518 then
519 echo "$SYSTEM_NAME"
520 else
521 echo rs6000-ibm-aix3.2.5
522 fi
523 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
524 echo rs6000-ibm-aix3.2.4
525 else
526 echo rs6000-ibm-aix3.2
527 fi
528 exit ;;
529 *:AIX:*:[45])
530 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
531 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
532 IBM_ARCH=rs6000
533 else
534 IBM_ARCH=powerpc
535 fi
536 if [ -x /usr/bin/oslevel ] ; then
537 IBM_REV=`/usr/bin/oslevel`
538 else
539 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
540 fi
541 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
542 exit ;;
543 *:AIX:*:*)
544 echo rs6000-ibm-aix
545 exit ;;
546 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
547 echo romp-ibm-bsd4.4
548 exit ;;
549 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
550 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
551 exit ;; # report: romp-ibm BSD 4.3
552 *:BOSX:*:*)
553 echo rs6000-bull-bosx
554 exit ;;
555 DPX/2?00:B.O.S.:*:*)
556 echo m68k-bull-sysv3
557 exit ;;
558 9000/[34]??:4.3bsd:1.*:*)
559 echo m68k-hp-bsd
560 exit ;;
561 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
562 echo m68k-hp-bsd4.4
563 exit ;;
564 9000/[34678]??:HP-UX:*:*)
565 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
566 case "${UNAME_MACHINE}" in
567 9000/31? ) HP_ARCH=m68000 ;;
568 9000/[34]?? ) HP_ARCH=m68k ;;
569 9000/[678][0-9][0-9])
570 if [ -x /usr/bin/getconf ]; then
571 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
572 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
573 case "${sc_cpu_version}" in
574 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
575 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
576 532) # CPU_PA_RISC2_0
577 case "${sc_kernel_bits}" in
578 32) HP_ARCH="hppa2.0n" ;;
579 64) HP_ARCH="hppa2.0w" ;;
580 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
581 esac ;;
582 esac
583 fi
584 if [ "${HP_ARCH}" = "" ]; then
585 eval $set_cc_for_build
586 sed 's/^ //' << EOF >$dummy.c
587
588 #define _HPUX_SOURCE
589 #include <stdlib.h>
590 #include <unistd.h>
591
592 int main ()
593 {
594 #if defined(_SC_KERNEL_BITS)
595 long bits = sysconf(_SC_KERNEL_BITS);
596 #endif
597 long cpu = sysconf (_SC_CPU_VERSION);
598
599 switch (cpu)
600 {
601 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
602 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
603 case CPU_PA_RISC2_0:
604 #if defined(_SC_KERNEL_BITS)
605 switch (bits)
606 {
607 case 64: puts ("hppa2.0w"); break;
608 case 32: puts ("hppa2.0n"); break;
609 default: puts ("hppa2.0"); break;
610 } break;
611 #else /* !defined(_SC_KERNEL_BITS) */
612 puts ("hppa2.0"); break;
613 #endif
614 default: puts ("hppa1.0"); break;
615 }
616 exit (0);
617 }
618 EOF
619 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
620 test -z "$HP_ARCH" && HP_ARCH=hppa
621 fi ;;
622 esac
623 if [ ${HP_ARCH} = "hppa2.0w" ]
624 then
625 eval $set_cc_for_build
626
627 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
628 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
629 # generating 64-bit code. GNU and HP use different nomenclature:
630 #
631 # $ CC_FOR_BUILD=cc ./config.guess
632 # => hppa2.0w-hp-hpux11.23
633 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
634 # => hppa64-hp-hpux11.23
635
636 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
637 grep __LP64__ >/dev/null
638 then
639 HP_ARCH="hppa2.0w"
640 else
641 HP_ARCH="hppa64"
642 fi
643 fi
644 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
645 exit ;;
646 ia64:HP-UX:*:*)
647 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
648 echo ia64-hp-hpux${HPUX_REV}
649 exit ;;
650 3050*:HI-UX:*:*)
651 eval $set_cc_for_build
652 sed 's/^ //' << EOF >$dummy.c
653 #include <unistd.h>
654 int
655 main ()
656 {
657 long cpu = sysconf (_SC_CPU_VERSION);
658 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
659 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
660 results, however. */
661 if (CPU_IS_PA_RISC (cpu))
662 {
663 switch (cpu)
664 {
665 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
666 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
667 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
668 default: puts ("hppa-hitachi-hiuxwe2"); break;
669 }
670 }
671 else if (CPU_IS_HP_MC68K (cpu))
672 puts ("m68k-hitachi-hiuxwe2");
673 else puts ("unknown-hitachi-hiuxwe2");
674 exit (0);
675 }
676 EOF
677 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
678 { echo "$SYSTEM_NAME"; exit; }
679 echo unknown-hitachi-hiuxwe2
680 exit ;;
681 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
682 echo hppa1.1-hp-bsd
683 exit ;;
684 9000/8??:4.3bsd:*:*)
685 echo hppa1.0-hp-bsd
686 exit ;;
687 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
688 echo hppa1.0-hp-mpeix
689 exit ;;
690 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
691 echo hppa1.1-hp-osf
692 exit ;;
693 hp8??:OSF1:*:*)
694 echo hppa1.0-hp-osf
695 exit ;;
696 i*86:OSF1:*:*)
697 if [ -x /usr/sbin/sysversion ] ; then
698 echo ${UNAME_MACHINE}-unknown-osf1mk
699 else
700 echo ${UNAME_MACHINE}-unknown-osf1
701 fi
702 exit ;;
703 parisc*:Lites*:*:*)
704 echo hppa1.1-hp-lites
705 exit ;;
706 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
707 echo c1-convex-bsd
708 exit ;;
709 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
710 if getsysinfo -f scalar_acc
711 then echo c32-convex-bsd
712 else echo c2-convex-bsd
713 fi
714 exit ;;
715 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
716 echo c34-convex-bsd
717 exit ;;
718 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
719 echo c38-convex-bsd
720 exit ;;
721 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
722 echo c4-convex-bsd
723 exit ;;
724 CRAY*Y-MP:*:*:*)
725 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
726 exit ;;
727 CRAY*[A-Z]90:*:*:*)
728 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
729 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
730 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
731 -e 's/\.[^.]*$/.X/'
732 exit ;;
733 CRAY*TS:*:*:*)
734 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
735 exit ;;
736 CRAY*T3E:*:*:*)
737 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
738 exit ;;
739 CRAY*SV1:*:*:*)
740 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
741 exit ;;
742 *:UNICOS/mp:*:*)
743 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
744 exit ;;
745 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
746 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
747 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
748 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
749 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
750 exit ;;
751 5000:UNIX_System_V:4.*:*)
752 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
753 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
754 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
755 exit ;;
756 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
757 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
758 exit ;;
759 sparc*:BSD/OS:*:*)
760 echo sparc-unknown-bsdi${UNAME_RELEASE}
761 exit ;;
762 *:BSD/OS:*:*)
763 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
764 exit ;;
765 *:FreeBSD:*:*)
766 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
767 exit ;;
768 i*:CYGWIN*:*)
769 echo ${UNAME_MACHINE}-pc-cygwin
770 exit ;;
771 i*:MINGW*:*)
772 echo ${UNAME_MACHINE}-pc-mingw32
773 exit ;;
774 i*:windows32*:*)
775 # uname -m includes "-pc" on this system.
776 echo ${UNAME_MACHINE}-mingw32
777 exit ;;
778 i*:PW*:*)
779 echo ${UNAME_MACHINE}-pc-pw32
780 exit ;;
781 x86:Interix*:[34]*)
782 echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
783 exit ;;
784 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
785 echo i${UNAME_MACHINE}-pc-mks
786 exit ;;
787 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
788 # How do we know it's Interix rather than the generic POSIX subsystem?
789 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
790 # UNAME_MACHINE based on the output of uname instead of i386?
791 echo i586-pc-interix
792 exit ;;
793 i*:UWIN*:*)
794 echo ${UNAME_MACHINE}-pc-uwin
795 exit ;;
796 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
797 echo x86_64-unknown-cygwin
798 exit ;;
799 p*:CYGWIN*:*)
800 echo powerpcle-unknown-cygwin
801 exit ;;
802 prep*:SunOS:5.*:*)
803 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
804 exit ;;
805 *:GNU:*:*)
806 # the GNU system
807 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
808 exit ;;
809 *:GNU/*:*:*)
810 # other systems with GNU libc and userland
811 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
812 exit ;;
813 i*86:Minix:*:*)
814 echo ${UNAME_MACHINE}-pc-minix
815 exit ;;
816 arm*:Linux:*:*)
817 echo ${UNAME_MACHINE}-unknown-linux-gnu
818 exit ;;
819 cris:Linux:*:*)
820 echo cris-axis-linux-gnu
821 exit ;;
822 crisv32:Linux:*:*)
823 echo crisv32-axis-linux-gnu
824 exit ;;
825 frv:Linux:*:*)
826 echo frv-unknown-linux-gnu
827 exit ;;
828 ia64:Linux:*:*)
829 echo ${UNAME_MACHINE}-unknown-linux-gnu
830 exit ;;
831 m32r*:Linux:*:*)
832 echo ${UNAME_MACHINE}-unknown-linux-gnu
833 exit ;;
834 m68*:Linux:*:*)
835 echo ${UNAME_MACHINE}-unknown-linux-gnu
836 exit ;;
837 mips:Linux:*:*)
838 eval $set_cc_for_build
839 sed 's/^ //' << EOF >$dummy.c
840 #undef CPU
841 #undef mips
842 #undef mipsel
843 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
844 CPU=mipsel
845 #else
846 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
847 CPU=mips
848 #else
849 CPU=
850 #endif
851 #endif
852 EOF
853 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
854 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
855 ;;
856 mips64:Linux:*:*)
857 eval $set_cc_for_build
858 sed 's/^ //' << EOF >$dummy.c
859 #undef CPU
860 #undef mips64
861 #undef mips64el
862 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
863 CPU=mips64el
864 #else
865 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
866 CPU=mips64
867 #else
868 CPU=
869 #endif
870 #endif
871 EOF
872 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
873 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
874 ;;
875 or32:Linux:*:*)
876 echo or32-unknown-linux-gnu
877 exit ;;
878 ppc:Linux:*:*)
879 echo powerpc-unknown-linux-gnu
880 exit ;;
881 ppc64:Linux:*:*)
882 echo powerpc64-unknown-linux-gnu
883 exit ;;
884 alpha:Linux:*:*)
885 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
886 EV5) UNAME_MACHINE=alphaev5 ;;
887 EV56) UNAME_MACHINE=alphaev56 ;;
888 PCA56) UNAME_MACHINE=alphapca56 ;;
889 PCA57) UNAME_MACHINE=alphapca56 ;;
890 EV6) UNAME_MACHINE=alphaev6 ;;
891 EV67) UNAME_MACHINE=alphaev67 ;;
892 EV68*) UNAME_MACHINE=alphaev68 ;;
893 esac
894 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
895 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
896 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
897 exit ;;
898 parisc:Linux:*:* | hppa:Linux:*:*)
899 # Look for CPU level
900 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
901 PA7*) echo hppa1.1-unknown-linux-gnu ;;
902 PA8*) echo hppa2.0-unknown-linux-gnu ;;
903 *) echo hppa-unknown-linux-gnu ;;
904 esac
905 exit ;;
906 parisc64:Linux:*:* | hppa64:Linux:*:*)
907 echo hppa64-unknown-linux-gnu
908 exit ;;
909 s390:Linux:*:* | s390x:Linux:*:*)
910 echo ${UNAME_MACHINE}-ibm-linux
911 exit ;;
912 sh64*:Linux:*:*)
913 echo ${UNAME_MACHINE}-unknown-linux-gnu
914 exit ;;
915 sh*:Linux:*:*)
916 echo ${UNAME_MACHINE}-unknown-linux-gnu
917 exit ;;
918 sparc:Linux:*:* | sparc64:Linux:*:*)
919 echo ${UNAME_MACHINE}-unknown-linux-gnu
920 exit ;;
921 x86_64:Linux:*:*)
922 echo x86_64-unknown-linux-gnu
923 exit ;;
924 i*86:Linux:*:*)
925 # The BFD linker knows what the default object file format is, so
926 # first see if it will tell us. cd to the root directory to prevent
927 # problems with other programs or directories called `ld' in the path.
928 # Set LC_ALL=C to ensure ld outputs messages in English.
929 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
930 | sed -ne '/supported targets:/!d
931 s/[ ][ ]*/ /g
932 s/.*supported targets: *//
933 s/ .*//
934 p'`
935 case "$ld_supported_targets" in
936 elf32-i386)
937 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
938 ;;
939 a.out-i386-linux)
940 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
941 exit ;;
942 coff-i386)
943 echo "${UNAME_MACHINE}-pc-linux-gnucoff"
944 exit ;;
945 "")
946 # Either a pre-BFD a.out linker (linux-gnuoldld) or
947 # one that does not give us useful --help.
948 echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
949 exit ;;
950 esac
951 # Determine whether the default compiler is a.out or elf
952 eval $set_cc_for_build
953 sed 's/^ //' << EOF >$dummy.c
954 #include <features.h>
955 #ifdef __ELF__
956 # ifdef __GLIBC__
957 # if __GLIBC__ >= 2
958 LIBC=gnu
959 # else
960 LIBC=gnulibc1
961 # endif
962 # else
963 LIBC=gnulibc1
964 # endif
965 #else
966 #ifdef __INTEL_COMPILER
967 LIBC=gnu
968 #else
969 LIBC=gnuaout
970 #endif
971 #endif
972 #ifdef __dietlibc__
973 LIBC=dietlibc
974 #endif
975 EOF
976 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
977 test x"${LIBC}" != x && {
978 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
979 exit
980 }
981 test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
982 ;;
983 i*86:DYNIX/ptx:4*:*)
984 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
985 # earlier versions are messed up and put the nodename in both
986 # sysname and nodename.
987 echo i386-sequent-sysv4
988 exit ;;
989 i*86:UNIX_SV:4.2MP:2.*)
990 # Unixware is an offshoot of SVR4, but it has its own version
991 # number series starting with 2...
992 # I am not positive that other SVR4 systems won't match this,
993 # I just have to hope. -- rms.
994 # Use sysv4.2uw... so that sysv4* matches it.
995 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
996 exit ;;
997 i*86:OS/2:*:*)
998 # If we were able to find `uname', then EMX Unix compatibility
999 # is probably installed.
1000 echo ${UNAME_MACHINE}-pc-os2-emx
1001 exit ;;
1002 i*86:XTS-300:*:STOP)
1003 echo ${UNAME_MACHINE}-unknown-stop
1004 exit ;;
1005 i*86:atheos:*:*)
1006 echo ${UNAME_MACHINE}-unknown-atheos
1007 exit ;;
1008 i*86:syllable:*:*)
1009 echo ${UNAME_MACHINE}-pc-syllable
1010 exit ;;
1011 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1012 echo i386-unknown-lynxos${UNAME_RELEASE}
1013 exit ;;
1014 i*86:*DOS:*:*)
1015 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1016 exit ;;
1017 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1018 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1019 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1020 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1021 else
1022 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1023 fi
1024 exit ;;
1025 i*86:*:5:[678]*)
1026 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1027 case `/bin/uname -X | grep "^Machine"` in
1028 *486*) UNAME_MACHINE=i486 ;;
1029 *Pentium) UNAME_MACHINE=i586 ;;
1030 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1031 esac
1032 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1033 exit ;;
1034 i*86:*:3.2:*)
1035 if test -f /usr/options/cb.name; then
1036 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1037 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1038 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1039 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1040 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1041 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1042 && UNAME_MACHINE=i586
1043 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1044 && UNAME_MACHINE=i686
1045 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1046 && UNAME_MACHINE=i686
1047 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1048 else
1049 echo ${UNAME_MACHINE}-pc-sysv32
1050 fi
1051 exit ;;
1052 pc:*:*:*)
1053 # Left here for compatibility:
1054 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1055 # the processor, so we play safe by assuming i386.
1056 echo i386-pc-msdosdjgpp
1057 exit ;;
1058 Intel:Mach:3*:*)
1059 echo i386-pc-mach3
1060 exit ;;
1061 paragon:*:*:*)
1062 echo i860-intel-osf1
1063 exit ;;
1064 i860:*:4.*:*) # i860-SVR4
1065 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1066 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1067 else # Add other i860-SVR4 vendors below as they are discovered.
1068 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1069 fi
1070 exit ;;
1071 mini*:CTIX:SYS*5:*)
1072 # "miniframe"
1073 echo m68010-convergent-sysv
1074 exit ;;
1075 mc68k:UNIX:SYSTEM5:3.51m)
1076 echo m68k-convergent-sysv
1077 exit ;;
1078 M680?0:D-NIX:5.3:*)
1079 echo m68k-diab-dnix
1080 exit ;;
1081 M68*:*:R3V[5678]*:*)
1082 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1083 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)
1084 OS_REL=''
1085 test -r /etc/.relid \
1086 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1087 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1088 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1089 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1090 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1091 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1092 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1093 && { echo i486-ncr-sysv4; exit; } ;;
1094 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1095 echo m68k-unknown-lynxos${UNAME_RELEASE}
1096 exit ;;
1097 mc68030:UNIX_System_V:4.*:*)
1098 echo m68k-atari-sysv4
1099 exit ;;
1100 TSUNAMI:LynxOS:2.*:*)
1101 echo sparc-unknown-lynxos${UNAME_RELEASE}
1102 exit ;;
1103 rs6000:LynxOS:2.*:*)
1104 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1105 exit ;;
1106 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1107 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1108 exit ;;
1109 SM[BE]S:UNIX_SV:*:*)
1110 echo mips-dde-sysv${UNAME_RELEASE}
1111 exit ;;
1112 RM*:ReliantUNIX-*:*:*)
1113 echo mips-sni-sysv4
1114 exit ;;
1115 RM*:SINIX-*:*:*)
1116 echo mips-sni-sysv4
1117 exit ;;
1118 *:SINIX-*:*:*)
1119 if uname -p 2>/dev/null >/dev/null ; then
1120 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1121 echo ${UNAME_MACHINE}-sni-sysv4
1122 else
1123 echo ns32k-sni-sysv
1124 fi
1125 exit ;;
1126 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1127 # says <Richard.M.Bartel@ccMail.Census.GOV>
1128 echo i586-unisys-sysv4
1129 exit ;;
1130 *:UNIX_System_V:4*:FTX*)
1131 # From Gerald Hewes <hewes@openmarket.com>.
1132 # How about differentiating between stratus architectures? -djm
1133 echo hppa1.1-stratus-sysv4
1134 exit ;;
1135 *:*:*:FTX*)
1136 # From seanf@swdc.stratus.com.
1137 echo i860-stratus-sysv4
1138 exit ;;
1139 i*86:VOS:*:*)
1140 # From Paul.Green@stratus.com.
1141 echo ${UNAME_MACHINE}-stratus-vos
1142 exit ;;
1143 *:VOS:*:*)
1144 # From Paul.Green@stratus.com.
1145 echo hppa1.1-stratus-vos
1146 exit ;;
1147 mc68*:A/UX:*:*)
1148 echo m68k-apple-aux${UNAME_RELEASE}
1149 exit ;;
1150 news*:NEWS-OS:6*:*)
1151 echo mips-sony-newsos6
1152 exit ;;
1153 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1154 if [ -d /usr/nec ]; then
1155 echo mips-nec-sysv${UNAME_RELEASE}
1156 else
1157 echo mips-unknown-sysv${UNAME_RELEASE}
1158 fi
1159 exit ;;
1160 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1161 echo powerpc-be-beos
1162 exit ;;
1163 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1164 echo powerpc-apple-beos
1165 exit ;;
1166 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1167 echo i586-pc-beos
1168 exit ;;
1169 SX-4:SUPER-UX:*:*)
1170 echo sx4-nec-superux${UNAME_RELEASE}
1171 exit ;;
1172 SX-5:SUPER-UX:*:*)
1173 echo sx5-nec-superux${UNAME_RELEASE}
1174 exit ;;
1175 SX-6:SUPER-UX:*:*)
1176 echo sx6-nec-superux${UNAME_RELEASE}
1177 exit ;;
1178 Power*:Rhapsody:*:*)
1179 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1180 exit ;;
1181 *:Rhapsody:*:*)
1182 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1183 exit ;;
1184 *:Darwin:*:*)
1185 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1186 case $UNAME_PROCESSOR in
1187 *86) UNAME_PROCESSOR=i686 ;;
1188 unknown) UNAME_PROCESSOR=powerpc ;;
1189 esac
1190 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1191 exit ;;
1192 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1193 UNAME_PROCESSOR=`uname -p`
1194 if test "$UNAME_PROCESSOR" = "x86"; then
1195 UNAME_PROCESSOR=i386
1196 UNAME_MACHINE=pc
1197 fi
1198 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1199 exit ;;
1200 *:QNX:*:4*)
1201 echo i386-pc-qnx
1202 exit ;;
1203 NSE-?:NONSTOP_KERNEL:*:*)
1204 echo nse-tandem-nsk${UNAME_RELEASE}
1205 exit ;;
1206 NSR-?:NONSTOP_KERNEL:*:*)
1207 echo nsr-tandem-nsk${UNAME_RELEASE}
1208 exit ;;
1209 *:NonStop-UX:*:*)
1210 echo mips-compaq-nonstopux
1211 exit ;;
1212 BS2000:POSIX*:*:*)
1213 echo bs2000-siemens-sysv
1214 exit ;;
1215 DS/*:UNIX_System_V:*:*)
1216 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1217 exit ;;
1218 *:Plan9:*:*)
1219 # "uname -m" is not consistent, so use $cputype instead. 386
1220 # is converted to i386 for consistency with other x86
1221 # operating systems.
1222 if test "$cputype" = "386"; then
1223 UNAME_MACHINE=i386
1224 else
1225 UNAME_MACHINE="$cputype"
1226 fi
1227 echo ${UNAME_MACHINE}-unknown-plan9
1228 exit ;;
1229 *:TOPS-10:*:*)
1230 echo pdp10-unknown-tops10
1231 exit ;;
1232 *:TENEX:*:*)
1233 echo pdp10-unknown-tenex
1234 exit ;;
1235 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1236 echo pdp10-dec-tops20
1237 exit ;;
1238 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1239 echo pdp10-xkl-tops20
1240 exit ;;
1241 *:TOPS-20:*:*)
1242 echo pdp10-unknown-tops20
1243 exit ;;
1244 *:ITS:*:*)
1245 echo pdp10-unknown-its
1246 exit ;;
1247 SEI:*:*:SEIUX)
1248 echo mips-sei-seiux${UNAME_RELEASE}
1249 exit ;;
1250 *:DragonFly:*:*)
1251 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1252 exit ;;
1253 *:*VMS:*:*)
1254 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1255 case "${UNAME_MACHINE}" in
1256 A*) echo alpha-dec-vms ; exit ;;
1257 I*) echo ia64-dec-vms ; exit ;;
1258 V*) echo vax-dec-vms ; exit ;;
1259 esac ;;
1260 *:XENIX:*:SysV)
1261 echo i386-pc-xenix
1262 exit ;;
1263 i*86:skyos:*:*)
1264 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1265 exit ;;
1266 esac
1267
1268 #echo '(No uname command or uname output not recognized.)' 1>&2
1269 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1270
1271 eval $set_cc_for_build
1272 cat >$dummy.c <<EOF
1273 #ifdef _SEQUENT_
1274 # include <sys/types.h>
1275 # include <sys/utsname.h>
1276 #endif
1277 main ()
1278 {
1279 #if defined (sony)
1280 #if defined (MIPSEB)
1281 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1282 I don't know.... */
1283 printf ("mips-sony-bsd\n"); exit (0);
1284 #else
1285 #include <sys/param.h>
1286 printf ("m68k-sony-newsos%s\n",
1287 #ifdef NEWSOS4
1288 "4"
1289 #else
1290 ""
1291 #endif
1292 ); exit (0);
1293 #endif
1294 #endif
1295
1296 #if defined (__arm) && defined (__acorn) && defined (__unix)
1297 printf ("arm-acorn-riscix\n"); exit (0);
1298 #endif
1299
1300 #if defined (hp300) && !defined (hpux)
1301 printf ("m68k-hp-bsd\n"); exit (0);
1302 #endif
1303
1304 #if defined (NeXT)
1305 #if !defined (__ARCHITECTURE__)
1306 #define __ARCHITECTURE__ "m68k"
1307 #endif
1308 int version;
1309 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1310 if (version < 4)
1311 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1312 else
1313 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1314 exit (0);
1315 #endif
1316
1317 #if defined (MULTIMAX) || defined (n16)
1318 #if defined (UMAXV)
1319 printf ("ns32k-encore-sysv\n"); exit (0);
1320 #else
1321 #if defined (CMU)
1322 printf ("ns32k-encore-mach\n"); exit (0);
1323 #else
1324 printf ("ns32k-encore-bsd\n"); exit (0);
1325 #endif
1326 #endif
1327 #endif
1328
1329 #if defined (__386BSD__)
1330 printf ("i386-pc-bsd\n"); exit (0);
1331 #endif
1332
1333 #if defined (sequent)
1334 #if defined (i386)
1335 printf ("i386-sequent-dynix\n"); exit (0);
1336 #endif
1337 #if defined (ns32000)
1338 printf ("ns32k-sequent-dynix\n"); exit (0);
1339 #endif
1340 #endif
1341
1342 #if defined (_SEQUENT_)
1343 struct utsname un;
1344
1345 uname(&un);
1346
1347 if (strncmp(un.version, "V2", 2) == 0) {
1348 printf ("i386-sequent-ptx2\n"); exit (0);
1349 }
1350 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1351 printf ("i386-sequent-ptx1\n"); exit (0);
1352 }
1353 printf ("i386-sequent-ptx\n"); exit (0);
1354
1355 #endif
1356
1357 #if defined (vax)
1358 # if !defined (ultrix)
1359 # include <sys/param.h>
1360 # if defined (BSD)
1361 # if BSD == 43
1362 printf ("vax-dec-bsd4.3\n"); exit (0);
1363 # else
1364 # if BSD == 199006
1365 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1366 # else
1367 printf ("vax-dec-bsd\n"); exit (0);
1368 # endif
1369 # endif
1370 # else
1371 printf ("vax-dec-bsd\n"); exit (0);
1372 # endif
1373 # else
1374 printf ("vax-dec-ultrix\n"); exit (0);
1375 # endif
1376 #endif
1377
1378 #if defined (alliant) && defined (i860)
1379 printf ("i860-alliant-bsd\n"); exit (0);
1380 #endif
1381
1382 exit (1);
1383 }
1384 EOF
1385
1386 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1387 { echo "$SYSTEM_NAME"; exit; }
1388
1389 # Apollos put the system type in the environment.
1390
1391 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1392
1393 # Convex versions that predate uname can use getsysinfo(1)
1394
1395 if [ -x /usr/convex/getsysinfo ]
1396 then
1397 case `getsysinfo -f cpu_type` in
1398 c1*)
1399 echo c1-convex-bsd
1400 exit ;;
1401 c2*)
1402 if getsysinfo -f scalar_acc
1403 then echo c32-convex-bsd
1404 else echo c2-convex-bsd
1405 fi
1406 exit ;;
1407 c34*)
1408 echo c34-convex-bsd
1409 exit ;;
1410 c38*)
1411 echo c38-convex-bsd
1412 exit ;;
1413 c4*)
1414 echo c4-convex-bsd
1415 exit ;;
1416 esac
1417 fi
1418
1419 cat >&2 <<EOF
1420 $0: unable to guess system type
1421
1422 This script, last modified $timestamp, has failed to recognize
1423 the operating system you are using. It is advised that you
1424 download the most up to date version of the config scripts from
1425
1426 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
1427 and
1428 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
1429
1430 If the version you run ($0) is already up to date, please
1431 send the following data and any information you think might be
1432 pertinent to <config-patches@gnu.org> in order to provide the needed
1433 information to handle your system.
1434
1435 config.guess timestamp = $timestamp
1436
1437 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1438 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1439 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1440 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1441
1442 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1443 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1444
1445 hostinfo = `(hostinfo) 2>/dev/null`
1446 /bin/universe = `(/bin/universe) 2>/dev/null`
1447 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1448 /bin/arch = `(/bin/arch) 2>/dev/null`
1449 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1450 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1451
1452 UNAME_MACHINE = ${UNAME_MACHINE}
1453 UNAME_RELEASE = ${UNAME_RELEASE}
1454 UNAME_SYSTEM = ${UNAME_SYSTEM}
1455 UNAME_VERSION = ${UNAME_VERSION}
1456 EOF
1457
1458 exit 1
1459
1460 # Local variables:
1461 # eval: (add-hook 'write-file-hooks 'time-stamp)
1462 # time-stamp-start: "timestamp='"
1463 # time-stamp-format: "%:y-%02m-%02d"
1464 # time-stamp-end: "'"
1465 # 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 Free Software Foundation, Inc.
4
5 timestamp='2005-07-08'
6
7 # This file is (in principle) common to ALL GNU software.
8 # The presence of a machine in this file suggests that SOME GNU software
9 # can handle that machine. It does not imply ALL GNU software can.
10 #
11 # This file is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2 of the License, or
14 # (at your option) any later version.
15 #
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
24 # 02110-1301, USA.
25 #
26 # As a special exception to the GNU General Public License, if you
27 # distribute this file as part of a program that contains a
28 # configuration script generated by Autoconf, you may include it under
29 # the same distribution terms that you use for the rest of that program.
30
31
32 # Please send patches to <config-patches@gnu.org>. Submit a context
33 # diff and a properly formatted ChangeLog entry.
34 #
35 # Configuration subroutine to validate and canonicalize a configuration type.
36 # Supply the specified configuration type as an argument.
37 # If it is invalid, we print an error message on stderr and exit with code 1.
38 # Otherwise, we print the canonical config type on stdout and succeed.
39
40 # This file is supposed to be the same for all GNU packages
41 # and recognize all the CPU types, system types and aliases
42 # that are meaningful with *any* GNU software.
43 # Each package is responsible for reporting which valid configurations
44 # it does not support. The user should be able to distinguish
45 # a failure to support a valid configuration from a meaningless
46 # configuration.
47
48 # The goal of this file is to map all the various variations of a given
49 # machine specification into a single specification in the form:
50 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
51 # or in some cases, the newer four-part form:
52 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
53 # It is wrong to echo any other type of specification.
54
55 me=`echo "$0" | sed -e 's,.*/,,'`
56
57 usage="\
58 Usage: $0 [OPTION] CPU-MFR-OPSYS
59 $0 [OPTION] ALIAS
60
61 Canonicalize a configuration name.
62
63 Operation modes:
64 -h, --help print this help, then exit
65 -t, --time-stamp print date of last modification, then exit
66 -v, --version print version number, then exit
67
68 Report bugs and patches to <config-patches@gnu.org>."
69
70 version="\
71 GNU config.sub ($timestamp)
72
73 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
74 Free Software Foundation, Inc.
75
76 This is free software; see the source for copying conditions. There is NO
77 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
78
79 help="
80 Try \`$me --help' for more information."
81
82 # Parse command line
83 while test $# -gt 0 ; do
84 case $1 in
85 --time-stamp | --time* | -t )
86 echo "$timestamp" ; exit ;;
87 --version | -v )
88 echo "$version" ; exit ;;
89 --help | --h* | -h )
90 echo "$usage"; exit ;;
91 -- ) # Stop option processing
92 shift; break ;;
93 - ) # Use stdin as input.
94 break ;;
95 -* )
96 echo "$me: invalid option $1$help"
97 exit 1 ;;
98
99 *local*)
100 # First pass through any local machine types.
101 echo $1
102 exit ;;
103
104 * )
105 break ;;
106 esac
107 done
108
109 case $# in
110 0) echo "$me: missing argument$help" >&2
111 exit 1;;
112 1) ;;
113 *) echo "$me: too many arguments$help" >&2
114 exit 1;;
115 esac
116
117 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
118 # Here we must recognize all the valid KERNEL-OS combinations.
119 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
120 case $maybe_os in
121 nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
122 kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
123 os=-$maybe_os
124 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
125 ;;
126 *)
127 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
128 if [ $basic_machine != $1 ]
129 then os=`echo $1 | sed 's/.*-/-/'`
130 else os=; fi
131 ;;
132 esac
133
134 ### Let's recognize common machines as not being operating systems so
135 ### that things like config.sub decstation-3100 work. We also
136 ### recognize some manufacturers as not being operating systems, so we
137 ### can provide default operating systems below.
138 case $os in
139 -sun*os*)
140 # Prevent following clause from handling this invalid input.
141 ;;
142 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
143 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
144 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
145 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
146 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
147 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
148 -apple | -axis | -knuth | -cray)
149 os=
150 basic_machine=$1
151 ;;
152 -sim | -cisco | -oki | -wec | -winbond)
153 os=
154 basic_machine=$1
155 ;;
156 -scout)
157 ;;
158 -wrs)
159 os=-vxworks
160 basic_machine=$1
161 ;;
162 -chorusos*)
163 os=-chorusos
164 basic_machine=$1
165 ;;
166 -chorusrdb)
167 os=-chorusrdb
168 basic_machine=$1
169 ;;
170 -hiux*)
171 os=-hiuxwe2
172 ;;
173 -sco5)
174 os=-sco3.2v5
175 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
176 ;;
177 -sco4)
178 os=-sco3.2v4
179 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
180 ;;
181 -sco3.2.[4-9]*)
182 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
183 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
184 ;;
185 -sco3.2v[4-9]*)
186 # Don't forget version if it is 3.2v4 or newer.
187 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
188 ;;
189 -sco*)
190 os=-sco3.2v2
191 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
192 ;;
193 -udk*)
194 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
195 ;;
196 -isc)
197 os=-isc2.2
198 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
199 ;;
200 -clix*)
201 basic_machine=clipper-intergraph
202 ;;
203 -isc*)
204 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
205 ;;
206 -lynx*)
207 os=-lynxos
208 ;;
209 -ptx*)
210 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
211 ;;
212 -windowsnt*)
213 os=`echo $os | sed -e 's/windowsnt/winnt/'`
214 ;;
215 -psos*)
216 os=-psos
217 ;;
218 -mint | -mint[0-9]*)
219 basic_machine=m68k-atari
220 os=-mint
221 ;;
222 esac
223
224 # Decode aliases for certain CPU-COMPANY combinations.
225 case $basic_machine in
226 # Recognize the basic CPU types without company name.
227 # Some are omitted here because they have special meanings below.
228 1750a | 580 \
229 | a29k \
230 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
231 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
232 | am33_2.0 \
233 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
234 | bfin \
235 | c4x | clipper \
236 | d10v | d30v | dlx | dsp16xx \
237 | fr30 | frv \
238 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
239 | i370 | i860 | i960 | ia64 \
240 | ip2k | iq2000 \
241 | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
242 | mips | mipsbe | mipseb | mipsel | mipsle \
243 | mips16 \
244 | mips64 | mips64el \
245 | mips64vr | mips64vrel \
246 | mips64orion | mips64orionel \
247 | mips64vr4100 | mips64vr4100el \
248 | mips64vr4300 | mips64vr4300el \
249 | mips64vr5000 | mips64vr5000el \
250 | mips64vr5900 | mips64vr5900el \
251 | mipsisa32 | mipsisa32el \
252 | mipsisa32r2 | mipsisa32r2el \
253 | mipsisa64 | mipsisa64el \
254 | mipsisa64r2 | mipsisa64r2el \
255 | mipsisa64sb1 | mipsisa64sb1el \
256 | mipsisa64sr71k | mipsisa64sr71kel \
257 | mipstx39 | mipstx39el \
258 | mn10200 | mn10300 \
259 | ms1 \
260 | msp430 \
261 | ns16k | ns32k \
262 | or32 \
263 | pdp10 | pdp11 | pj | pjl \
264 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
265 | pyramid \
266 | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
267 | sh64 | sh64le \
268 | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
269 | sparcv8 | sparcv9 | sparcv9b \
270 | strongarm \
271 | tahoe | thumb | tic4x | tic80 | tron \
272 | v850 | v850e \
273 | we32k \
274 | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
275 | z8k)
276 basic_machine=$basic_machine-unknown
277 ;;
278 m32c)
279 basic_machine=$basic_machine-unknown
280 ;;
281 m6811 | m68hc11 | m6812 | m68hc12)
282 # Motorola 68HC11/12.
283 basic_machine=$basic_machine-unknown
284 os=-none
285 ;;
286 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
287 ;;
288
289 # We use `pc' rather than `unknown'
290 # because (1) that's what they normally are, and
291 # (2) the word "unknown" tends to confuse beginning users.
292 i*86 | x86_64)
293 basic_machine=$basic_machine-pc
294 ;;
295 # Object if more than one company name word.
296 *-*-*)
297 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
298 exit 1
299 ;;
300 # Recognize the basic CPU types with company name.
301 580-* \
302 | a29k-* \
303 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
304 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
305 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
306 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
307 | avr-* \
308 | bfin-* | bs2000-* \
309 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
310 | clipper-* | craynv-* | cydra-* \
311 | d10v-* | d30v-* | dlx-* \
312 | elxsi-* \
313 | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
314 | h8300-* | h8500-* \
315 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
316 | i*86-* | i860-* | i960-* | ia64-* \
317 | ip2k-* | iq2000-* \
318 | m32r-* | m32rle-* \
319 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
320 | m88110-* | m88k-* | maxq-* | mcore-* \
321 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
322 | mips16-* \
323 | mips64-* | mips64el-* \
324 | mips64vr-* | mips64vrel-* \
325 | mips64orion-* | mips64orionel-* \
326 | mips64vr4100-* | mips64vr4100el-* \
327 | mips64vr4300-* | mips64vr4300el-* \
328 | mips64vr5000-* | mips64vr5000el-* \
329 | mips64vr5900-* | mips64vr5900el-* \
330 | mipsisa32-* | mipsisa32el-* \
331 | mipsisa32r2-* | mipsisa32r2el-* \
332 | mipsisa64-* | mipsisa64el-* \
333 | mipsisa64r2-* | mipsisa64r2el-* \
334 | mipsisa64sb1-* | mipsisa64sb1el-* \
335 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
336 | mipstx39-* | mipstx39el-* \
337 | mmix-* \
338 | ms1-* \
339 | msp430-* \
340 | none-* | np1-* | ns16k-* | ns32k-* \
341 | orion-* \
342 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
343 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
344 | pyramid-* \
345 | romp-* | rs6000-* \
346 | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
347 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
348 | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
349 | sparclite-* \
350 | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
351 | tahoe-* | thumb-* \
352 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
353 | tron-* \
354 | v850-* | v850e-* | vax-* \
355 | we32k-* \
356 | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
357 | xstormy16-* | xtensa-* \
358 | ymp-* \
359 | z8k-*)
360 ;;
361 m32c-*)
362 ;;
363 # Recognize the various machine names and aliases which stand
364 # for a CPU type and a company and sometimes even an OS.
365 386bsd)
366 basic_machine=i386-unknown
367 os=-bsd
368 ;;
369 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
370 basic_machine=m68000-att
371 ;;
372 3b*)
373 basic_machine=we32k-att
374 ;;
375 a29khif)
376 basic_machine=a29k-amd
377 os=-udi
378 ;;
379 abacus)
380 basic_machine=abacus-unknown
381 ;;
382 adobe68k)
383 basic_machine=m68010-adobe
384 os=-scout
385 ;;
386 alliant | fx80)
387 basic_machine=fx80-alliant
388 ;;
389 altos | altos3068)
390 basic_machine=m68k-altos
391 ;;
392 am29k)
393 basic_machine=a29k-none
394 os=-bsd
395 ;;
396 amd64)
397 basic_machine=x86_64-pc
398 ;;
399 amd64-*)
400 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
401 ;;
402 amdahl)
403 basic_machine=580-amdahl
404 os=-sysv
405 ;;
406 amiga | amiga-*)
407 basic_machine=m68k-unknown
408 ;;
409 amigaos | amigados)
410 basic_machine=m68k-unknown
411 os=-amigaos
412 ;;
413 amigaunix | amix)
414 basic_machine=m68k-unknown
415 os=-sysv4
416 ;;
417 apollo68)
418 basic_machine=m68k-apollo
419 os=-sysv
420 ;;
421 apollo68bsd)
422 basic_machine=m68k-apollo
423 os=-bsd
424 ;;
425 aux)
426 basic_machine=m68k-apple
427 os=-aux
428 ;;
429 balance)
430 basic_machine=ns32k-sequent
431 os=-dynix
432 ;;
433 c90)
434 basic_machine=c90-cray
435 os=-unicos
436 ;;
437 convex-c1)
438 basic_machine=c1-convex
439 os=-bsd
440 ;;
441 convex-c2)
442 basic_machine=c2-convex
443 os=-bsd
444 ;;
445 convex-c32)
446 basic_machine=c32-convex
447 os=-bsd
448 ;;
449 convex-c34)
450 basic_machine=c34-convex
451 os=-bsd
452 ;;
453 convex-c38)
454 basic_machine=c38-convex
455 os=-bsd
456 ;;
457 cray | j90)
458 basic_machine=j90-cray
459 os=-unicos
460 ;;
461 craynv)
462 basic_machine=craynv-cray
463 os=-unicosmp
464 ;;
465 cr16c)
466 basic_machine=cr16c-unknown
467 os=-elf
468 ;;
469 crds | unos)
470 basic_machine=m68k-crds
471 ;;
472 crisv32 | crisv32-* | etraxfs*)
473 basic_machine=crisv32-axis
474 ;;
475 cris | cris-* | etrax*)
476 basic_machine=cris-axis
477 ;;
478 crx)
479 basic_machine=crx-unknown
480 os=-elf
481 ;;
482 da30 | da30-*)
483 basic_machine=m68k-da30
484 ;;
485 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
486 basic_machine=mips-dec
487 ;;
488 decsystem10* | dec10*)
489 basic_machine=pdp10-dec
490 os=-tops10
491 ;;
492 decsystem20* | dec20*)
493 basic_machine=pdp10-dec
494 os=-tops20
495 ;;
496 delta | 3300 | motorola-3300 | motorola-delta \
497 | 3300-motorola | delta-motorola)
498 basic_machine=m68k-motorola
499 ;;
500 delta88)
501 basic_machine=m88k-motorola
502 os=-sysv3
503 ;;
504 djgpp)
505 basic_machine=i586-pc
506 os=-msdosdjgpp
507 ;;
508 dpx20 | dpx20-*)
509 basic_machine=rs6000-bull
510 os=-bosx
511 ;;
512 dpx2* | dpx2*-bull)
513 basic_machine=m68k-bull
514 os=-sysv3
515 ;;
516 ebmon29k)
517 basic_machine=a29k-amd
518 os=-ebmon
519 ;;
520 elxsi)
521 basic_machine=elxsi-elxsi
522 os=-bsd
523 ;;
524 encore | umax | mmax)
525 basic_machine=ns32k-encore
526 ;;
527 es1800 | OSE68k | ose68k | ose | OSE)
528 basic_machine=m68k-ericsson
529 os=-ose
530 ;;
531 fx2800)
532 basic_machine=i860-alliant
533 ;;
534 genix)
535 basic_machine=ns32k-ns
536 ;;
537 gmicro)
538 basic_machine=tron-gmicro
539 os=-sysv
540 ;;
541 go32)
542 basic_machine=i386-pc
543 os=-go32
544 ;;
545 h3050r* | hiux*)
546 basic_machine=hppa1.1-hitachi
547 os=-hiuxwe2
548 ;;
549 h8300hms)
550 basic_machine=h8300-hitachi
551 os=-hms
552 ;;
553 h8300xray)
554 basic_machine=h8300-hitachi
555 os=-xray
556 ;;
557 h8500hms)
558 basic_machine=h8500-hitachi
559 os=-hms
560 ;;
561 harris)
562 basic_machine=m88k-harris
563 os=-sysv3
564 ;;
565 hp300-*)
566 basic_machine=m68k-hp
567 ;;
568 hp300bsd)
569 basic_machine=m68k-hp
570 os=-bsd
571 ;;
572 hp300hpux)
573 basic_machine=m68k-hp
574 os=-hpux
575 ;;
576 hp3k9[0-9][0-9] | hp9[0-9][0-9])
577 basic_machine=hppa1.0-hp
578 ;;
579 hp9k2[0-9][0-9] | hp9k31[0-9])
580 basic_machine=m68000-hp
581 ;;
582 hp9k3[2-9][0-9])
583 basic_machine=m68k-hp
584 ;;
585 hp9k6[0-9][0-9] | hp6[0-9][0-9])
586 basic_machine=hppa1.0-hp
587 ;;
588 hp9k7[0-79][0-9] | hp7[0-79][0-9])
589 basic_machine=hppa1.1-hp
590 ;;
591 hp9k78[0-9] | hp78[0-9])
592 # FIXME: really hppa2.0-hp
593 basic_machine=hppa1.1-hp
594 ;;
595 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
596 # FIXME: really hppa2.0-hp
597 basic_machine=hppa1.1-hp
598 ;;
599 hp9k8[0-9][13679] | hp8[0-9][13679])
600 basic_machine=hppa1.1-hp
601 ;;
602 hp9k8[0-9][0-9] | hp8[0-9][0-9])
603 basic_machine=hppa1.0-hp
604 ;;
605 hppa-next)
606 os=-nextstep3
607 ;;
608 hppaosf)
609 basic_machine=hppa1.1-hp
610 os=-osf
611 ;;
612 hppro)
613 basic_machine=hppa1.1-hp
614 os=-proelf
615 ;;
616 i370-ibm* | ibm*)
617 basic_machine=i370-ibm
618 ;;
619 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
620 i*86v32)
621 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
622 os=-sysv32
623 ;;
624 i*86v4*)
625 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
626 os=-sysv4
627 ;;
628 i*86v)
629 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
630 os=-sysv
631 ;;
632 i*86sol2)
633 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
634 os=-solaris2
635 ;;
636 i386mach)
637 basic_machine=i386-mach
638 os=-mach
639 ;;
640 i386-vsta | vsta)
641 basic_machine=i386-unknown
642 os=-vsta
643 ;;
644 iris | iris4d)
645 basic_machine=mips-sgi
646 case $os in
647 -irix*)
648 ;;
649 *)
650 os=-irix4
651 ;;
652 esac
653 ;;
654 isi68 | isi)
655 basic_machine=m68k-isi
656 os=-sysv
657 ;;
658 m88k-omron*)
659 basic_machine=m88k-omron
660 ;;
661 magnum | m3230)
662 basic_machine=mips-mips
663 os=-sysv
664 ;;
665 merlin)
666 basic_machine=ns32k-utek
667 os=-sysv
668 ;;
669 mingw32)
670 basic_machine=i386-pc
671 os=-mingw32
672 ;;
673 miniframe)
674 basic_machine=m68000-convergent
675 ;;
676 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
677 basic_machine=m68k-atari
678 os=-mint
679 ;;
680 mips3*-*)
681 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
682 ;;
683 mips3*)
684 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
685 ;;
686 monitor)
687 basic_machine=m68k-rom68k
688 os=-coff
689 ;;
690 morphos)
691 basic_machine=powerpc-unknown
692 os=-morphos
693 ;;
694 msdos)
695 basic_machine=i386-pc
696 os=-msdos
697 ;;
698 mvs)
699 basic_machine=i370-ibm
700 os=-mvs
701 ;;
702 ncr3000)
703 basic_machine=i486-ncr
704 os=-sysv4
705 ;;
706 netbsd386)
707 basic_machine=i386-unknown
708 os=-netbsd
709 ;;
710 netwinder)
711 basic_machine=armv4l-rebel
712 os=-linux
713 ;;
714 news | news700 | news800 | news900)
715 basic_machine=m68k-sony
716 os=-newsos
717 ;;
718 news1000)
719 basic_machine=m68030-sony
720 os=-newsos
721 ;;
722 news-3600 | risc-news)
723 basic_machine=mips-sony
724 os=-newsos
725 ;;
726 necv70)
727 basic_machine=v70-nec
728 os=-sysv
729 ;;
730 next | m*-next )
731 basic_machine=m68k-next
732 case $os in
733 -nextstep* )
734 ;;
735 -ns2*)
736 os=-nextstep2
737 ;;
738 *)
739 os=-nextstep3
740 ;;
741 esac
742 ;;
743 nh3000)
744 basic_machine=m68k-harris
745 os=-cxux
746 ;;
747 nh[45]000)
748 basic_machine=m88k-harris
749 os=-cxux
750 ;;
751 nindy960)
752 basic_machine=i960-intel
753 os=-nindy
754 ;;
755 mon960)
756 basic_machine=i960-intel
757 os=-mon960
758 ;;
759 nonstopux)
760 basic_machine=mips-compaq
761 os=-nonstopux
762 ;;
763 np1)
764 basic_machine=np1-gould
765 ;;
766 nsr-tandem)
767 basic_machine=nsr-tandem
768 ;;
769 op50n-* | op60c-*)
770 basic_machine=hppa1.1-oki
771 os=-proelf
772 ;;
773 openrisc | openrisc-*)
774 basic_machine=or32-unknown
775 ;;
776 os400)
777 basic_machine=powerpc-ibm
778 os=-os400
779 ;;
780 OSE68000 | ose68000)
781 basic_machine=m68000-ericsson
782 os=-ose
783 ;;
784 os68k)
785 basic_machine=m68k-none
786 os=-os68k
787 ;;
788 pa-hitachi)
789 basic_machine=hppa1.1-hitachi
790 os=-hiuxwe2
791 ;;
792 paragon)
793 basic_machine=i860-intel
794 os=-osf
795 ;;
796 pbd)
797 basic_machine=sparc-tti
798 ;;
799 pbb)
800 basic_machine=m68k-tti
801 ;;
802 pc532 | pc532-*)
803 basic_machine=ns32k-pc532
804 ;;
805 pentium | p5 | k5 | k6 | nexgen | viac3)
806 basic_machine=i586-pc
807 ;;
808 pentiumpro | p6 | 6x86 | athlon | athlon_*)
809 basic_machine=i686-pc
810 ;;
811 pentiumii | pentium2 | pentiumiii | pentium3)
812 basic_machine=i686-pc
813 ;;
814 pentium4)
815 basic_machine=i786-pc
816 ;;
817 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
818 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
819 ;;
820 pentiumpro-* | p6-* | 6x86-* | athlon-*)
821 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
822 ;;
823 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
824 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
825 ;;
826 pentium4-*)
827 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
828 ;;
829 pn)
830 basic_machine=pn-gould
831 ;;
832 power) basic_machine=power-ibm
833 ;;
834 ppc) basic_machine=powerpc-unknown
835 ;;
836 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
837 ;;
838 ppcle | powerpclittle | ppc-le | powerpc-little)
839 basic_machine=powerpcle-unknown
840 ;;
841 ppcle-* | powerpclittle-*)
842 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
843 ;;
844 ppc64) basic_machine=powerpc64-unknown
845 ;;
846 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
847 ;;
848 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
849 basic_machine=powerpc64le-unknown
850 ;;
851 ppc64le-* | powerpc64little-*)
852 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
853 ;;
854 ps2)
855 basic_machine=i386-ibm
856 ;;
857 pw32)
858 basic_machine=i586-unknown
859 os=-pw32
860 ;;
861 rom68k)
862 basic_machine=m68k-rom68k
863 os=-coff
864 ;;
865 rm[46]00)
866 basic_machine=mips-siemens
867 ;;
868 rtpc | rtpc-*)
869 basic_machine=romp-ibm
870 ;;
871 s390 | s390-*)
872 basic_machine=s390-ibm
873 ;;
874 s390x | s390x-*)
875 basic_machine=s390x-ibm
876 ;;
877 sa29200)
878 basic_machine=a29k-amd
879 os=-udi
880 ;;
881 sb1)
882 basic_machine=mipsisa64sb1-unknown
883 ;;
884 sb1el)
885 basic_machine=mipsisa64sb1el-unknown
886 ;;
887 sei)
888 basic_machine=mips-sei
889 os=-seiux
890 ;;
891 sequent)
892 basic_machine=i386-sequent
893 ;;
894 sh)
895 basic_machine=sh-hitachi
896 os=-hms
897 ;;
898 sh64)
899 basic_machine=sh64-unknown
900 ;;
901 sparclite-wrs | simso-wrs)
902 basic_machine=sparclite-wrs
903 os=-vxworks
904 ;;
905 sps7)
906 basic_machine=m68k-bull
907 os=-sysv2
908 ;;
909 spur)
910 basic_machine=spur-unknown
911 ;;
912 st2000)
913 basic_machine=m68k-tandem
914 ;;
915 stratus)
916 basic_machine=i860-stratus
917 os=-sysv4
918 ;;
919 sun2)
920 basic_machine=m68000-sun
921 ;;
922 sun2os3)
923 basic_machine=m68000-sun
924 os=-sunos3
925 ;;
926 sun2os4)
927 basic_machine=m68000-sun
928 os=-sunos4
929 ;;
930 sun3os3)
931 basic_machine=m68k-sun
932 os=-sunos3
933 ;;
934 sun3os4)
935 basic_machine=m68k-sun
936 os=-sunos4
937 ;;
938 sun4os3)
939 basic_machine=sparc-sun
940 os=-sunos3
941 ;;
942 sun4os4)
943 basic_machine=sparc-sun
944 os=-sunos4
945 ;;
946 sun4sol2)
947 basic_machine=sparc-sun
948 os=-solaris2
949 ;;
950 sun3 | sun3-*)
951 basic_machine=m68k-sun
952 ;;
953 sun4)
954 basic_machine=sparc-sun
955 ;;
956 sun386 | sun386i | roadrunner)
957 basic_machine=i386-sun
958 ;;
959 sv1)
960 basic_machine=sv1-cray
961 os=-unicos
962 ;;
963 symmetry)
964 basic_machine=i386-sequent
965 os=-dynix
966 ;;
967 t3e)
968 basic_machine=alphaev5-cray
969 os=-unicos
970 ;;
971 t90)
972 basic_machine=t90-cray
973 os=-unicos
974 ;;
975 tic54x | c54x*)
976 basic_machine=tic54x-unknown
977 os=-coff
978 ;;
979 tic55x | c55x*)
980 basic_machine=tic55x-unknown
981 os=-coff
982 ;;
983 tic6x | c6x*)
984 basic_machine=tic6x-unknown
985 os=-coff
986 ;;
987 tx39)
988 basic_machine=mipstx39-unknown
989 ;;
990 tx39el)
991 basic_machine=mipstx39el-unknown
992 ;;
993 toad1)
994 basic_machine=pdp10-xkl
995 os=-tops20
996 ;;
997 tower | tower-32)
998 basic_machine=m68k-ncr
999 ;;
1000 tpf)
1001 basic_machine=s390x-ibm
1002 os=-tpf
1003 ;;
1004 udi29k)
1005 basic_machine=a29k-amd
1006 os=-udi
1007 ;;
1008 ultra3)
1009 basic_machine=a29k-nyu
1010 os=-sym1
1011 ;;
1012 v810 | necv810)
1013 basic_machine=v810-nec
1014 os=-none
1015 ;;
1016 vaxv)
1017 basic_machine=vax-dec
1018 os=-sysv
1019 ;;
1020 vms)
1021 basic_machine=vax-dec
1022 os=-vms
1023 ;;
1024 vpp*|vx|vx-*)
1025 basic_machine=f301-fujitsu
1026 ;;
1027 vxworks960)
1028 basic_machine=i960-wrs
1029 os=-vxworks
1030 ;;
1031 vxworks68)
1032 basic_machine=m68k-wrs
1033 os=-vxworks
1034 ;;
1035 vxworks29k)
1036 basic_machine=a29k-wrs
1037 os=-vxworks
1038 ;;
1039 w65*)
1040 basic_machine=w65-wdc
1041 os=-none
1042 ;;
1043 w89k-*)
1044 basic_machine=hppa1.1-winbond
1045 os=-proelf
1046 ;;
1047 xbox)
1048 basic_machine=i686-pc
1049 os=-mingw32
1050 ;;
1051 xps | xps100)
1052 basic_machine=xps100-honeywell
1053 ;;
1054 ymp)
1055 basic_machine=ymp-cray
1056 os=-unicos
1057 ;;
1058 z8k-*-coff)
1059 basic_machine=z8k-unknown
1060 os=-sim
1061 ;;
1062 none)
1063 basic_machine=none-none
1064 os=-none
1065 ;;
1066
1067 # Here we handle the default manufacturer of certain CPU types. It is in
1068 # some cases the only manufacturer, in others, it is the most popular.
1069 w89k)
1070 basic_machine=hppa1.1-winbond
1071 ;;
1072 op50n)
1073 basic_machine=hppa1.1-oki
1074 ;;
1075 op60c)
1076 basic_machine=hppa1.1-oki
1077 ;;
1078 romp)
1079 basic_machine=romp-ibm
1080 ;;
1081 mmix)
1082 basic_machine=mmix-knuth
1083 ;;
1084 rs6000)
1085 basic_machine=rs6000-ibm
1086 ;;
1087 vax)
1088 basic_machine=vax-dec
1089 ;;
1090 pdp10)
1091 # there are many clones, so DEC is not a safe bet
1092 basic_machine=pdp10-unknown
1093 ;;
1094 pdp11)
1095 basic_machine=pdp11-dec
1096 ;;
1097 we32k)
1098 basic_machine=we32k-att
1099 ;;
1100 sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1101 basic_machine=sh-unknown
1102 ;;
1103 sparc | sparcv8 | sparcv9 | sparcv9b)
1104 basic_machine=sparc-sun
1105 ;;
1106 cydra)
1107 basic_machine=cydra-cydrome
1108 ;;
1109 orion)
1110 basic_machine=orion-highlevel
1111 ;;
1112 orion105)
1113 basic_machine=clipper-highlevel
1114 ;;
1115 mac | mpw | mac-mpw)
1116 basic_machine=m68k-apple
1117 ;;
1118 pmac | pmac-mpw)
1119 basic_machine=powerpc-apple
1120 ;;
1121 *-unknown)
1122 # Make sure to match an already-canonicalized machine name.
1123 ;;
1124 *)
1125 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1126 exit 1
1127 ;;
1128 esac
1129
1130 # Here we canonicalize certain aliases for manufacturers.
1131 case $basic_machine in
1132 *-digital*)
1133 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1134 ;;
1135 *-commodore*)
1136 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1137 ;;
1138 *)
1139 ;;
1140 esac
1141
1142 # Decode manufacturer-specific aliases for certain operating systems.
1143
1144 if [ x"$os" != x"" ]
1145 then
1146 case $os in
1147 # First match some system type aliases
1148 # that might get confused with valid system types.
1149 # -solaris* is a basic system type, with this one exception.
1150 -solaris1 | -solaris1.*)
1151 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1152 ;;
1153 -solaris)
1154 os=-solaris2
1155 ;;
1156 -svr4*)
1157 os=-sysv4
1158 ;;
1159 -unixware*)
1160 os=-sysv4.2uw
1161 ;;
1162 -gnu/linux*)
1163 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1164 ;;
1165 # First accept the basic system types.
1166 # The portable systems comes first.
1167 # Each alternative MUST END IN A *, to match a version number.
1168 # -sysv* is not here because it comes later, after sysvr4.
1169 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1170 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1171 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1172 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1173 | -aos* \
1174 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1175 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1176 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
1177 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1178 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1179 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1180 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1181 | -chorusos* | -chorusrdb* \
1182 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1183 | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
1184 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1185 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1186 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1187 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1188 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1189 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1190 | -skyos* | -haiku*)
1191 # Remember, each alternative MUST END IN *, to match a version number.
1192 ;;
1193 -qnx*)
1194 case $basic_machine in
1195 x86-* | i*86-*)
1196 ;;
1197 *)
1198 os=-nto$os
1199 ;;
1200 esac
1201 ;;
1202 -nto-qnx*)
1203 ;;
1204 -nto*)
1205 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1206 ;;
1207 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1208 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1209 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1210 ;;
1211 -mac*)
1212 os=`echo $os | sed -e 's|mac|macos|'`
1213 ;;
1214 -linux-dietlibc)
1215 os=-linux-dietlibc
1216 ;;
1217 -linux*)
1218 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1219 ;;
1220 -sunos5*)
1221 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1222 ;;
1223 -sunos6*)
1224 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1225 ;;
1226 -opened*)
1227 os=-openedition
1228 ;;
1229 -os400*)
1230 os=-os400
1231 ;;
1232 -wince*)
1233 os=-wince
1234 ;;
1235 -osfrose*)
1236 os=-osfrose
1237 ;;
1238 -osf*)
1239 os=-osf
1240 ;;
1241 -utek*)
1242 os=-bsd
1243 ;;
1244 -dynix*)
1245 os=-bsd
1246 ;;
1247 -acis*)
1248 os=-aos
1249 ;;
1250 -atheos*)
1251 os=-atheos
1252 ;;
1253 -syllable*)
1254 os=-syllable
1255 ;;
1256 -386bsd)
1257 os=-bsd
1258 ;;
1259 -ctix* | -uts*)
1260 os=-sysv
1261 ;;
1262 -nova*)
1263 os=-rtmk-nova
1264 ;;
1265 -ns2 )
1266 os=-nextstep2
1267 ;;
1268 -nsk*)
1269 os=-nsk
1270 ;;
1271 # Preserve the version number of sinix5.
1272 -sinix5.*)
1273 os=`echo $os | sed -e 's|sinix|sysv|'`
1274 ;;
1275 -sinix*)
1276 os=-sysv4
1277 ;;
1278 -tpf*)
1279 os=-tpf
1280 ;;
1281 -triton*)
1282 os=-sysv3
1283 ;;
1284 -oss*)
1285 os=-sysv3
1286 ;;
1287 -svr4)
1288 os=-sysv4
1289 ;;
1290 -svr3)
1291 os=-sysv3
1292 ;;
1293 -sysvr4)
1294 os=-sysv4
1295 ;;
1296 # This must come after -sysvr4.
1297 -sysv*)
1298 ;;
1299 -ose*)
1300 os=-ose
1301 ;;
1302 -es1800*)
1303 os=-ose
1304 ;;
1305 -xenix)
1306 os=-xenix
1307 ;;
1308 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1309 os=-mint
1310 ;;
1311 -aros*)
1312 os=-aros
1313 ;;
1314 -kaos*)
1315 os=-kaos
1316 ;;
1317 -zvmoe)
1318 os=-zvmoe
1319 ;;
1320 -none)
1321 ;;
1322 *)
1323 # Get rid of the `-' at the beginning of $os.
1324 os=`echo $os | sed 's/[^-]*-//'`
1325 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1326 exit 1
1327 ;;
1328 esac
1329 else
1330
1331 # Here we handle the default operating systems that come with various machines.
1332 # The value should be what the vendor currently ships out the door with their
1333 # machine or put another way, the most popular os provided with the machine.
1334
1335 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1336 # "-sun"), then you have to tell the case statement up towards the top
1337 # that MANUFACTURER isn't an operating system. Otherwise, code above
1338 # will signal an error saying that MANUFACTURER isn't an operating
1339 # system, and we'll never get to this point.
1340
1341 case $basic_machine in
1342 *-acorn)
1343 os=-riscix1.2
1344 ;;
1345 arm*-rebel)
1346 os=-linux
1347 ;;
1348 arm*-semi)
1349 os=-aout
1350 ;;
1351 c4x-* | tic4x-*)
1352 os=-coff
1353 ;;
1354 # This must come before the *-dec entry.
1355 pdp10-*)
1356 os=-tops20
1357 ;;
1358 pdp11-*)
1359 os=-none
1360 ;;
1361 *-dec | vax-*)
1362 os=-ultrix4.2
1363 ;;
1364 m68*-apollo)
1365 os=-domain
1366 ;;
1367 i386-sun)
1368 os=-sunos4.0.2
1369 ;;
1370 m68000-sun)
1371 os=-sunos3
1372 # This also exists in the configure program, but was not the
1373 # default.
1374 # os=-sunos4
1375 ;;
1376 m68*-cisco)
1377 os=-aout
1378 ;;
1379 mips*-cisco)
1380 os=-elf
1381 ;;
1382 mips*-*)
1383 os=-elf
1384 ;;
1385 or32-*)
1386 os=-coff
1387 ;;
1388 *-tti) # must be before sparc entry or we get the wrong os.
1389 os=-sysv3
1390 ;;
1391 sparc-* | *-sun)
1392 os=-sunos4.1.1
1393 ;;
1394 *-be)
1395 os=-beos
1396 ;;
1397 *-haiku)
1398 os=-haiku
1399 ;;
1400 *-ibm)
1401 os=-aix
1402 ;;
1403 *-knuth)
1404 os=-mmixware
1405 ;;
1406 *-wec)
1407 os=-proelf
1408 ;;
1409 *-winbond)
1410 os=-proelf
1411 ;;
1412 *-oki)
1413 os=-proelf
1414 ;;
1415 *-hp)
1416 os=-hpux
1417 ;;
1418 *-hitachi)
1419 os=-hiux
1420 ;;
1421 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1422 os=-sysv
1423 ;;
1424 *-cbm)
1425 os=-amigaos
1426 ;;
1427 *-dg)
1428 os=-dgux
1429 ;;
1430 *-dolphin)
1431 os=-sysv3
1432 ;;
1433 m68k-ccur)
1434 os=-rtu
1435 ;;
1436 m88k-omron*)
1437 os=-luna
1438 ;;
1439 *-next )
1440 os=-nextstep
1441 ;;
1442 *-sequent)
1443 os=-ptx
1444 ;;
1445 *-crds)
1446 os=-unos
1447 ;;
1448 *-ns)
1449 os=-genix
1450 ;;
1451 i370-*)
1452 os=-mvs
1453 ;;
1454 *-next)
1455 os=-nextstep3
1456 ;;
1457 *-gould)
1458 os=-sysv
1459 ;;
1460 *-highlevel)
1461 os=-bsd
1462 ;;
1463 *-encore)
1464 os=-bsd
1465 ;;
1466 *-sgi)
1467 os=-irix
1468 ;;
1469 *-siemens)
1470 os=-sysv4
1471 ;;
1472 *-masscomp)
1473 os=-rtu
1474 ;;
1475 f30[01]-fujitsu | f700-fujitsu)
1476 os=-uxpv
1477 ;;
1478 *-rom68k)
1479 os=-coff
1480 ;;
1481 *-*bug)
1482 os=-coff
1483 ;;
1484 *-apple)
1485 os=-macos
1486 ;;
1487 *-atari*)
1488 os=-mint
1489 ;;
1490 *)
1491 os=-none
1492 ;;
1493 esac
1494 fi
1495
1496 # Here we handle the case where we know the os, and the CPU type, but not the
1497 # manufacturer. We pick the logical manufacturer.
1498 vendor=unknown
1499 case $basic_machine in
1500 *-unknown)
1501 case $os in
1502 -riscix*)
1503 vendor=acorn
1504 ;;
1505 -sunos*)
1506 vendor=sun
1507 ;;
1508 -aix*)
1509 vendor=ibm
1510 ;;
1511 -beos*)
1512 vendor=be
1513 ;;
1514 -hpux*)
1515 vendor=hp
1516 ;;
1517 -mpeix*)
1518 vendor=hp
1519 ;;
1520 -hiux*)
1521 vendor=hitachi
1522 ;;
1523 -unos*)
1524 vendor=crds
1525 ;;
1526 -dgux*)
1527 vendor=dg
1528 ;;
1529 -luna*)
1530 vendor=omron
1531 ;;
1532 -genix*)
1533 vendor=ns
1534 ;;
1535 -mvs* | -opened*)
1536 vendor=ibm
1537 ;;
1538 -os400*)
1539 vendor=ibm
1540 ;;
1541 -ptx*)
1542 vendor=sequent
1543 ;;
1544 -tpf*)
1545 vendor=ibm
1546 ;;
1547 -vxsim* | -vxworks* | -windiss*)
1548 vendor=wrs
1549 ;;
1550 -aux*)
1551 vendor=apple
1552 ;;
1553 -hms*)
1554 vendor=hitachi
1555 ;;
1556 -mpw* | -macos*)
1557 vendor=apple
1558 ;;
1559 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1560 vendor=atari
1561 ;;
1562 -vos*)
1563 vendor=stratus
1564 ;;
1565 esac
1566 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1567 ;;
1568 esac
1569
1570 echo $basic_machine$os
1571 exit
1572
1573 # Local variables:
1574 # eval: (add-hook 'write-file-hooks 'time-stamp)
1575 # time-stamp-start: "timestamp='"
1576 # time-stamp-format: "%:y-%02m-%02d"
1577 # time-stamp-end: "'"
1578 # End:
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.59.
3 #
4 # Copyright (C) 2003 Free Software Foundation, Inc.
5 # This configure script is free software; the Free Software Foundation
6 # gives unlimited permission to copy, distribute and modify it.
7 ## --------------------- ##
8 ## M4sh Initialization. ##
9 ## --------------------- ##
10
11 # Be Bourne compatible
12 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
13 emulate sh
14 NULLCMD=:
15 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
16 # is contrary to our usage. Disable this feature.
17 alias -g '${1+"$@"}'='"$@"'
18 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19 set -o posix
20 fi
21 DUALCASE=1; export DUALCASE # for MKS sh
22
23 # Support unset when possible.
24 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25 as_unset=unset
26 else
27 as_unset=false
28 fi
29
30
31 # Work around bugs in pre-3.0 UWIN ksh.
32 $as_unset ENV MAIL MAILPATH
33 PS1='$ '
34 PS2='> '
35 PS4='+ '
36
37 # NLS nuisances.
38 for as_var in \
39 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
40 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
41 LC_TELEPHONE LC_TIME
42 do
43 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
44 eval $as_var=C; export $as_var
45 else
46 $as_unset $as_var
47 fi
48 done
49
50 # Required to use basename.
51 if expr a : '\(a\)' >/dev/null 2>&1; then
52 as_expr=expr
53 else
54 as_expr=false
55 fi
56
57 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
58 as_basename=basename
59 else
60 as_basename=false
61 fi
62
63
64 # Name of the executable.
65 as_me=`$as_basename "$0" ||
66 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70 echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76
77 # PATH needs CR, and LINENO needs CR and PATH.
78 # Avoid depending upon Character Ranges.
79 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
80 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
81 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
82 as_cr_digits='0123456789'
83 as_cr_alnum=$as_cr_Letters$as_cr_digits
84
85 # The user is always right.
86 if test "${PATH_SEPARATOR+set}" != set; then
87 echo "#! /bin/sh" >conf$$.sh
88 echo "exit 0" >>conf$$.sh
89 chmod +x conf$$.sh
90 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
91 PATH_SEPARATOR=';'
92 else
93 PATH_SEPARATOR=:
94 fi
95 rm -f conf$$.sh
96 fi
97
98
99 as_lineno_1=$LINENO
100 as_lineno_2=$LINENO
101 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
102 test "x$as_lineno_1" != "x$as_lineno_2" &&
103 test "x$as_lineno_3" = "x$as_lineno_2" || {
104 # Find who we are. Look in the path if we contain no path at all
105 # relative or not.
106 case $0 in
107 *[\\/]* ) as_myself=$0 ;;
108 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
109 for as_dir in $PATH
110 do
111 IFS=$as_save_IFS
112 test -z "$as_dir" && as_dir=.
113 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
114 done
115
116 ;;
117 esac
118 # We did not find ourselves, most probably we were run as `sh COMMAND'
119 # in which case we are not to be found in the path.
120 if test "x$as_myself" = x; then
121 as_myself=$0
122 fi
123 if test ! -f "$as_myself"; then
124 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
125 { (exit 1); exit 1; }; }
126 fi
127 case $CONFIG_SHELL in
128 '')
129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
130 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
131 do
132 IFS=$as_save_IFS
133 test -z "$as_dir" && as_dir=.
134 for as_base in sh bash ksh sh5; do
135 case $as_dir in
136 /*)
137 if ("$as_dir/$as_base" -c '
138 as_lineno_1=$LINENO
139 as_lineno_2=$LINENO
140 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
141 test "x$as_lineno_1" != "x$as_lineno_2" &&
142 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
143 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
144 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
145 CONFIG_SHELL=$as_dir/$as_base
146 export CONFIG_SHELL
147 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
148 fi;;
149 esac
150 done
151 done
152 ;;
153 esac
154
155 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
156 # uniformly replaced by the line number. The first 'sed' inserts a
157 # line-number line before each line; the second 'sed' does the real
158 # work. The second script uses 'N' to pair each line-number line
159 # with the numbered line, and appends trailing '-' during
160 # substitution so that $LINENO is not a special case at line end.
161 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
162 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
163 sed '=' <$as_myself |
164 sed '
165 N
166 s,$,-,
167 : loop
168 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
169 t loop
170 s,-$,,
171 s,^['$as_cr_digits']*\n,,
172 ' >$as_me.lineno &&
173 chmod +x $as_me.lineno ||
174 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
175 { (exit 1); exit 1; }; }
176
177 # Don't try to exec as it changes $[0], causing all sort of problems
178 # (the dirname of $[0] is not the place where we might find the
179 # original and so on. Autoconf is especially sensible to this).
180 . ./$as_me.lineno
181 # Exit status is that of the last command.
182 exit
183 }
184
185
186 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
187 *c*,-n*) ECHO_N= ECHO_C='
188 ' ECHO_T=' ' ;;
189 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
190 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
191 esac
192
193 if expr a : '\(a\)' >/dev/null 2>&1; then
194 as_expr=expr
195 else
196 as_expr=false
197 fi
198
199 rm -f conf$$ conf$$.exe conf$$.file
200 echo >conf$$.file
201 if ln -s conf$$.file conf$$ 2>/dev/null; then
202 # We could just check for DJGPP; but this test a) works b) is more generic
203 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
204 if test -f conf$$.exe; then
205 # Don't use ln at all; we don't have any links
206 as_ln_s='cp -p'
207 else
208 as_ln_s='ln -s'
209 fi
210 elif ln conf$$.file conf$$ 2>/dev/null; then
211 as_ln_s=ln
212 else
213 as_ln_s='cp -p'
214 fi
215 rm -f conf$$ conf$$.exe conf$$.file
216
217 if mkdir -p . 2>/dev/null; then
218 as_mkdir_p=:
219 else
220 test -d ./-p && rmdir ./-p
221 as_mkdir_p=false
222 fi
223
224 as_executable_p="test -f"
225
226 # Sed expression to map a string onto a valid CPP name.
227 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
228
229 # Sed expression to map a string onto a valid variable name.
230 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
231
232
233 # IFS
234 # We need space, tab and new line, in precisely that order.
235 as_nl='
236 '
237 IFS=" $as_nl"
238
239 # CDPATH.
240 $as_unset CDPATH
241
242
243
244 # Check that we are running under the correct shell.
245 SHELL=${CONFIG_SHELL-/bin/sh}
246
247 case X$ECHO in
248 X*--fallback-echo)
249 # Remove one level of quotation (which was required for Make).
250 ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
251 ;;
252 esac
253
254 echo=${ECHO-echo}
255 if test "X$1" = X--no-reexec; then
256 # Discard the --no-reexec flag, and continue.
257 shift
258 elif test "X$1" = X--fallback-echo; then
259 # Avoid inline document here, it may be left over
260 :
261 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
262 # Yippee, $echo works!
263 :
264 else
265 # Restart under the correct shell.
266 exec $SHELL "$0" --no-reexec ${1+"$@"}
267 fi
268
269 if test "X$1" = X--fallback-echo; then
270 # used as fallback echo
271 shift
272 cat <<EOF
273 $*
274 EOF
275 exit 0
276 fi
277
278 # The HP-UX ksh and POSIX shell print the target directory to stdout
279 # if CDPATH is set.
280 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
281
282 if test -z "$ECHO"; then
283 if test "X${echo_test_string+set}" != Xset; then
284 # find a string as large as possible, as long as the shell can cope with it
285 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
286 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
287 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
288 echo_test_string=`eval $cmd` &&
289 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
290 then
291 break
292 fi
293 done
294 fi
295
296 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
297 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
298 test "X$echo_testing_string" = "X$echo_test_string"; then
299 :
300 else
301 # The Solaris, AIX, and Digital Unix default echo programs unquote
302 # backslashes. This makes it impossible to quote backslashes using
303 # echo "$something" | sed 's/\\/\\\\/g'
304 #
305 # So, first we look for a working echo in the user's PATH.
306
307 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
308 for dir in $PATH /usr/ucb; do
309 IFS="$lt_save_ifs"
310 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
311 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
312 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
313 test "X$echo_testing_string" = "X$echo_test_string"; then
314 echo="$dir/echo"
315 break
316 fi
317 done
318 IFS="$lt_save_ifs"
319
320 if test "X$echo" = Xecho; then
321 # We didn't find a better echo, so look for alternatives.
322 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
323 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
324 test "X$echo_testing_string" = "X$echo_test_string"; then
325 # This shell has a builtin print -r that does the trick.
326 echo='print -r'
327 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
328 test "X$CONFIG_SHELL" != X/bin/ksh; then
329 # If we have ksh, try running configure again with it.
330 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
331 export ORIGINAL_CONFIG_SHELL
332 CONFIG_SHELL=/bin/ksh
333 export CONFIG_SHELL
334 exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
335 else
336 # Try using printf.
337 echo='printf %s\n'
338 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
339 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
340 test "X$echo_testing_string" = "X$echo_test_string"; then
341 # Cool, printf works
342 :
343 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
344 test "X$echo_testing_string" = 'X\t' &&
345 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
346 test "X$echo_testing_string" = "X$echo_test_string"; then
347 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
348 export CONFIG_SHELL
349 SHELL="$CONFIG_SHELL"
350 export SHELL
351 echo="$CONFIG_SHELL $0 --fallback-echo"
352 elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
353 test "X$echo_testing_string" = 'X\t' &&
354 echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
355 test "X$echo_testing_string" = "X$echo_test_string"; then
356 echo="$CONFIG_SHELL $0 --fallback-echo"
357 else
358 # maybe with a smaller string...
359 prev=:
360
361 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
362 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
363 then
364 break
365 fi
366 prev="$cmd"
367 done
368
369 if test "$prev" != 'sed 50q "$0"'; then
370 echo_test_string=`eval $prev`
371 export echo_test_string
372 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
373 else
374 # Oops. We lost completely, so just stick with echo.
375 echo=echo
376 fi
377 fi
378 fi
379 fi
380 fi
381 fi
382
383 # Copy echo and quote the copy suitably for passing to libtool from
384 # the Makefile, instead of quoting the original, which is used later.
385 ECHO=$echo
386 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
387 ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
388 fi
389
390
391
392
393 tagnames=${tagnames+${tagnames},}CXX
394
395 tagnames=${tagnames+${tagnames},}F77
396
397 # Name of the host.
398 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
399 # so uname gets run too.
400 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
401
402 exec 6>&1
403
404 #
405 # Initializations.
406 #
407 ac_default_prefix=/usr/local
408 ac_config_libobj_dir=.
409 cross_compiling=no
410 subdirs=
411 MFLAGS=
412 MAKEFLAGS=
413 SHELL=${CONFIG_SHELL-/bin/sh}
414
415 # Maximum number of lines to put in a shell here document.
416 # This variable seems obsolete. It should probably be removed, and
417 # only ac_max_sed_lines should be used.
418 : ${ac_max_here_lines=38}
419
420 # Identity of this package.
421 PACKAGE_NAME=
422 PACKAGE_TARNAME=
423 PACKAGE_VERSION=
424 PACKAGE_STRING=
425 PACKAGE_BUGREPORT=
426
427 ac_unique_file="src/hdate.h"
428 # Factoring default headers for most tests.
429 ac_includes_default="\
430 #include <stdio.h>
431 #if HAVE_SYS_TYPES_H
432 # include <sys/types.h>
433 #endif
434 #if HAVE_SYS_STAT_H
435 # include <sys/stat.h>
436 #endif
437 #if STDC_HEADERS
438 # include <stdlib.h>
439 # include <stddef.h>
440 #else
441 # if HAVE_STDLIB_H
442 # include <stdlib.h>
443 # endif
444 #endif
445 #if HAVE_STRING_H
446 # if !STDC_HEADERS && HAVE_MEMORY_H
447 # include <memory.h>
448 # endif
449 # include <string.h>
450 #endif
451 #if HAVE_STRINGS_H
452 # include <strings.h>
453 #endif
454 #if HAVE_INTTYPES_H
455 # include <inttypes.h>
456 #else
457 # if HAVE_STDINT_H
458 # include <stdint.h>
459 # endif
460 #endif
461 #if HAVE_UNISTD_H
462 # include <unistd.h>
463 #endif"
464
465 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION_INFO INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO SET_MAKE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PKG_CONFIG have_swig have_pascal PA_VERSION PA_MODULES_PATH WITH_PASCAL_TRUE WITH_PASCAL_FALSE have_python PY_VERSION PY_CFLAGS PY_MODULES_PATH WITH_PYTHON_TRUE WITH_PYTHON_FALSE have_perl PE_CFLAGS PE_MODULES_PATH WITH_PERL_TRUE WITH_PERL_FALSE MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE GLIBC2 ALLOCA GLIBC21 INTL_MACOSX_LIBS HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB WITH_EXAMPLES_TRUE WITH_EXAMPLES_FALSE WITH_HCAL_TRUE WITH_HCAL_FALSE LIBOBJS LTLIBOBJS'
466 ac_subst_files=''
467
468 # Initialize some variables set by options.
469 ac_init_help=
470 ac_init_version=false
471 # The variables have the same names as the options, with
472 # dashes changed to underlines.
473 cache_file=/dev/null
474 exec_prefix=NONE
475 no_create=
476 no_recursion=
477 prefix=NONE
478 program_prefix=NONE
479 program_suffix=NONE
480 program_transform_name=s,x,x,
481 silent=
482 site=
483 srcdir=
484 verbose=
485 x_includes=NONE
486 x_libraries=NONE
487
488 # Installation directory options.
489 # These are left unexpanded so users can "make install exec_prefix=/foo"
490 # and all the variables that are supposed to be based on exec_prefix
491 # by default will actually change.
492 # Use braces instead of parens because sh, perl, etc. also accept them.
493 bindir='${exec_prefix}/bin'
494 sbindir='${exec_prefix}/sbin'
495 libexecdir='${exec_prefix}/libexec'
496 datadir='${prefix}/share'
497 sysconfdir='${prefix}/etc'
498 sharedstatedir='${prefix}/com'
499 localstatedir='${prefix}/var'
500 libdir='${exec_prefix}/lib'
501 includedir='${prefix}/include'
502 oldincludedir='/usr/include'
503 infodir='${prefix}/info'
504 mandir='${prefix}/man'
505
506 ac_prev=
507 for ac_option
508 do
509 # If the previous option needs an argument, assign it.
510 if test -n "$ac_prev"; then
511 eval "$ac_prev=\$ac_option"
512 ac_prev=
513 continue
514 fi
515
516 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
517
518 # Accept the important Cygnus configure options, so we can diagnose typos.
519
520 case $ac_option in
521
522 -bindir | --bindir | --bindi | --bind | --bin | --bi)
523 ac_prev=bindir ;;
524 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
525 bindir=$ac_optarg ;;
526
527 -build | --build | --buil | --bui | --bu)
528 ac_prev=build_alias ;;
529 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
530 build_alias=$ac_optarg ;;
531
532 -cache-file | --cache-file | --cache-fil | --cache-fi \
533 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
534 ac_prev=cache_file ;;
535 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
536 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
537 cache_file=$ac_optarg ;;
538
539 --config-cache | -C)
540 cache_file=config.cache ;;
541
542 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
543 ac_prev=datadir ;;
544 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
545 | --da=*)
546 datadir=$ac_optarg ;;
547
548 -disable-* | --disable-*)
549 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
550 # Reject names that are not valid shell variable names.
551 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
552 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
553 { (exit 1); exit 1; }; }
554 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
555 eval "enable_$ac_feature=no" ;;
556
557 -enable-* | --enable-*)
558 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
559 # Reject names that are not valid shell variable names.
560 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
561 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
562 { (exit 1); exit 1; }; }
563 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
564 case $ac_option in
565 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
566 *) ac_optarg=yes ;;
567 esac
568 eval "enable_$ac_feature='$ac_optarg'" ;;
569
570 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
571 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
572 | --exec | --exe | --ex)
573 ac_prev=exec_prefix ;;
574 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
575 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
576 | --exec=* | --exe=* | --ex=*)
577 exec_prefix=$ac_optarg ;;
578
579 -gas | --gas | --ga | --g)
580 # Obsolete; use --with-gas.
581 with_gas=yes ;;
582
583 -help | --help | --hel | --he | -h)
584 ac_init_help=long ;;
585 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
586 ac_init_help=recursive ;;
587 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
588 ac_init_help=short ;;
589
590 -host | --host | --hos | --ho)
591 ac_prev=host_alias ;;
592 -host=* | --host=* | --hos=* | --ho=*)
593 host_alias=$ac_optarg ;;
594
595 -includedir | --includedir | --includedi | --included | --include \
596 | --includ | --inclu | --incl | --inc)
597 ac_prev=includedir ;;
598 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
599 | --includ=* | --inclu=* | --incl=* | --inc=*)
600 includedir=$ac_optarg ;;
601
602 -infodir | --infodir | --infodi | --infod | --info | --inf)
603 ac_prev=infodir ;;
604 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
605 infodir=$ac_optarg ;;
606
607 -libdir | --libdir | --libdi | --libd)
608 ac_prev=libdir ;;
609 -libdir=* | --libdir=* | --libdi=* | --libd=*)
610 libdir=$ac_optarg ;;
611
612 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
613 | --libexe | --libex | --libe)
614 ac_prev=libexecdir ;;
615 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
616 | --libexe=* | --libex=* | --libe=*)
617 libexecdir=$ac_optarg ;;
618
619 -localstatedir | --localstatedir | --localstatedi | --localstated \
620 | --localstate | --localstat | --localsta | --localst \
621 | --locals | --local | --loca | --loc | --lo)
622 ac_prev=localstatedir ;;
623 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
624 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
625 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
626 localstatedir=$ac_optarg ;;
627
628 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
629 ac_prev=mandir ;;
630 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
631 mandir=$ac_optarg ;;
632
633 -nfp | --nfp | --nf)
634 # Obsolete; use --without-fp.
635 with_fp=no ;;
636
637 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
638 | --no-cr | --no-c | -n)
639 no_create=yes ;;
640
641 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
642 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
643 no_recursion=yes ;;
644
645 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
646 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
647 | --oldin | --oldi | --old | --ol | --o)
648 ac_prev=oldincludedir ;;
649 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
650 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
651 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
652 oldincludedir=$ac_optarg ;;
653
654 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
655 ac_prev=prefix ;;
656 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
657 prefix=$ac_optarg ;;
658
659 -program-prefix | --program-prefix | --program-prefi | --program-pref \
660 | --program-pre | --program-pr | --program-p)
661 ac_prev=program_prefix ;;
662 -program-prefix=* | --program-prefix=* | --program-prefi=* \
663 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
664 program_prefix=$ac_optarg ;;
665
666 -program-suffix | --program-suffix | --program-suffi | --program-suff \
667 | --program-suf | --program-su | --program-s)
668 ac_prev=program_suffix ;;
669 -program-suffix=* | --program-suffix=* | --program-suffi=* \
670 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
671 program_suffix=$ac_optarg ;;
672
673 -program-transform-name | --program-transform-name \
674 | --program-transform-nam | --program-transform-na \
675 | --program-transform-n | --program-transform- \
676 | --program-transform | --program-transfor \
677 | --program-transfo | --program-transf \
678 | --program-trans | --program-tran \
679 | --progr-tra | --program-tr | --program-t)
680 ac_prev=program_transform_name ;;
681 -program-transform-name=* | --program-transform-name=* \
682 | --program-transform-nam=* | --program-transform-na=* \
683 | --program-transform-n=* | --program-transform-=* \
684 | --program-transform=* | --program-transfor=* \
685 | --program-transfo=* | --program-transf=* \
686 | --program-trans=* | --program-tran=* \
687 | --progr-tra=* | --program-tr=* | --program-t=*)
688 program_transform_name=$ac_optarg ;;
689
690 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
691 | -silent | --silent | --silen | --sile | --sil)
692 silent=yes ;;
693
694 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
695 ac_prev=sbindir ;;
696 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
697 | --sbi=* | --sb=*)
698 sbindir=$ac_optarg ;;
699
700 -sharedstatedir | --sharedstatedir | --sharedstatedi \
701 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
702 | --sharedst | --shareds | --shared | --share | --shar \
703 | --sha | --sh)
704 ac_prev=sharedstatedir ;;
705 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
706 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
707 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
708 | --sha=* | --sh=*)
709 sharedstatedir=$ac_optarg ;;
710
711 -site | --site | --sit)
712 ac_prev=site ;;
713 -site=* | --site=* | --sit=*)
714 site=$ac_optarg ;;
715
716 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
717 ac_prev=srcdir ;;
718 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
719 srcdir=$ac_optarg ;;
720
721 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
722 | --syscon | --sysco | --sysc | --sys | --sy)
723 ac_prev=sysconfdir ;;
724 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
725 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
726 sysconfdir=$ac_optarg ;;
727
728 -target | --target | --targe | --targ | --tar | --ta | --t)
729 ac_prev=target_alias ;;
730 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
731 target_alias=$ac_optarg ;;
732
733 -v | -verbose | --verbose | --verbos | --verbo | --verb)
734 verbose=yes ;;
735
736 -version | --version | --versio | --versi | --vers | -V)
737 ac_init_version=: ;;
738
739 -with-* | --with-*)
740 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
741 # Reject names that are not valid shell variable names.
742 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
743 { echo "$as_me: error: invalid package name: $ac_package" >&2
744 { (exit 1); exit 1; }; }
745 ac_package=`echo $ac_package| sed 's/-/_/g'`
746 case $ac_option in
747 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
748 *) ac_optarg=yes ;;
749 esac
750 eval "with_$ac_package='$ac_optarg'" ;;
751
752 -without-* | --without-*)
753 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
754 # Reject names that are not valid shell variable names.
755 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
756 { echo "$as_me: error: invalid package name: $ac_package" >&2
757 { (exit 1); exit 1; }; }
758 ac_package=`echo $ac_package | sed 's/-/_/g'`
759 eval "with_$ac_package=no" ;;
760
761 --x)
762 # Obsolete; use --with-x.
763 with_x=yes ;;
764
765 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
766 | --x-incl | --x-inc | --x-in | --x-i)
767 ac_prev=x_includes ;;
768 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
769 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
770 x_includes=$ac_optarg ;;
771
772 -x-libraries | --x-libraries | --x-librarie | --x-librari \
773 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
774 ac_prev=x_libraries ;;
775 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
776 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
777 x_libraries=$ac_optarg ;;
778
779 -*) { echo "$as_me: error: unrecognized option: $ac_option
780 Try \`$0 --help' for more information." >&2
781 { (exit 1); exit 1; }; }
782 ;;
783
784 *=*)
785 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
786 # Reject names that are not valid shell variable names.
787 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
788 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
789 { (exit 1); exit 1; }; }
790 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
791 eval "$ac_envvar='$ac_optarg'"
792 export $ac_envvar ;;
793
794 *)
795 # FIXME: should be removed in autoconf 3.0.
796 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
797 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
798 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
799 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
800 ;;
801
802 esac
803 done
804
805 if test -n "$ac_prev"; then
806 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
807 { echo "$as_me: error: missing argument to $ac_option" >&2
808 { (exit 1); exit 1; }; }
809 fi
810
811 # Be sure to have absolute paths.
812 for ac_var in exec_prefix prefix
813 do
814 eval ac_val=$`echo $ac_var`
815 case $ac_val in
816 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
817 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
818 { (exit 1); exit 1; }; };;
819 esac
820 done
821
822 # Be sure to have absolute paths.
823 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
824 localstatedir libdir includedir oldincludedir infodir mandir
825 do
826 eval ac_val=$`echo $ac_var`
827 case $ac_val in
828 [\\/$]* | ?:[\\/]* ) ;;
829 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
830 { (exit 1); exit 1; }; };;
831 esac
832 done
833
834 # There might be people who depend on the old broken behavior: `$host'
835 # used to hold the argument of --host etc.
836 # FIXME: To remove some day.
837 build=$build_alias
838 host=$host_alias
839 target=$target_alias
840
841 # FIXME: To remove some day.
842 if test "x$host_alias" != x; then
843 if test "x$build_alias" = x; then
844 cross_compiling=maybe
845 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
846 If a cross compiler is detected then cross compile mode will be used." >&2
847 elif test "x$build_alias" != "x$host_alias"; then
848 cross_compiling=yes
849 fi
850 fi
851
852 ac_tool_prefix=
853 test -n "$host_alias" && ac_tool_prefix=$host_alias-
854
855 test "$silent" = yes && exec 6>/dev/null
856
857
858 # Find the source files, if location was not specified.
859 if test -z "$srcdir"; then
860 ac_srcdir_defaulted=yes
861 # Try the directory containing this script, then its parent.
862 ac_confdir=`(dirname "$0") 2>/dev/null ||
863 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
864 X"$0" : 'X\(//\)[^/]' \| \
865 X"$0" : 'X\(//\)$' \| \
866 X"$0" : 'X\(/\)' \| \
867 . : '\(.\)' 2>/dev/null ||
868 echo X"$0" |
869 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
870 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
871 /^X\(\/\/\)$/{ s//\1/; q; }
872 /^X\(\/\).*/{ s//\1/; q; }
873 s/.*/./; q'`
874 srcdir=$ac_confdir
875 if test ! -r $srcdir/$ac_unique_file; then
876 srcdir=..
877 fi
878 else
879 ac_srcdir_defaulted=no
880 fi
881 if test ! -r $srcdir/$ac_unique_file; then
882 if test "$ac_srcdir_defaulted" = yes; then
883 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
884 { (exit 1); exit 1; }; }
885 else
886 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
887 { (exit 1); exit 1; }; }
888 fi
889 fi
890 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
891 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
892 { (exit 1); exit 1; }; }
893 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
894 ac_env_build_alias_set=${build_alias+set}
895 ac_env_build_alias_value=$build_alias
896 ac_cv_env_build_alias_set=${build_alias+set}
897 ac_cv_env_build_alias_value=$build_alias
898 ac_env_host_alias_set=${host_alias+set}
899 ac_env_host_alias_value=$host_alias
900 ac_cv_env_host_alias_set=${host_alias+set}
901 ac_cv_env_host_alias_value=$host_alias
902 ac_env_target_alias_set=${target_alias+set}
903 ac_env_target_alias_value=$target_alias
904 ac_cv_env_target_alias_set=${target_alias+set}
905 ac_cv_env_target_alias_value=$target_alias
906 ac_env_CC_set=${CC+set}
907 ac_env_CC_value=$CC
908 ac_cv_env_CC_set=${CC+set}
909 ac_cv_env_CC_value=$CC
910 ac_env_CFLAGS_set=${CFLAGS+set}
911 ac_env_CFLAGS_value=$CFLAGS
912 ac_cv_env_CFLAGS_set=${CFLAGS+set}
913 ac_cv_env_CFLAGS_value=$CFLAGS
914 ac_env_LDFLAGS_set=${LDFLAGS+set}
915 ac_env_LDFLAGS_value=$LDFLAGS
916 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
917 ac_cv_env_LDFLAGS_value=$LDFLAGS
918 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
919 ac_env_CPPFLAGS_value=$CPPFLAGS
920 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
921 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
922 ac_env_CPP_set=${CPP+set}
923 ac_env_CPP_value=$CPP
924 ac_cv_env_CPP_set=${CPP+set}
925 ac_cv_env_CPP_value=$CPP
926 ac_env_CXX_set=${CXX+set}
927 ac_env_CXX_value=$CXX
928 ac_cv_env_CXX_set=${CXX+set}
929 ac_cv_env_CXX_value=$CXX
930 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
931 ac_env_CXXFLAGS_value=$CXXFLAGS
932 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
933 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
934 ac_env_CXXCPP_set=${CXXCPP+set}
935 ac_env_CXXCPP_value=$CXXCPP
936 ac_cv_env_CXXCPP_set=${CXXCPP+set}
937 ac_cv_env_CXXCPP_value=$CXXCPP
938 ac_env_F77_set=${F77+set}
939 ac_env_F77_value=$F77
940 ac_cv_env_F77_set=${F77+set}
941 ac_cv_env_F77_value=$F77
942 ac_env_FFLAGS_set=${FFLAGS+set}
943 ac_env_FFLAGS_value=$FFLAGS
944 ac_cv_env_FFLAGS_set=${FFLAGS+set}
945 ac_cv_env_FFLAGS_value=$FFLAGS
946
947 #
948 # Report the --help message.
949 #
950 if test "$ac_init_help" = "long"; then
951 # Omit some internal or obsolete options to make the list less imposing.
952 # This message is too long to be a string in the A/UX 3.1 sh.
953 cat <<_ACEOF
954 \`configure' configures this package to adapt to many kinds of systems.
955
956 Usage: $0 [OPTION]... [VAR=VALUE]...
957
958 To assign environment variables (e.g., CC, CFLAGS...), specify them as
959 VAR=VALUE. See below for descriptions of some of the useful variables.
960
961 Defaults for the options are specified in brackets.
962
963 Configuration:
964 -h, --help display this help and exit
965 --help=short display options specific to this package
966 --help=recursive display the short help of all the included packages
967 -V, --version display version information and exit
968 -q, --quiet, --silent do not print \`checking...' messages
969 --cache-file=FILE cache test results in FILE [disabled]
970 -C, --config-cache alias for \`--cache-file=config.cache'
971 -n, --no-create do not create output files
972 --srcdir=DIR find the sources in DIR [configure dir or \`..']
973
974 _ACEOF
975
976 cat <<_ACEOF
977 Installation directories:
978 --prefix=PREFIX install architecture-independent files in PREFIX
979 [$ac_default_prefix]
980 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
981 [PREFIX]
982
983 By default, \`make install' will install all the files in
984 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
985 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
986 for instance \`--prefix=\$HOME'.
987
988 For better control, use the options below.
989
990 Fine tuning of the installation directories:
991 --bindir=DIR user executables [EPREFIX/bin]
992 --sbindir=DIR system admin executables [EPREFIX/sbin]
993 --libexecdir=DIR program executables [EPREFIX/libexec]
994 --datadir=DIR read-only architecture-independent data [PREFIX/share]
995 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
996 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
997 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
998 --libdir=DIR object code libraries [EPREFIX/lib]
999 --includedir=DIR C header files [PREFIX/include]
1000 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1001 --infodir=DIR info documentation [PREFIX/info]
1002 --mandir=DIR man documentation [PREFIX/man]
1003 _ACEOF
1004
1005 cat <<\_ACEOF
1006
1007 Program names:
1008 --program-prefix=PREFIX prepend PREFIX to installed program names
1009 --program-suffix=SUFFIX append SUFFIX to installed program names
1010 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1011
1012 System types:
1013 --build=BUILD configure for building on BUILD [guessed]
1014 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1015 _ACEOF
1016 fi
1017
1018 if test -n "$ac_init_help"; then
1019
1020 cat <<\_ACEOF
1021
1022 Optional Features:
1023 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1024 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1025 --enable-maintainer-mode enable make rules and dependencies not useful
1026 (and sometimes confusing) to the casual installer
1027 --enable-shared[=PKGS]
1028 build shared libraries [default=yes]
1029 --enable-static[=PKGS]
1030 build static libraries [default=yes]
1031 --enable-fast-install[=PKGS]
1032 optimize for fast installation [default=yes]
1033 --disable-libtool-lock avoid locking (might break parallel builds)
1034 --enable-pascal build pascal binding default=no
1035 --enable-python build python binding default=no
1036 --enable-perl build perl binding default=no
1037 --disable-nls do not use Native Language Support
1038 --disable-rpath do not hardcode runtime library paths
1039 --enable-examples build examples default=no
1040 --disable-hcal build hcal/hdate default=yes
1041
1042 Optional Packages:
1043 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1044 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1045 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1046 --with-pic try to use only PIC/non-PIC objects [default=use
1047 both]
1048 --with-tags[=TAGS]
1049 include additional configurations [automatic]
1050 --with-python-sitelib-dir=PATH path to python site lib
1051 --with-perl-sitelib-dir=PATH path to perl site lib
1052 --with-gnu-ld assume the C compiler uses GNU ld default=no
1053 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1054 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1055 --with-included-gettext use the GNU gettext library included here
1056 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
1057 --without-libintl-prefix don't search for libintl in includedir and libdir
1058
1059 Some influential environment variables:
1060 CC C compiler command
1061 CFLAGS C compiler flags
1062 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1063 nonstandard directory <lib dir>
1064 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
1065 headers in a nonstandard directory <include dir>
1066 CPP C preprocessor
1067 CXX C++ compiler command
1068 CXXFLAGS C++ compiler flags
1069 CXXCPP C++ preprocessor
1070 F77 Fortran 77 compiler command
1071 FFLAGS Fortran 77 compiler flags
1072
1073 Use these variables to override the choices made by `configure' or to help
1074 it to find libraries and programs with nonstandard names/locations.
1075
1076 _ACEOF
1077 fi
1078
1079 if test "$ac_init_help" = "recursive"; then
1080 # If there are subdirs, report their specific --help.
1081 ac_popdir=`pwd`
1082 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1083 test -d $ac_dir || continue
1084 ac_builddir=.
1085
1086 if test "$ac_dir" != .; then
1087 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1088 # A "../" for each directory in $ac_dir_suffix.
1089 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1090 else
1091 ac_dir_suffix= ac_top_builddir=
1092 fi
1093
1094 case $srcdir in
1095 .) # No --srcdir option. We are building in place.
1096 ac_srcdir=.
1097 if test -z "$ac_top_builddir"; then
1098 ac_top_srcdir=.
1099 else
1100 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
1101 fi ;;
1102 [\\/]* | ?:[\\/]* ) # Absolute path.
1103 ac_srcdir=$srcdir$ac_dir_suffix;
1104 ac_top_srcdir=$srcdir ;;
1105 *) # Relative path.
1106 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1107 ac_top_srcdir=$ac_top_builddir$srcdir ;;
1108 esac
1109
1110 # Do not use `cd foo && pwd` to compute absolute paths, because
1111 # the directories may not exist.
1112 case `pwd` in
1113 .) ac_abs_builddir="$ac_dir";;
1114 *)
1115 case "$ac_dir" in
1116 .) ac_abs_builddir=`pwd`;;
1117 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1118 *) ac_abs_builddir=`pwd`/"$ac_dir";;
1119 esac;;
1120 esac
1121 case $ac_abs_builddir in
1122 .) ac_abs_top_builddir=${ac_top_builddir}.;;
1123 *)
1124 case ${ac_top_builddir}. in
1125 .) ac_abs_top_builddir=$ac_abs_builddir;;
1126 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1127 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1128 esac;;
1129 esac
1130 case $ac_abs_builddir in
1131 .) ac_abs_srcdir=$ac_srcdir;;
1132 *)
1133 case $ac_srcdir in
1134 .) ac_abs_srcdir=$ac_abs_builddir;;
1135 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1136 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1137 esac;;
1138 esac
1139 case $ac_abs_builddir in
1140 .) ac_abs_top_srcdir=$ac_top_srcdir;;
1141 *)
1142 case $ac_top_srcdir in
1143 .) ac_abs_top_srcdir=$ac_abs_builddir;;
1144 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1145 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1146 esac;;
1147 esac
1148
1149 cd $ac_dir
1150 # Check for guested configure; otherwise get Cygnus style configure.
1151 if test -f $ac_srcdir/configure.gnu; then
1152 echo
1153 $SHELL $ac_srcdir/configure.gnu --help=recursive
1154 elif test -f $ac_srcdir/configure; then
1155 echo
1156 $SHELL $ac_srcdir/configure --help=recursive
1157 elif test -f $ac_srcdir/configure.ac ||
1158 test -f $ac_srcdir/configure.in; then
1159 echo
1160 $ac_configure --help
1161 else
1162 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1163 fi
1164 cd "$ac_popdir"
1165 done
1166 fi
1167
1168 test -n "$ac_init_help" && exit 0
1169 if $ac_init_version; then
1170 cat <<\_ACEOF
1171
1172 Copyright (C) 2003 Free Software Foundation, Inc.
1173 This configure script is free software; the Free Software Foundation
1174 gives unlimited permission to copy, distribute and modify it.
1175 _ACEOF
1176 exit 0
1177 fi
1178 exec 5>config.log
1179 cat >&5 <<_ACEOF
1180 This file contains any messages produced by compilers while
1181 running configure, to aid debugging if configure makes a mistake.
1182
1183 It was created by $as_me, which was
1184 generated by GNU Autoconf 2.59. Invocation command line was
1185
1186 $ $0 $@
1187
1188 _ACEOF
1189 {
1190 cat <<_ASUNAME
1191 ## --------- ##
1192 ## Platform. ##
1193 ## --------- ##
1194
1195 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1196 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1197 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1198 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1199 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1200
1201 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1202 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1203
1204 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1205 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1206 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1207 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1208 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1209 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1210 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1211
1212 _ASUNAME
1213
1214 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1215 for as_dir in $PATH
1216 do
1217 IFS=$as_save_IFS
1218 test -z "$as_dir" && as_dir=.
1219 echo "PATH: $as_dir"
1220 done
1221
1222 } >&5
1223
1224 cat >&5 <<_ACEOF
1225
1226
1227 ## ----------- ##
1228 ## Core tests. ##
1229 ## ----------- ##
1230
1231 _ACEOF
1232
1233
1234 # Keep a trace of the command line.
1235 # Strip out --no-create and --no-recursion so they do not pile up.
1236 # Strip out --silent because we don't want to record it for future runs.
1237 # Also quote any args containing shell meta-characters.
1238 # Make two passes to allow for proper duplicate-argument suppression.
1239 ac_configure_args=
1240 ac_configure_args0=
1241 ac_configure_args1=
1242 ac_sep=
1243 ac_must_keep_next=false
1244 for ac_pass in 1 2
1245 do
1246 for ac_arg
1247 do
1248 case $ac_arg in
1249 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1250 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1251 | -silent | --silent | --silen | --sile | --sil)
1252 continue ;;
1253 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1254 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1255 esac
1256 case $ac_pass in
1257 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1258 2)
1259 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1260 if test $ac_must_keep_next = true; then
1261 ac_must_keep_next=false # Got value, back to normal.
1262 else
1263 case $ac_arg in
1264 *=* | --config-cache | -C | -disable-* | --disable-* \
1265 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1266 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1267 | -with-* | --with-* | -without-* | --without-* | --x)
1268 case "$ac_configure_args0 " in
1269 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1270 esac
1271 ;;
1272 -* ) ac_must_keep_next=true ;;
1273 esac
1274 fi
1275 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1276 # Get rid of the leading space.
1277 ac_sep=" "
1278 ;;
1279 esac
1280 done
1281 done
1282 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1283 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1284
1285 # When interrupted or exit'd, cleanup temporary files, and complete
1286 # config.log. We remove comments because anyway the quotes in there
1287 # would cause problems or look ugly.
1288 # WARNING: Be sure not to use single quotes in there, as some shells,
1289 # such as our DU 5.0 friend, will then `close' the trap.
1290 trap 'exit_status=$?
1291 # Save into config.log some information that might help in debugging.
1292 {
1293 echo
1294
1295 cat <<\_ASBOX
1296 ## ---------------- ##
1297 ## Cache variables. ##
1298 ## ---------------- ##
1299 _ASBOX
1300 echo
1301 # The following way of writing the cache mishandles newlines in values,
1302 {
1303 (set) 2>&1 |
1304 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1305 *ac_space=\ *)
1306 sed -n \
1307 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1308 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1309 ;;
1310 *)
1311 sed -n \
1312 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1313 ;;
1314 esac;
1315 }
1316 echo
1317
1318 cat <<\_ASBOX
1319 ## ----------------- ##
1320 ## Output variables. ##
1321 ## ----------------- ##
1322 _ASBOX
1323 echo
1324 for ac_var in $ac_subst_vars
1325 do
1326 eval ac_val=$`echo $ac_var`
1327 echo "$ac_var='"'"'$ac_val'"'"'"
1328 done | sort
1329 echo
1330
1331 if test -n "$ac_subst_files"; then
1332 cat <<\_ASBOX
1333 ## ------------- ##
1334 ## Output files. ##
1335 ## ------------- ##
1336 _ASBOX
1337 echo
1338 for ac_var in $ac_subst_files
1339 do
1340 eval ac_val=$`echo $ac_var`
1341 echo "$ac_var='"'"'$ac_val'"'"'"
1342 done | sort
1343 echo
1344 fi
1345
1346 if test -s confdefs.h; then
1347 cat <<\_ASBOX
1348 ## ----------- ##
1349 ## confdefs.h. ##
1350 ## ----------- ##
1351 _ASBOX
1352 echo
1353 sed "/^$/d" confdefs.h | sort
1354 echo
1355 fi
1356 test "$ac_signal" != 0 &&
1357 echo "$as_me: caught signal $ac_signal"
1358 echo "$as_me: exit $exit_status"
1359 } >&5
1360 rm -f core *.core &&
1361 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1362 exit $exit_status
1363 ' 0
1364 for ac_signal in 1 2 13 15; do
1365 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1366 done
1367 ac_signal=0
1368
1369 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1370 rm -rf conftest* confdefs.h
1371 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1372 echo >confdefs.h
1373
1374 # Predefined preprocessor variables.
1375
1376 cat >>confdefs.h <<_ACEOF
1377 #define PACKAGE_NAME "$PACKAGE_NAME"
1378 _ACEOF
1379
1380
1381 cat >>confdefs.h <<_ACEOF
1382 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1383 _ACEOF
1384
1385
1386 cat >>confdefs.h <<_ACEOF
1387 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1388 _ACEOF
1389
1390
1391 cat >>confdefs.h <<_ACEOF
1392 #define PACKAGE_STRING "$PACKAGE_STRING"
1393 _ACEOF
1394
1395
1396 cat >>confdefs.h <<_ACEOF
1397 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1398 _ACEOF
1399
1400
1401 # Let the site file select an alternate cache file if it wants to.
1402 # Prefer explicitly selected file to automatically selected ones.
1403 if test -z "$CONFIG_SITE"; then
1404 if test "x$prefix" != xNONE; then
1405 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1406 else
1407 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1408 fi
1409 fi
1410 for ac_site_file in $CONFIG_SITE; do
1411 if test -r "$ac_site_file"; then
1412 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1413 echo "$as_me: loading site script $ac_site_file" >&6;}
1414 sed 's/^/| /' "$ac_site_file" >&5
1415 . "$ac_site_file"
1416 fi
1417 done
1418
1419 if test -r "$cache_file"; then
1420 # Some versions of bash will fail to source /dev/null (special
1421 # files actually), so we avoid doing that.
1422 if test -f "$cache_file"; then
1423 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1424 echo "$as_me: loading cache $cache_file" >&6;}
1425 case $cache_file in
1426 [\\/]* | ?:[\\/]* ) . $cache_file;;
1427 *) . ./$cache_file;;
1428 esac
1429 fi
1430 else
1431 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1432 echo "$as_me: creating cache $cache_file" >&6;}
1433 >$cache_file
1434 fi
1435
1436 # Check that the precious variables saved in the cache have kept the same
1437 # value.
1438 ac_cache_corrupted=false
1439 for ac_var in `(set) 2>&1 |
1440 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1441 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1442 eval ac_new_set=\$ac_env_${ac_var}_set
1443 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1444 eval ac_new_val="\$ac_env_${ac_var}_value"
1445 case $ac_old_set,$ac_new_set in
1446 set,)
1447 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1448 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1449 ac_cache_corrupted=: ;;
1450 ,set)
1451 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1452 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1453 ac_cache_corrupted=: ;;
1454 ,);;
1455 *)
1456 if test "x$ac_old_val" != "x$ac_new_val"; then
1457 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1458 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1459 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1460 echo "$as_me: former value: $ac_old_val" >&2;}
1461 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1462 echo "$as_me: current value: $ac_new_val" >&2;}
1463 ac_cache_corrupted=:
1464 fi;;
1465 esac
1466 # Pass precious variables to config.status.
1467 if test "$ac_new_set" = set; then
1468 case $ac_new_val in
1469 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1470 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1471 *) ac_arg=$ac_var=$ac_new_val ;;
1472 esac
1473 case " $ac_configure_args " in
1474 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1475 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1476 esac
1477 fi
1478 done
1479 if $ac_cache_corrupted; then
1480 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1481 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1482 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1483 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1484 { (exit 1); exit 1; }; }
1485 fi
1486
1487 ac_ext=c
1488 ac_cpp='$CPP $CPPFLAGS'
1489 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1490 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1491 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512 PACKAGE=libhdate
1513 LIBHDATE_MAJOR_VERSION=1
1514 LIBHDATE_MINOR_VERSION=4
1515 LIBHDATE_MICRO_VERSION=8
1516
1517 VERSION=$LIBHDATE_MAJOR_VERSION.$LIBHDATE_MINOR_VERSION.$LIBHDATE_MICRO_VERSION
1518 VERSION_INFO=$LIBHDATE_MAJOR_VERSION:$LIBHDATE_MINOR_VERSION:0
1519
1520
1521
1522 am__api_version="1.4"
1523 ac_aux_dir=
1524 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1525 if test -f $ac_dir/install-sh; then
1526 ac_aux_dir=$ac_dir
1527 ac_install_sh="$ac_aux_dir/install-sh -c"
1528 break
1529 elif test -f $ac_dir/install.sh; then
1530 ac_aux_dir=$ac_dir
1531 ac_install_sh="$ac_aux_dir/install.sh -c"
1532 break
1533 elif test -f $ac_dir/shtool; then
1534 ac_aux_dir=$ac_dir
1535 ac_install_sh="$ac_aux_dir/shtool install -c"
1536 break
1537 fi
1538 done
1539 if test -z "$ac_aux_dir"; then
1540 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1541 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1542 { (exit 1); exit 1; }; }
1543 fi
1544 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1545 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1546 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1547
1548 # Find a good install program. We prefer a C program (faster),
1549 # so one script is as good as another. But avoid the broken or
1550 # incompatible versions:
1551 # SysV /etc/install, /usr/sbin/install
1552 # SunOS /usr/etc/install
1553 # IRIX /sbin/install
1554 # AIX /bin/install
1555 # AmigaOS /C/install, which installs bootblocks on floppy discs
1556 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1557 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1558 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1559 # OS/2's system install, which has a completely different semantic
1560 # ./install, which can be erroneously created by make from ./install.sh.
1561 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
1562 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
1563 if test -z "$INSTALL"; then
1564 if test "${ac_cv_path_install+set}" = set; then
1565 echo $ECHO_N "(cached) $ECHO_C" >&6
1566 else
1567 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1568 for as_dir in $PATH
1569 do
1570 IFS=$as_save_IFS
1571 test -z "$as_dir" && as_dir=.
1572 # Account for people who put trailing slashes in PATH elements.
1573 case $as_dir/ in
1574 ./ | .// | /cC/* | \
1575 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
1576 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
1577 /usr/ucb/* ) ;;
1578 *)
1579 # OSF1 and SCO ODT 3.0 have their own names for install.
1580 # Don't use installbsd from OSF since it installs stuff as root
1581 # by default.
1582 for ac_prog in ginstall scoinst install; do
1583 for ac_exec_ext in '' $ac_executable_extensions; do
1584 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
1585 if test $ac_prog = install &&
1586 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1587 # AIX install. It has an incompatible calling convention.
1588 :
1589 elif test $ac_prog = install &&
1590 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1591 # program-specific install script used by HP pwplus--don't use.
1592 :
1593 else
1594 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
1595 break 3
1596 fi
1597 fi
1598 done
1599 done
1600 ;;
1601 esac
1602 done
1603
1604
1605 fi
1606 if test "${ac_cv_path_install+set}" = set; then
1607 INSTALL=$ac_cv_path_install
1608 else
1609 # As a last resort, use the slow shell script. We don't cache a
1610 # path for INSTALL within a source directory, because that will
1611 # break other packages using the cache if that directory is
1612 # removed, or if the path is relative.
1613 INSTALL=$ac_install_sh
1614 fi
1615 fi
1616 echo "$as_me:$LINENO: result: $INSTALL" >&5
1617 echo "${ECHO_T}$INSTALL" >&6
1618
1619 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1620 # It thinks the first close brace ends the variable substitution.
1621 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1622
1623 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1624
1625 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1626
1627 echo "$as_me:$LINENO: checking whether build environment is sane" >&5
1628 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
1629 # Just in case
1630 sleep 1
1631 echo timestamp > conftestfile
1632 # Do `set' in a subshell so we don't clobber the current shell's
1633 # arguments. Must try -L first in case configure is actually a
1634 # symlink; some systems play weird games with the mod time of symlinks
1635 # (eg FreeBSD returns the mod time of the symlink's containing
1636 # directory).
1637 if (
1638 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1639 if test "$*" = "X"; then
1640 # -L didn't work.
1641 set X `ls -t $srcdir/configure conftestfile`
1642 fi
1643 if test "$*" != "X $srcdir/configure conftestfile" \
1644 && test "$*" != "X conftestfile $srcdir/configure"; then
1645
1646 # If neither matched, then we have a broken ls. This can happen
1647 # if, for instance, CONFIG_SHELL is bash and it inherits a
1648 # broken ls alias from the environment. This has actually
1649 # happened. Such a system could not be considered "sane".
1650 { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
1651 alias in your environment" >&5
1652 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
1653 alias in your environment" >&2;}
1654 { (exit 1); exit 1; }; }
1655 fi
1656
1657 test "$2" = conftestfile
1658 )
1659 then
1660 # Ok.
1661 :
1662 else
1663 { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
1664 Check your system clock" >&5
1665 echo "$as_me: error: newly created file is older than distributed files!
1666 Check your system clock" >&2;}
1667 { (exit 1); exit 1; }; }
1668 fi
1669 rm -f conftest*
1670 echo "$as_me:$LINENO: result: yes" >&5
1671 echo "${ECHO_T}yes" >&6
1672 test "$program_prefix" != NONE &&
1673 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1674 # Use a double $ so make ignores it.
1675 test "$program_suffix" != NONE &&
1676 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1677 # Double any \ or $. echo might interpret backslashes.
1678 # By default was `s,x,x', remove it if useless.
1679 cat <<\_ACEOF >conftest.sed
1680 s/[\\$]/&&/g;s/;s,x,x,$//
1681 _ACEOF
1682 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1683 rm conftest.sed
1684
1685 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
1686 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
1687 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
1688 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1689 echo $ECHO_N "(cached) $ECHO_C" >&6
1690 else
1691 cat >conftest.make <<\_ACEOF
1692 all:
1693 @echo 'ac_maketemp="$(MAKE)"'
1694 _ACEOF
1695 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1696 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1697 if test -n "$ac_maketemp"; then
1698 eval ac_cv_prog_make_${ac_make}_set=yes
1699 else
1700 eval ac_cv_prog_make_${ac_make}_set=no
1701 fi
1702 rm -f conftest.make
1703 fi
1704 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1705 echo "$as_me:$LINENO: result: yes" >&5
1706 echo "${ECHO_T}yes" >&6
1707 SET_MAKE=
1708 else
1709 echo "$as_me:$LINENO: result: no" >&5
1710 echo "${ECHO_T}no" >&6
1711 SET_MAKE="MAKE=${MAKE-make}"
1712 fi
1713
1714
1715 PACKAGE=$PACKAGE
1716
1717 VERSION=$VERSION
1718
1719 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1720 { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
1721 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
1722 { (exit 1); exit 1; }; }
1723 fi
1724
1725 cat >>confdefs.h <<_ACEOF
1726 #define PACKAGE "$PACKAGE"
1727 _ACEOF
1728
1729
1730 cat >>confdefs.h <<_ACEOF
1731 #define VERSION "$VERSION"
1732 _ACEOF
1733
1734
1735
1736 missing_dir=`cd $ac_aux_dir && pwd`
1737 echo "$as_me:$LINENO: checking for working aclocal-${am__api_version}" >&5
1738 echo $ECHO_N "checking for working aclocal-${am__api_version}... $ECHO_C" >&6
1739 # Run test in a subshell; some versions of sh will print an error if
1740 # an executable is not found, even if stderr is redirected.
1741 # Redirect stdin to placate older versions of autoconf. Sigh.
1742 if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
1743 ACLOCAL=aclocal-${am__api_version}
1744 echo "$as_me:$LINENO: result: found" >&5
1745 echo "${ECHO_T}found" >&6
1746 else
1747 ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
1748 echo "$as_me:$LINENO: result: missing" >&5
1749 echo "${ECHO_T}missing" >&6
1750 fi
1751
1752 echo "$as_me:$LINENO: checking for working autoconf" >&5
1753 echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6
1754 # Run test in a subshell; some versions of sh will print an error if
1755 # an executable is not found, even if stderr is redirected.
1756 # Redirect stdin to placate older versions of autoconf. Sigh.
1757 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1758 AUTOCONF=autoconf
1759 echo "$as_me:$LINENO: result: found" >&5
1760 echo "${ECHO_T}found" >&6
1761 else
1762 AUTOCONF="$missing_dir/missing autoconf"
1763 echo "$as_me:$LINENO: result: missing" >&5
1764 echo "${ECHO_T}missing" >&6
1765 fi
1766
1767 echo "$as_me:$LINENO: checking for working automake-${am__api_version}" >&5
1768 echo $ECHO_N "checking for working automake-${am__api_version}... $ECHO_C" >&6
1769 # Run test in a subshell; some versions of sh will print an error if
1770 # an executable is not found, even if stderr is redirected.
1771 # Redirect stdin to placate older versions of autoconf. Sigh.
1772 if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
1773 AUTOMAKE=automake-${am__api_version}
1774 echo "$as_me:$LINENO: result: found" >&5
1775 echo "${ECHO_T}found" >&6
1776 else
1777 AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
1778 echo "$as_me:$LINENO: result: missing" >&5
1779 echo "${ECHO_T}missing" >&6
1780 fi
1781
1782 echo "$as_me:$LINENO: checking for working autoheader" >&5
1783 echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6
1784 # Run test in a subshell; some versions of sh will print an error if
1785 # an executable is not found, even if stderr is redirected.
1786 # Redirect stdin to placate older versions of autoconf. Sigh.
1787 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1788 AUTOHEADER=autoheader
1789 echo "$as_me:$LINENO: result: found" >&5
1790 echo "${ECHO_T}found" >&6
1791 else
1792 AUTOHEADER="$missing_dir/missing autoheader"
1793 echo "$as_me:$LINENO: result: missing" >&5
1794 echo "${ECHO_T}missing" >&6
1795 fi
1796
1797 echo "$as_me:$LINENO: checking for working makeinfo" >&5
1798 echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6
1799 # Run test in a subshell; some versions of sh will print an error if
1800 # an executable is not found, even if stderr is redirected.
1801 # Redirect stdin to placate older versions of autoconf. Sigh.
1802 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1803 MAKEINFO=makeinfo
1804 echo "$as_me:$LINENO: result: found" >&5
1805 echo "${ECHO_T}found" >&6
1806 else
1807 MAKEINFO="$missing_dir/missing makeinfo"
1808 echo "$as_me:$LINENO: result: missing" >&5
1809 echo "${ECHO_T}missing" >&6
1810 fi
1811
1812
1813 echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
1814 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
1815 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1816 if test "${enable_maintainer_mode+set}" = set; then
1817 enableval="$enable_maintainer_mode"
1818 USE_MAINTAINER_MODE=$enableval
1819 else
1820 USE_MAINTAINER_MODE=no
1821 fi;
1822 echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
1823 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
1824
1825
1826 if test $USE_MAINTAINER_MODE = yes; then
1827 MAINTAINER_MODE_TRUE=
1828 MAINTAINER_MODE_FALSE='#'
1829 else
1830 MAINTAINER_MODE_TRUE='#'
1831 MAINTAINER_MODE_FALSE=
1832 fi
1833 MAINT=$MAINTAINER_MODE_TRUE
1834
1835
1836
1837 ac_ext=c
1838 ac_cpp='$CPP $CPPFLAGS'
1839 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1840 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1841 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1842 if test -n "$ac_tool_prefix"; then
1843 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1844 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1845 echo "$as_me:$LINENO: checking for $ac_word" >&5
1846 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1847 if test "${ac_cv_prog_CC+set}" = set; then
1848 echo $ECHO_N "(cached) $ECHO_C" >&6
1849 else
1850 if test -n "$CC"; then
1851 ac_cv_prog_CC="$CC" # Let the user override the test.
1852 else
1853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1854 for as_dir in $PATH
1855 do
1856 IFS=$as_save_IFS
1857 test -z "$as_dir" && as_dir=.
1858 for ac_exec_ext in '' $ac_executable_extensions; do
1859 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1860 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1861 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1862 break 2
1863 fi
1864 done
1865 done
1866
1867 fi
1868 fi
1869 CC=$ac_cv_prog_CC
1870 if test -n "$CC"; then
1871 echo "$as_me:$LINENO: result: $CC" >&5
1872 echo "${ECHO_T}$CC" >&6
1873 else
1874 echo "$as_me:$LINENO: result: no" >&5
1875 echo "${ECHO_T}no" >&6
1876 fi
1877
1878 fi
1879 if test -z "$ac_cv_prog_CC"; then
1880 ac_ct_CC=$CC
1881 # Extract the first word of "gcc", so it can be a program name with args.
1882 set dummy gcc; ac_word=$2
1883 echo "$as_me:$LINENO: checking for $ac_word" >&5
1884 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1885 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1886 echo $ECHO_N "(cached) $ECHO_C" >&6
1887 else
1888 if test -n "$ac_ct_CC"; then
1889 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1890 else
1891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1892 for as_dir in $PATH
1893 do
1894 IFS=$as_save_IFS
1895 test -z "$as_dir" && as_dir=.
1896 for ac_exec_ext in '' $ac_executable_extensions; do
1897 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1898 ac_cv_prog_ac_ct_CC="gcc"
1899 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1900 break 2
1901 fi
1902 done
1903 done
1904
1905 fi
1906 fi
1907 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1908 if test -n "$ac_ct_CC"; then
1909 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1910 echo "${ECHO_T}$ac_ct_CC" >&6
1911 else
1912 echo "$as_me:$LINENO: result: no" >&5
1913 echo "${ECHO_T}no" >&6
1914 fi
1915
1916 CC=$ac_ct_CC
1917 else
1918 CC="$ac_cv_prog_CC"
1919 fi
1920
1921 if test -z "$CC"; then
1922 if test -n "$ac_tool_prefix"; then
1923 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1924 set dummy ${ac_tool_prefix}cc; ac_word=$2
1925 echo "$as_me:$LINENO: checking for $ac_word" >&5
1926 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1927 if test "${ac_cv_prog_CC+set}" = set; then
1928 echo $ECHO_N "(cached) $ECHO_C" >&6
1929 else
1930 if test -n "$CC"; then
1931 ac_cv_prog_CC="$CC" # Let the user override the test.
1932 else
1933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1934 for as_dir in $PATH
1935 do
1936 IFS=$as_save_IFS
1937 test -z "$as_dir" && as_dir=.
1938 for ac_exec_ext in '' $ac_executable_extensions; do
1939 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1940 ac_cv_prog_CC="${ac_tool_prefix}cc"
1941 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1942 break 2
1943 fi
1944 done
1945 done
1946
1947 fi
1948 fi
1949 CC=$ac_cv_prog_CC
1950 if test -n "$CC"; then
1951 echo "$as_me:$LINENO: result: $CC" >&5
1952 echo "${ECHO_T}$CC" >&6
1953 else
1954 echo "$as_me:$LINENO: result: no" >&5
1955 echo "${ECHO_T}no" >&6
1956 fi
1957
1958 fi
1959 if test -z "$ac_cv_prog_CC"; then
1960 ac_ct_CC=$CC
1961 # Extract the first word of "cc", so it can be a program name with args.
1962 set dummy cc; ac_word=$2
1963 echo "$as_me:$LINENO: checking for $ac_word" >&5
1964 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1965 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1966 echo $ECHO_N "(cached) $ECHO_C" >&6
1967 else
1968 if test -n "$ac_ct_CC"; then
1969 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1970 else
1971 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1972 for as_dir in $PATH
1973 do
1974 IFS=$as_save_IFS
1975 test -z "$as_dir" && as_dir=.
1976 for ac_exec_ext in '' $ac_executable_extensions; do
1977 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1978 ac_cv_prog_ac_ct_CC="cc"
1979 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1980 break 2
1981 fi
1982 done
1983 done
1984
1985 fi
1986 fi
1987 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1988 if test -n "$ac_ct_CC"; then
1989 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1990 echo "${ECHO_T}$ac_ct_CC" >&6
1991 else
1992 echo "$as_me:$LINENO: result: no" >&5
1993 echo "${ECHO_T}no" >&6
1994 fi
1995
1996 CC=$ac_ct_CC
1997 else
1998 CC="$ac_cv_prog_CC"
1999 fi
2000
2001 fi
2002 if test -z "$CC"; then
2003 # Extract the first word of "cc", so it can be a program name with args.
2004 set dummy cc; ac_word=$2
2005 echo "$as_me:$LINENO: checking for $ac_word" >&5
2006 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2007 if test "${ac_cv_prog_CC+set}" = set; then
2008 echo $ECHO_N "(cached) $ECHO_C" >&6
2009 else
2010 if test -n "$CC"; then
2011 ac_cv_prog_CC="$CC" # Let the user override the test.
2012 else
2013 ac_prog_rejected=no
2014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2015 for as_dir in $PATH
2016 do
2017 IFS=$as_save_IFS
2018 test -z "$as_dir" && as_dir=.
2019 for ac_exec_ext in '' $ac_executable_extensions; do
2020 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2021 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2022 ac_prog_rejected=yes
2023 continue
2024 fi
2025 ac_cv_prog_CC="cc"
2026 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2027 break 2
2028 fi
2029 done
2030 done
2031
2032 if test $ac_prog_rejected = yes; then
2033 # We found a bogon in the path, so make sure we never use it.
2034 set dummy $ac_cv_prog_CC
2035 shift
2036 if test $# != 0; then
2037 # We chose a different compiler from the bogus one.
2038 # However, it has the same basename, so the bogon will be chosen
2039 # first if we set CC to just the basename; use the full file name.
2040 shift
2041 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2042 fi
2043 fi
2044 fi
2045 fi
2046 CC=$ac_cv_prog_CC
2047 if test -n "$CC"; then
2048 echo "$as_me:$LINENO: result: $CC" >&5
2049 echo "${ECHO_T}$CC" >&6
2050 else
2051 echo "$as_me:$LINENO: result: no" >&5
2052 echo "${ECHO_T}no" >&6
2053 fi
2054
2055 fi
2056 if test -z "$CC"; then
2057 if test -n "$ac_tool_prefix"; then
2058 for ac_prog in cl
2059 do
2060 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2061 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2062 echo "$as_me:$LINENO: checking for $ac_word" >&5
2063 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2064 if test "${ac_cv_prog_CC+set}" = set; then
2065 echo $ECHO_N "(cached) $ECHO_C" >&6
2066 else
2067 if test -n "$CC"; then
2068 ac_cv_prog_CC="$CC" # Let the user override the test.
2069 else
2070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2071 for as_dir in $PATH
2072 do
2073 IFS=$as_save_IFS
2074 test -z "$as_dir" && as_dir=.
2075 for ac_exec_ext in '' $ac_executable_extensions; do
2076 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2077 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2078 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2079 break 2
2080 fi
2081 done
2082 done
2083
2084 fi
2085 fi
2086 CC=$ac_cv_prog_CC
2087 if test -n "$CC"; then
2088 echo "$as_me:$LINENO: result: $CC" >&5
2089 echo "${ECHO_T}$CC" >&6
2090 else
2091 echo "$as_me:$LINENO: result: no" >&5
2092 echo "${ECHO_T}no" >&6
2093 fi
2094
2095 test -n "$CC" && break
2096 done
2097 fi
2098 if test -z "$CC"; then
2099 ac_ct_CC=$CC
2100 for ac_prog in cl
2101 do
2102 # Extract the first word of "$ac_prog", so it can be a program name with args.
2103 set dummy $ac_prog; ac_word=$2
2104 echo "$as_me:$LINENO: checking for $ac_word" >&5
2105 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2106 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2107 echo $ECHO_N "(cached) $ECHO_C" >&6
2108 else
2109 if test -n "$ac_ct_CC"; then
2110 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2111 else
2112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2113 for as_dir in $PATH
2114 do
2115 IFS=$as_save_IFS
2116 test -z "$as_dir" && as_dir=.
2117 for ac_exec_ext in '' $ac_executable_extensions; do
2118 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2119 ac_cv_prog_ac_ct_CC="$ac_prog"
2120 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2121 break 2
2122 fi
2123 done
2124 done
2125
2126 fi
2127 fi
2128 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2129 if test -n "$ac_ct_CC"; then
2130 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2131 echo "${ECHO_T}$ac_ct_CC" >&6
2132 else
2133 echo "$as_me:$LINENO: result: no" >&5
2134 echo "${ECHO_T}no" >&6
2135 fi
2136
2137 test -n "$ac_ct_CC" && break
2138 done
2139
2140 CC=$ac_ct_CC
2141 fi
2142
2143 fi
2144
2145
2146 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2147 See \`config.log' for more details." >&5
2148 echo "$as_me: error: no acceptable C compiler found in \$PATH
2149 See \`config.log' for more details." >&2;}
2150 { (exit 1); exit 1; }; }
2151
2152 # Provide some information about the compiler.
2153 echo "$as_me:$LINENO:" \
2154 "checking for C compiler version" >&5
2155 ac_compiler=`set X $ac_compile; echo $2`
2156 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2157 (eval $ac_compiler --version </dev/null >&5) 2>&5
2158 ac_status=$?
2159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2160 (exit $ac_status); }
2161 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2162 (eval $ac_compiler -v </dev/null >&5) 2>&5
2163 ac_status=$?
2164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2165 (exit $ac_status); }
2166 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2167 (eval $ac_compiler -V </dev/null >&5) 2>&5
2168 ac_status=$?
2169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2170 (exit $ac_status); }
2171
2172 cat >conftest.$ac_ext <<_ACEOF
2173 /* confdefs.h. */
2174 _ACEOF
2175 cat confdefs.h >>conftest.$ac_ext
2176 cat >>conftest.$ac_ext <<_ACEOF
2177 /* end confdefs.h. */
2178
2179 int
2180 main ()
2181 {
2182
2183 ;
2184 return 0;
2185 }
2186 _ACEOF
2187 ac_clean_files_save=$ac_clean_files
2188 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2189 # Try to create an executable without -o first, disregard a.out.
2190 # It will help us diagnose broken compilers, and finding out an intuition
2191 # of exeext.
2192 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2193 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2194 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2195 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2196 (eval $ac_link_default) 2>&5
2197 ac_status=$?
2198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2199 (exit $ac_status); }; then
2200 # Find the output, starting from the most likely. This scheme is
2201 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2202 # resort.
2203
2204 # Be careful to initialize this variable, since it used to be cached.
2205 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2206 ac_cv_exeext=
2207 # b.out is created by i960 compilers.
2208 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2209 do
2210 test -f "$ac_file" || continue
2211 case $ac_file in
2212 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2213 ;;
2214 conftest.$ac_ext )
2215 # This is the source file.
2216 ;;
2217 [ab].out )
2218 # We found the default executable, but exeext='' is most
2219 # certainly right.
2220 break;;
2221 *.* )
2222 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2223 # FIXME: I believe we export ac_cv_exeext for Libtool,
2224 # but it would be cool to find out if it's true. Does anybody
2225 # maintain Libtool? --akim.
2226 export ac_cv_exeext
2227 break;;
2228 * )
2229 break;;
2230 esac
2231 done
2232 else
2233 echo "$as_me: failed program was:" >&5
2234 sed 's/^/| /' conftest.$ac_ext >&5
2235
2236 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2237 See \`config.log' for more details." >&5
2238 echo "$as_me: error: C compiler cannot create executables
2239 See \`config.log' for more details." >&2;}
2240 { (exit 77); exit 77; }; }
2241 fi
2242
2243 ac_exeext=$ac_cv_exeext
2244 echo "$as_me:$LINENO: result: $ac_file" >&5
2245 echo "${ECHO_T}$ac_file" >&6
2246
2247 # Check the compiler produces executables we can run. If not, either
2248 # the compiler is broken, or we cross compile.
2249 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2250 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2251 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2252 # If not cross compiling, check that we can run a simple program.
2253 if test "$cross_compiling" != yes; then
2254 if { ac_try='./$ac_file'
2255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2256 (eval $ac_try) 2>&5
2257 ac_status=$?
2258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2259 (exit $ac_status); }; }; then
2260 cross_compiling=no
2261 else
2262 if test "$cross_compiling" = maybe; then
2263 cross_compiling=yes
2264 else
2265 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2266 If you meant to cross compile, use \`--host'.
2267 See \`config.log' for more details." >&5
2268 echo "$as_me: error: cannot run C compiled programs.
2269 If you meant to cross compile, use \`--host'.
2270 See \`config.log' for more details." >&2;}
2271 { (exit 1); exit 1; }; }
2272 fi
2273 fi
2274 fi
2275 echo "$as_me:$LINENO: result: yes" >&5
2276 echo "${ECHO_T}yes" >&6
2277
2278 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2279 ac_clean_files=$ac_clean_files_save
2280 # Check the compiler produces executables we can run. If not, either
2281 # the compiler is broken, or we cross compile.
2282 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2283 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2284 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2285 echo "${ECHO_T}$cross_compiling" >&6
2286
2287 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2288 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2289 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2290 (eval $ac_link) 2>&5
2291 ac_status=$?
2292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2293 (exit $ac_status); }; then
2294 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2295 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2296 # work properly (i.e., refer to `conftest.exe'), while it won't with
2297 # `rm'.
2298 for ac_file in conftest.exe conftest conftest.*; do
2299 test -f "$ac_file" || continue
2300 case $ac_file in
2301 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2302 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2303 export ac_cv_exeext
2304 break;;
2305 * ) break;;
2306 esac
2307 done
2308 else
2309 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2310 See \`config.log' for more details." >&5
2311 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2312 See \`config.log' for more details." >&2;}
2313 { (exit 1); exit 1; }; }
2314 fi
2315
2316 rm -f conftest$ac_cv_exeext
2317 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2318 echo "${ECHO_T}$ac_cv_exeext" >&6
2319
2320 rm -f conftest.$ac_ext
2321 EXEEXT=$ac_cv_exeext
2322 ac_exeext=$EXEEXT
2323 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2324 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2325 if test "${ac_cv_objext+set}" = set; then
2326 echo $ECHO_N "(cached) $ECHO_C" >&6
2327 else
2328 cat >conftest.$ac_ext <<_ACEOF
2329 /* confdefs.h. */
2330 _ACEOF
2331 cat confdefs.h >>conftest.$ac_ext
2332 cat >>conftest.$ac_ext <<_ACEOF
2333 /* end confdefs.h. */
2334
2335 int
2336 main ()
2337 {
2338
2339 ;
2340 return 0;
2341 }
2342 _ACEOF
2343 rm -f conftest.o conftest.obj
2344 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2345 (eval $ac_compile) 2>&5
2346 ac_status=$?
2347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2348 (exit $ac_status); }; then
2349 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2350 case $ac_file in
2351 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2352 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2353 break;;
2354 esac
2355 done
2356 else
2357 echo "$as_me: failed program was:" >&5
2358 sed 's/^/| /' conftest.$ac_ext >&5
2359
2360 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2361 See \`config.log' for more details." >&5
2362 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2363 See \`config.log' for more details." >&2;}
2364 { (exit 1); exit 1; }; }
2365 fi
2366
2367 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2368 fi
2369 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2370 echo "${ECHO_T}$ac_cv_objext" >&6
2371 OBJEXT=$ac_cv_objext
2372 ac_objext=$OBJEXT
2373 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2374 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2375 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2376 echo $ECHO_N "(cached) $ECHO_C" >&6
2377 else
2378 cat >conftest.$ac_ext <<_ACEOF
2379 /* confdefs.h. */
2380 _ACEOF
2381 cat confdefs.h >>conftest.$ac_ext
2382 cat >>conftest.$ac_ext <<_ACEOF
2383 /* end confdefs.h. */
2384
2385 int
2386 main ()
2387 {
2388 #ifndef __GNUC__
2389 choke me
2390 #endif
2391
2392 ;
2393 return 0;
2394 }
2395 _ACEOF
2396 rm -f conftest.$ac_objext
2397 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2398 (eval $ac_compile) 2>conftest.er1
2399 ac_status=$?
2400 grep -v '^ *+' conftest.er1 >conftest.err
2401 rm -f conftest.er1
2402 cat conftest.err >&5
2403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2404 (exit $ac_status); } &&
2405 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2407 (eval $ac_try) 2>&5
2408 ac_status=$?
2409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2410 (exit $ac_status); }; } &&
2411 { ac_try='test -s conftest.$ac_objext'
2412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2413 (eval $ac_try) 2>&5
2414 ac_status=$?
2415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2416 (exit $ac_status); }; }; then
2417 ac_compiler_gnu=yes
2418 else
2419 echo "$as_me: failed program was:" >&5
2420 sed 's/^/| /' conftest.$ac_ext >&5
2421
2422 ac_compiler_gnu=no
2423 fi
2424 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2425 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2426
2427 fi
2428 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2429 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2430 GCC=`test $ac_compiler_gnu = yes && echo yes`
2431 ac_test_CFLAGS=${CFLAGS+set}
2432 ac_save_CFLAGS=$CFLAGS
2433 CFLAGS="-g"
2434 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2435 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2436 if test "${ac_cv_prog_cc_g+set}" = set; then
2437 echo $ECHO_N "(cached) $ECHO_C" >&6
2438 else
2439 cat >conftest.$ac_ext <<_ACEOF
2440 /* confdefs.h. */
2441 _ACEOF
2442 cat confdefs.h >>conftest.$ac_ext
2443 cat >>conftest.$ac_ext <<_ACEOF
2444 /* end confdefs.h. */
2445
2446 int
2447 main ()
2448 {
2449
2450 ;
2451 return 0;
2452 }
2453 _ACEOF
2454 rm -f conftest.$ac_objext
2455 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2456 (eval $ac_compile) 2>conftest.er1
2457 ac_status=$?
2458 grep -v '^ *+' conftest.er1 >conftest.err
2459 rm -f conftest.er1
2460 cat conftest.err >&5
2461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2462 (exit $ac_status); } &&
2463 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2465 (eval $ac_try) 2>&5
2466 ac_status=$?
2467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2468 (exit $ac_status); }; } &&
2469 { ac_try='test -s conftest.$ac_objext'
2470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2471 (eval $ac_try) 2>&5
2472 ac_status=$?
2473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2474 (exit $ac_status); }; }; then
2475 ac_cv_prog_cc_g=yes
2476 else
2477 echo "$as_me: failed program was:" >&5
2478 sed 's/^/| /' conftest.$ac_ext >&5
2479
2480 ac_cv_prog_cc_g=no
2481 fi
2482 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2483 fi
2484 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2485 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2486 if test "$ac_test_CFLAGS" = set; then
2487 CFLAGS=$ac_save_CFLAGS
2488 elif test $ac_cv_prog_cc_g = yes; then
2489 if test "$GCC" = yes; then
2490 CFLAGS="-g -O2"
2491 else
2492 CFLAGS="-g"
2493 fi
2494 else
2495 if test "$GCC" = yes; then
2496 CFLAGS="-O2"
2497 else
2498 CFLAGS=
2499 fi
2500 fi
2501 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2502 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2503 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2504 echo $ECHO_N "(cached) $ECHO_C" >&6
2505 else
2506 ac_cv_prog_cc_stdc=no
2507 ac_save_CC=$CC
2508 cat >conftest.$ac_ext <<_ACEOF
2509 /* confdefs.h. */
2510 _ACEOF
2511 cat confdefs.h >>conftest.$ac_ext
2512 cat >>conftest.$ac_ext <<_ACEOF
2513 /* end confdefs.h. */
2514 #include <stdarg.h>
2515 #include <stdio.h>
2516 #include <sys/types.h>
2517 #include <sys/stat.h>
2518 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2519 struct buf { int x; };
2520 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2521 static char *e (p, i)
2522 char **p;
2523 int i;
2524 {
2525 return p[i];
2526 }
2527 static char *f (char * (*g) (char **, int), char **p, ...)
2528 {
2529 char *s;
2530 va_list v;
2531 va_start (v,p);
2532 s = g (p, va_arg (v,int));
2533 va_end (v);
2534 return s;
2535 }
2536
2537 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2538 function prototypes and stuff, but not '\xHH' hex character constants.
2539 These don't provoke an error unfortunately, instead are silently treated
2540 as 'x'. The following induces an error, until -std1 is added to get
2541 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2542 array size at least. It's necessary to write '\x00'==0 to get something
2543 that's true only with -std1. */
2544 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2545
2546 int test (int i, double x);
2547 struct s1 {int (*f) (int a);};
2548 struct s2 {int (*f) (double a);};
2549 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2550 int argc;
2551 char **argv;
2552 int
2553 main ()
2554 {
2555 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2556 ;
2557 return 0;
2558 }
2559 _ACEOF
2560 # Don't try gcc -ansi; that turns off useful extensions and
2561 # breaks some systems' header files.
2562 # AIX -qlanglvl=ansi
2563 # Ultrix and OSF/1 -std1
2564 # HP-UX 10.20 and later -Ae
2565 # HP-UX older versions -Aa -D_HPUX_SOURCE
2566 # SVR4 -Xc -D__EXTENSIONS__
2567 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2568 do
2569 CC="$ac_save_CC $ac_arg"
2570 rm -f conftest.$ac_objext
2571 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2572 (eval $ac_compile) 2>conftest.er1
2573 ac_status=$?
2574 grep -v '^ *+' conftest.er1 >conftest.err
2575 rm -f conftest.er1
2576 cat conftest.err >&5
2577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2578 (exit $ac_status); } &&
2579 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2581 (eval $ac_try) 2>&5
2582 ac_status=$?
2583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2584 (exit $ac_status); }; } &&
2585 { ac_try='test -s conftest.$ac_objext'
2586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2587 (eval $ac_try) 2>&5
2588 ac_status=$?
2589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2590 (exit $ac_status); }; }; then
2591 ac_cv_prog_cc_stdc=$ac_arg
2592 break
2593 else
2594 echo "$as_me: failed program was:" >&5
2595 sed 's/^/| /' conftest.$ac_ext >&5
2596
2597 fi
2598 rm -f conftest.err conftest.$ac_objext
2599 done
2600 rm -f conftest.$ac_ext conftest.$ac_objext
2601 CC=$ac_save_CC
2602
2603 fi
2604
2605 case "x$ac_cv_prog_cc_stdc" in
2606 x|xno)
2607 echo "$as_me:$LINENO: result: none needed" >&5
2608 echo "${ECHO_T}none needed" >&6 ;;
2609 *)
2610 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2611 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2612 CC="$CC $ac_cv_prog_cc_stdc" ;;
2613 esac
2614
2615 # Some people use a C++ compiler to compile C. Since we use `exit',
2616 # in C++ we need to declare it. In case someone uses the same compiler
2617 # for both compiling C and C++ we need to have the C++ compiler decide
2618 # the declaration of exit, since it's the most demanding environment.
2619 cat >conftest.$ac_ext <<_ACEOF
2620 #ifndef __cplusplus
2621 choke me
2622 #endif
2623 _ACEOF
2624 rm -f conftest.$ac_objext
2625 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2626 (eval $ac_compile) 2>conftest.er1
2627 ac_status=$?
2628 grep -v '^ *+' conftest.er1 >conftest.err
2629 rm -f conftest.er1
2630 cat conftest.err >&5
2631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2632 (exit $ac_status); } &&
2633 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2635 (eval $ac_try) 2>&5
2636 ac_status=$?
2637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2638 (exit $ac_status); }; } &&
2639 { ac_try='test -s conftest.$ac_objext'
2640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2641 (eval $ac_try) 2>&5
2642 ac_status=$?
2643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2644 (exit $ac_status); }; }; then
2645 for ac_declaration in \
2646 '' \
2647 'extern "C" void std::exit (int) throw (); using std::exit;' \
2648 'extern "C" void std::exit (int); using std::exit;' \
2649 'extern "C" void exit (int) throw ();' \
2650 'extern "C" void exit (int);' \
2651 'void exit (int);'
2652 do
2653 cat >conftest.$ac_ext <<_ACEOF
2654 /* confdefs.h. */
2655 _ACEOF
2656 cat confdefs.h >>conftest.$ac_ext
2657 cat >>conftest.$ac_ext <<_ACEOF
2658 /* end confdefs.h. */
2659 $ac_declaration
2660 #include <stdlib.h>
2661 int
2662 main ()
2663 {
2664 exit (42);
2665 ;
2666 return 0;
2667 }
2668 _ACEOF
2669 rm -f conftest.$ac_objext
2670 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2671 (eval $ac_compile) 2>conftest.er1
2672 ac_status=$?
2673 grep -v '^ *+' conftest.er1 >conftest.err
2674 rm -f conftest.er1
2675 cat conftest.err >&5
2676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2677 (exit $ac_status); } &&
2678 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2680 (eval $ac_try) 2>&5
2681 ac_status=$?
2682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2683 (exit $ac_status); }; } &&
2684 { ac_try='test -s conftest.$ac_objext'
2685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2686 (eval $ac_try) 2>&5
2687 ac_status=$?
2688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2689 (exit $ac_status); }; }; then
2690 :
2691 else
2692 echo "$as_me: failed program was:" >&5
2693 sed 's/^/| /' conftest.$ac_ext >&5
2694
2695 continue
2696 fi
2697 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2698 cat >conftest.$ac_ext <<_ACEOF
2699 /* confdefs.h. */
2700 _ACEOF
2701 cat confdefs.h >>conftest.$ac_ext
2702 cat >>conftest.$ac_ext <<_ACEOF
2703 /* end confdefs.h. */
2704 $ac_declaration
2705 int
2706 main ()
2707 {
2708 exit (42);
2709 ;
2710 return 0;
2711 }
2712 _ACEOF
2713 rm -f conftest.$ac_objext
2714 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2715 (eval $ac_compile) 2>conftest.er1
2716 ac_status=$?
2717 grep -v '^ *+' conftest.er1 >conftest.err
2718 rm -f conftest.er1
2719 cat conftest.err >&5
2720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2721 (exit $ac_status); } &&
2722 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2724 (eval $ac_try) 2>&5
2725 ac_status=$?
2726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2727 (exit $ac_status); }; } &&
2728 { ac_try='test -s conftest.$ac_objext'
2729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2730 (eval $ac_try) 2>&5
2731 ac_status=$?
2732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2733 (exit $ac_status); }; }; then
2734 break
2735 else
2736 echo "$as_me: failed program was:" >&5
2737 sed 's/^/| /' conftest.$ac_ext >&5
2738
2739 fi
2740 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2741 done
2742 rm -f conftest*
2743 if test -n "$ac_declaration"; then
2744 echo '#ifdef __cplusplus' >>confdefs.h
2745 echo $ac_declaration >>confdefs.h
2746 echo '#endif' >>confdefs.h
2747 fi
2748
2749 else
2750 echo "$as_me: failed program was:" >&5
2751 sed 's/^/| /' conftest.$ac_ext >&5
2752
2753 fi
2754 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2755 ac_ext=c
2756 ac_cpp='$CPP $CPPFLAGS'
2757 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2758 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2759 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2760
2761
2762
2763 echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
2764 echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6
2765 if test "${ac_cv_lib_cposix_strerror+set}" = set; then
2766 echo $ECHO_N "(cached) $ECHO_C" >&6
2767 else
2768 ac_check_lib_save_LIBS=$LIBS
2769 LIBS="-lcposix $LIBS"
2770 cat >conftest.$ac_ext <<_ACEOF
2771 /* confdefs.h. */
2772 _ACEOF
2773 cat confdefs.h >>conftest.$ac_ext
2774 cat >>conftest.$ac_ext <<_ACEOF
2775 /* end confdefs.h. */
2776
2777 /* Override any gcc2 internal prototype to avoid an error. */
2778 #ifdef __cplusplus
2779 extern "C"
2780 #endif
2781 /* We use char because int might match the return type of a gcc2
2782 builtin and then its argument prototype would still apply. */
2783 char strerror ();
2784 int
2785 main ()
2786 {
2787 strerror ();
2788 ;
2789 return 0;
2790 }
2791 _ACEOF
2792 rm -f conftest.$ac_objext conftest$ac_exeext
2793 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2794 (eval $ac_link) 2>conftest.er1
2795 ac_status=$?
2796 grep -v '^ *+' conftest.er1 >conftest.err
2797 rm -f conftest.er1
2798 cat conftest.err >&5
2799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2800 (exit $ac_status); } &&
2801 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2803 (eval $ac_try) 2>&5
2804 ac_status=$?
2805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2806 (exit $ac_status); }; } &&
2807 { ac_try='test -s conftest$ac_exeext'
2808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2809 (eval $ac_try) 2>&5
2810 ac_status=$?
2811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2812 (exit $ac_status); }; }; then
2813 ac_cv_lib_cposix_strerror=yes
2814 else
2815 echo "$as_me: failed program was:" >&5
2816 sed 's/^/| /' conftest.$ac_ext >&5
2817
2818 ac_cv_lib_cposix_strerror=no
2819 fi
2820 rm -f conftest.err conftest.$ac_objext \
2821 conftest$ac_exeext conftest.$ac_ext
2822 LIBS=$ac_check_lib_save_LIBS
2823 fi
2824 echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5
2825 echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6
2826 if test $ac_cv_lib_cposix_strerror = yes; then
2827 LIBS="$LIBS -lcposix"
2828 fi
2829
2830
2831
2832 ac_ext=c
2833 ac_cpp='$CPP $CPPFLAGS'
2834 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2835 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2836 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2837 if test -n "$ac_tool_prefix"; then
2838 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2839 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2840 echo "$as_me:$LINENO: checking for $ac_word" >&5
2841 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2842 if test "${ac_cv_prog_CC+set}" = set; then
2843 echo $ECHO_N "(cached) $ECHO_C" >&6
2844 else
2845 if test -n "$CC"; then
2846 ac_cv_prog_CC="$CC" # Let the user override the test.
2847 else
2848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2849 for as_dir in $PATH
2850 do
2851 IFS=$as_save_IFS
2852 test -z "$as_dir" && as_dir=.
2853 for ac_exec_ext in '' $ac_executable_extensions; do
2854 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2855 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2856 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2857 break 2
2858 fi
2859 done
2860 done
2861
2862 fi
2863 fi
2864 CC=$ac_cv_prog_CC
2865 if test -n "$CC"; then
2866 echo "$as_me:$LINENO: result: $CC" >&5
2867 echo "${ECHO_T}$CC" >&6
2868 else
2869 echo "$as_me:$LINENO: result: no" >&5
2870 echo "${ECHO_T}no" >&6
2871 fi
2872
2873 fi
2874 if test -z "$ac_cv_prog_CC"; then
2875 ac_ct_CC=$CC
2876 # Extract the first word of "gcc", so it can be a program name with args.
2877 set dummy gcc; ac_word=$2
2878 echo "$as_me:$LINENO: checking for $ac_word" >&5
2879 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2880 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2881 echo $ECHO_N "(cached) $ECHO_C" >&6
2882 else
2883 if test -n "$ac_ct_CC"; then
2884 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2885 else
2886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2887 for as_dir in $PATH
2888 do
2889 IFS=$as_save_IFS
2890 test -z "$as_dir" && as_dir=.
2891 for ac_exec_ext in '' $ac_executable_extensions; do
2892 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2893 ac_cv_prog_ac_ct_CC="gcc"
2894 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2895 break 2
2896 fi
2897 done
2898 done
2899
2900 fi
2901 fi
2902 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2903 if test -n "$ac_ct_CC"; then
2904 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2905 echo "${ECHO_T}$ac_ct_CC" >&6
2906 else
2907 echo "$as_me:$LINENO: result: no" >&5
2908 echo "${ECHO_T}no" >&6
2909 fi
2910
2911 CC=$ac_ct_CC
2912 else
2913 CC="$ac_cv_prog_CC"
2914 fi
2915
2916 if test -z "$CC"; then
2917 if test -n "$ac_tool_prefix"; then
2918 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2919 set dummy ${ac_tool_prefix}cc; ac_word=$2
2920 echo "$as_me:$LINENO: checking for $ac_word" >&5
2921 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2922 if test "${ac_cv_prog_CC+set}" = set; then
2923 echo $ECHO_N "(cached) $ECHO_C" >&6
2924 else
2925 if test -n "$CC"; then
2926 ac_cv_prog_CC="$CC" # Let the user override the test.
2927 else
2928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2929 for as_dir in $PATH
2930 do
2931 IFS=$as_save_IFS
2932 test -z "$as_dir" && as_dir=.
2933 for ac_exec_ext in '' $ac_executable_extensions; do
2934 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2935 ac_cv_prog_CC="${ac_tool_prefix}cc"
2936 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2937 break 2
2938 fi
2939 done
2940 done
2941
2942 fi
2943 fi
2944 CC=$ac_cv_prog_CC
2945 if test -n "$CC"; then
2946 echo "$as_me:$LINENO: result: $CC" >&5
2947 echo "${ECHO_T}$CC" >&6
2948 else
2949 echo "$as_me:$LINENO: result: no" >&5
2950 echo "${ECHO_T}no" >&6
2951 fi
2952
2953 fi
2954 if test -z "$ac_cv_prog_CC"; then
2955 ac_ct_CC=$CC
2956 # Extract the first word of "cc", so it can be a program name with args.
2957 set dummy cc; ac_word=$2
2958 echo "$as_me:$LINENO: checking for $ac_word" >&5
2959 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2960 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2961 echo $ECHO_N "(cached) $ECHO_C" >&6
2962 else
2963 if test -n "$ac_ct_CC"; then
2964 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2965 else
2966 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2967 for as_dir in $PATH
2968 do
2969 IFS=$as_save_IFS
2970 test -z "$as_dir" && as_dir=.
2971 for ac_exec_ext in '' $ac_executable_extensions; do
2972 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2973 ac_cv_prog_ac_ct_CC="cc"
2974 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2975 break 2
2976 fi
2977 done
2978 done
2979
2980 fi
2981 fi
2982 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2983 if test -n "$ac_ct_CC"; then
2984 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2985 echo "${ECHO_T}$ac_ct_CC" >&6
2986 else
2987 echo "$as_me:$LINENO: result: no" >&5
2988 echo "${ECHO_T}no" >&6
2989 fi
2990
2991 CC=$ac_ct_CC
2992 else
2993 CC="$ac_cv_prog_CC"
2994 fi
2995
2996 fi
2997 if test -z "$CC"; then
2998 # Extract the first word of "cc", so it can be a program name with args.
2999 set dummy cc; ac_word=$2
3000 echo "$as_me:$LINENO: checking for $ac_word" >&5
3001 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3002 if test "${ac_cv_prog_CC+set}" = set; then
3003 echo $ECHO_N "(cached) $ECHO_C" >&6
3004 else
3005 if test -n "$CC"; then
3006 ac_cv_prog_CC="$CC" # Let the user override the test.
3007 else
3008 ac_prog_rejected=no
3009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3010 for as_dir in $PATH
3011 do
3012 IFS=$as_save_IFS
3013 test -z "$as_dir" && as_dir=.
3014 for ac_exec_ext in '' $ac_executable_extensions; do
3015 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3016 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3017 ac_prog_rejected=yes
3018 continue
3019 fi
3020 ac_cv_prog_CC="cc"
3021 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3022 break 2
3023 fi
3024 done
3025 done
3026
3027 if test $ac_prog_rejected = yes; then
3028 # We found a bogon in the path, so make sure we never use it.
3029 set dummy $ac_cv_prog_CC
3030 shift
3031 if test $# != 0; then
3032 # We chose a different compiler from the bogus one.
3033 # However, it has the same basename, so the bogon will be chosen
3034 # first if we set CC to just the basename; use the full file name.
3035 shift
3036 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3037 fi
3038 fi
3039 fi
3040 fi
3041 CC=$ac_cv_prog_CC
3042 if test -n "$CC"; then
3043 echo "$as_me:$LINENO: result: $CC" >&5
3044 echo "${ECHO_T}$CC" >&6
3045 else
3046 echo "$as_me:$LINENO: result: no" >&5
3047 echo "${ECHO_T}no" >&6
3048 fi
3049
3050 fi
3051 if test -z "$CC"; then
3052 if test -n "$ac_tool_prefix"; then
3053 for ac_prog in cl
3054 do
3055 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3056 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3057 echo "$as_me:$LINENO: checking for $ac_word" >&5
3058 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3059 if test "${ac_cv_prog_CC+set}" = set; then
3060 echo $ECHO_N "(cached) $ECHO_C" >&6
3061 else
3062 if test -n "$CC"; then
3063 ac_cv_prog_CC="$CC" # Let the user override the test.
3064 else
3065 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3066 for as_dir in $PATH
3067 do
3068 IFS=$as_save_IFS
3069 test -z "$as_dir" && as_dir=.
3070 for ac_exec_ext in '' $ac_executable_extensions; do
3071 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3072 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3073 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3074 break 2
3075 fi
3076 done
3077 done
3078
3079 fi
3080 fi
3081 CC=$ac_cv_prog_CC
3082 if test -n "$CC"; then
3083 echo "$as_me:$LINENO: result: $CC" >&5
3084 echo "${ECHO_T}$CC" >&6
3085 else
3086 echo "$as_me:$LINENO: result: no" >&5
3087 echo "${ECHO_T}no" >&6
3088 fi
3089
3090 test -n "$CC" && break
3091 done
3092 fi
3093 if test -z "$CC"; then
3094 ac_ct_CC=$CC
3095 for ac_prog in cl
3096 do
3097 # Extract the first word of "$ac_prog", so it can be a program name with args.
3098 set dummy $ac_prog; ac_word=$2
3099 echo "$as_me:$LINENO: checking for $ac_word" >&5
3100 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3101 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3102 echo $ECHO_N "(cached) $ECHO_C" >&6
3103 else
3104 if test -n "$ac_ct_CC"; then
3105 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3106 else
3107 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3108 for as_dir in $PATH
3109 do
3110 IFS=$as_save_IFS
3111 test -z "$as_dir" && as_dir=.
3112 for ac_exec_ext in '' $ac_executable_extensions; do
3113 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3114 ac_cv_prog_ac_ct_CC="$ac_prog"
3115 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3116 break 2
3117 fi
3118 done
3119 done
3120
3121 fi
3122 fi
3123 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3124 if test -n "$ac_ct_CC"; then
3125 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3126 echo "${ECHO_T}$ac_ct_CC" >&6
3127 else
3128 echo "$as_me:$LINENO: result: no" >&5
3129 echo "${ECHO_T}no" >&6
3130 fi
3131
3132 test -n "$ac_ct_CC" && break
3133 done
3134
3135 CC=$ac_ct_CC
3136 fi
3137
3138 fi
3139
3140
3141 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3142 See \`config.log' for more details." >&5
3143 echo "$as_me: error: no acceptable C compiler found in \$PATH
3144 See \`config.log' for more details." >&2;}
3145 { (exit 1); exit 1; }; }
3146
3147 # Provide some information about the compiler.
3148 echo "$as_me:$LINENO:" \
3149 "checking for C compiler version" >&5
3150 ac_compiler=`set X $ac_compile; echo $2`
3151 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
3152 (eval $ac_compiler --version </dev/null >&5) 2>&5
3153 ac_status=$?
3154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3155 (exit $ac_status); }
3156 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
3157 (eval $ac_compiler -v </dev/null >&5) 2>&5
3158 ac_status=$?
3159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3160 (exit $ac_status); }
3161 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
3162 (eval $ac_compiler -V </dev/null >&5) 2>&5
3163 ac_status=$?
3164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3165 (exit $ac_status); }
3166
3167 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3168 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3169 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3170 echo $ECHO_N "(cached) $ECHO_C" >&6
3171 else
3172 cat >conftest.$ac_ext <<_ACEOF
3173 /* confdefs.h. */
3174 _ACEOF
3175 cat confdefs.h >>conftest.$ac_ext
3176 cat >>conftest.$ac_ext <<_ACEOF
3177 /* end confdefs.h. */
3178
3179 int
3180 main ()
3181 {
3182 #ifndef __GNUC__
3183 choke me
3184 #endif
3185
3186 ;
3187 return 0;
3188 }
3189 _ACEOF
3190 rm -f conftest.$ac_objext
3191 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3192 (eval $ac_compile) 2>conftest.er1
3193 ac_status=$?
3194 grep -v '^ *+' conftest.er1 >conftest.err
3195 rm -f conftest.er1
3196 cat conftest.err >&5
3197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3198 (exit $ac_status); } &&
3199 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3201 (eval $ac_try) 2>&5
3202 ac_status=$?
3203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3204 (exit $ac_status); }; } &&
3205 { ac_try='test -s conftest.$ac_objext'
3206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3207 (eval $ac_try) 2>&5
3208 ac_status=$?
3209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3210 (exit $ac_status); }; }; then
3211 ac_compiler_gnu=yes
3212 else
3213 echo "$as_me: failed program was:" >&5
3214 sed 's/^/| /' conftest.$ac_ext >&5
3215
3216 ac_compiler_gnu=no
3217 fi
3218 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3219 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3220
3221 fi
3222 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3223 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3224 GCC=`test $ac_compiler_gnu = yes && echo yes`
3225 ac_test_CFLAGS=${CFLAGS+set}
3226 ac_save_CFLAGS=$CFLAGS
3227 CFLAGS="-g"
3228 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3229 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3230 if test "${ac_cv_prog_cc_g+set}" = set; then
3231 echo $ECHO_N "(cached) $ECHO_C" >&6
3232 else
3233 cat >conftest.$ac_ext <<_ACEOF
3234 /* confdefs.h. */
3235 _ACEOF
3236 cat confdefs.h >>conftest.$ac_ext
3237 cat >>conftest.$ac_ext <<_ACEOF
3238 /* end confdefs.h. */
3239
3240 int
3241 main ()
3242 {
3243
3244 ;
3245 return 0;
3246 }
3247 _ACEOF
3248 rm -f conftest.$ac_objext
3249 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3250 (eval $ac_compile) 2>conftest.er1
3251 ac_status=$?
3252 grep -v '^ *+' conftest.er1 >conftest.err
3253 rm -f conftest.er1
3254 cat conftest.err >&5
3255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3256 (exit $ac_status); } &&
3257 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3259 (eval $ac_try) 2>&5
3260 ac_status=$?
3261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3262 (exit $ac_status); }; } &&
3263 { ac_try='test -s conftest.$ac_objext'
3264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3265 (eval $ac_try) 2>&5
3266 ac_status=$?
3267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3268 (exit $ac_status); }; }; then
3269 ac_cv_prog_cc_g=yes
3270 else
3271 echo "$as_me: failed program was:" >&5
3272 sed 's/^/| /' conftest.$ac_ext >&5
3273
3274 ac_cv_prog_cc_g=no
3275 fi
3276 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3277 fi
3278 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3279 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
3280 if test "$ac_test_CFLAGS" = set; then
3281 CFLAGS=$ac_save_CFLAGS
3282 elif test $ac_cv_prog_cc_g = yes; then
3283 if test "$GCC" = yes; then
3284 CFLAGS="-g -O2"
3285 else
3286 CFLAGS="-g"
3287 fi
3288 else
3289 if test "$GCC" = yes; then
3290 CFLAGS="-O2"
3291 else
3292 CFLAGS=
3293 fi
3294 fi
3295 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3296 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3297 if test "${ac_cv_prog_cc_stdc+set}" = set; then
3298 echo $ECHO_N "(cached) $ECHO_C" >&6
3299 else
3300 ac_cv_prog_cc_stdc=no
3301 ac_save_CC=$CC
3302 cat >conftest.$ac_ext <<_ACEOF
3303 /* confdefs.h. */
3304 _ACEOF
3305 cat confdefs.h >>conftest.$ac_ext
3306 cat >>conftest.$ac_ext <<_ACEOF
3307 /* end confdefs.h. */
3308 #include <stdarg.h>
3309 #include <stdio.h>
3310 #include <sys/types.h>
3311 #include <sys/stat.h>
3312 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3313 struct buf { int x; };
3314 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3315 static char *e (p, i)
3316 char **p;
3317 int i;
3318 {
3319 return p[i];
3320 }
3321 static char *f (char * (*g) (char **, int), char **p, ...)
3322 {
3323 char *s;
3324 va_list v;
3325 va_start (v,p);
3326 s = g (p, va_arg (v,int));
3327 va_end (v);
3328 return s;
3329 }
3330
3331 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3332 function prototypes and stuff, but not '\xHH' hex character constants.
3333 These don't provoke an error unfortunately, instead are silently treated
3334 as 'x'. The following induces an error, until -std1 is added to get
3335 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3336 array size at least. It's necessary to write '\x00'==0 to get something
3337 that's true only with -std1. */
3338 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3339
3340 int test (int i, double x);
3341 struct s1 {int (*f) (int a);};
3342 struct s2 {int (*f) (double a);};
3343 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3344 int argc;
3345 char **argv;
3346 int
3347 main ()
3348 {
3349 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3350 ;
3351 return 0;
3352 }
3353 _ACEOF
3354 # Don't try gcc -ansi; that turns off useful extensions and
3355 # breaks some systems' header files.
3356 # AIX -qlanglvl=ansi
3357 # Ultrix and OSF/1 -std1
3358 # HP-UX 10.20 and later -Ae
3359 # HP-UX older versions -Aa -D_HPUX_SOURCE
3360 # SVR4 -Xc -D__EXTENSIONS__
3361 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3362 do
3363 CC="$ac_save_CC $ac_arg"
3364 rm -f conftest.$ac_objext
3365 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3366 (eval $ac_compile) 2>conftest.er1
3367 ac_status=$?
3368 grep -v '^ *+' conftest.er1 >conftest.err
3369 rm -f conftest.er1
3370 cat conftest.err >&5
3371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3372 (exit $ac_status); } &&
3373 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3375 (eval $ac_try) 2>&5
3376 ac_status=$?
3377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3378 (exit $ac_status); }; } &&
3379 { ac_try='test -s conftest.$ac_objext'
3380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3381 (eval $ac_try) 2>&5
3382 ac_status=$?
3383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3384 (exit $ac_status); }; }; then
3385 ac_cv_prog_cc_stdc=$ac_arg
3386 break
3387 else
3388 echo "$as_me: failed program was:" >&5
3389 sed 's/^/| /' conftest.$ac_ext >&5
3390
3391 fi
3392 rm -f conftest.err conftest.$ac_objext
3393 done
3394 rm -f conftest.$ac_ext conftest.$ac_objext
3395 CC=$ac_save_CC
3396
3397 fi
3398
3399 case "x$ac_cv_prog_cc_stdc" in
3400 x|xno)
3401 echo "$as_me:$LINENO: result: none needed" >&5
3402 echo "${ECHO_T}none needed" >&6 ;;
3403 *)
3404 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3405 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3406 CC="$CC $ac_cv_prog_cc_stdc" ;;
3407 esac
3408
3409 # Some people use a C++ compiler to compile C. Since we use `exit',
3410 # in C++ we need to declare it. In case someone uses the same compiler
3411 # for both compiling C and C++ we need to have the C++ compiler decide
3412 # the declaration of exit, since it's the most demanding environment.
3413 cat >conftest.$ac_ext <<_ACEOF
3414 #ifndef __cplusplus
3415 choke me
3416 #endif
3417 _ACEOF
3418 rm -f conftest.$ac_objext
3419 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3420 (eval $ac_compile) 2>conftest.er1
3421 ac_status=$?
3422 grep -v '^ *+' conftest.er1 >conftest.err
3423 rm -f conftest.er1
3424 cat conftest.err >&5
3425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3426 (exit $ac_status); } &&
3427 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3429 (eval $ac_try) 2>&5
3430 ac_status=$?
3431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3432 (exit $ac_status); }; } &&
3433 { ac_try='test -s conftest.$ac_objext'
3434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3435 (eval $ac_try) 2>&5
3436 ac_status=$?
3437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3438 (exit $ac_status); }; }; then
3439 for ac_declaration in \
3440 '' \
3441 'extern "C" void std::exit (int) throw (); using std::exit;' \
3442 'extern "C" void std::exit (int); using std::exit;' \
3443 'extern "C" void exit (int) throw ();' \
3444 'extern "C" void exit (int);' \
3445 'void exit (int);'
3446 do
3447 cat >conftest.$ac_ext <<_ACEOF
3448 /* confdefs.h. */
3449 _ACEOF
3450 cat confdefs.h >>conftest.$ac_ext
3451 cat >>conftest.$ac_ext <<_ACEOF
3452 /* end confdefs.h. */
3453 $ac_declaration
3454 #include <stdlib.h>
3455 int
3456 main ()
3457 {
3458 exit (42);
3459 ;
3460 return 0;
3461 }
3462 _ACEOF
3463 rm -f conftest.$ac_objext
3464 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3465 (eval $ac_compile) 2>conftest.er1
3466 ac_status=$?
3467 grep -v '^ *+' conftest.er1 >conftest.err
3468 rm -f conftest.er1
3469 cat conftest.err >&5
3470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3471 (exit $ac_status); } &&
3472 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3474 (eval $ac_try) 2>&5
3475 ac_status=$?
3476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3477 (exit $ac_status); }; } &&
3478 { ac_try='test -s conftest.$ac_objext'
3479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3480 (eval $ac_try) 2>&5
3481 ac_status=$?
3482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3483 (exit $ac_status); }; }; then
3484 :
3485 else
3486 echo "$as_me: failed program was:" >&5
3487 sed 's/^/| /' conftest.$ac_ext >&5
3488
3489 continue
3490 fi
3491 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3492 cat >conftest.$ac_ext <<_ACEOF
3493 /* confdefs.h. */
3494 _ACEOF
3495 cat confdefs.h >>conftest.$ac_ext
3496 cat >>conftest.$ac_ext <<_ACEOF
3497 /* end confdefs.h. */
3498 $ac_declaration
3499 int
3500 main ()
3501 {
3502 exit (42);
3503 ;
3504 return 0;
3505 }
3506 _ACEOF
3507 rm -f conftest.$ac_objext
3508 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3509 (eval $ac_compile) 2>conftest.er1
3510 ac_status=$?
3511 grep -v '^ *+' conftest.er1 >conftest.err
3512 rm -f conftest.er1
3513 cat conftest.err >&5
3514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3515 (exit $ac_status); } &&
3516 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3518 (eval $ac_try) 2>&5
3519 ac_status=$?
3520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3521 (exit $ac_status); }; } &&
3522 { ac_try='test -s conftest.$ac_objext'
3523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3524 (eval $ac_try) 2>&5
3525 ac_status=$?
3526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3527 (exit $ac_status); }; }; then
3528 break
3529 else
3530 echo "$as_me: failed program was:" >&5
3531 sed 's/^/| /' conftest.$ac_ext >&5
3532
3533 fi
3534 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3535 done
3536 rm -f conftest*
3537 if test -n "$ac_declaration"; then
3538 echo '#ifdef __cplusplus' >>confdefs.h
3539 echo $ac_declaration >>confdefs.h
3540 echo '#endif' >>confdefs.h
3541 fi
3542
3543 else
3544 echo "$as_me: failed program was:" >&5
3545 sed 's/^/| /' conftest.$ac_ext >&5
3546
3547 fi
3548 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3549 ac_ext=c
3550 ac_cpp='$CPP $CPPFLAGS'
3551 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3552 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3553 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3554
3555 # Find a good install program. We prefer a C program (faster),
3556 # so one script is as good as another. But avoid the broken or
3557 # incompatible versions:
3558 # SysV /etc/install, /usr/sbin/install
3559 # SunOS /usr/etc/install
3560 # IRIX /sbin/install
3561 # AIX /bin/install
3562 # AmigaOS /C/install, which installs bootblocks on floppy discs
3563 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3564 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3565 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3566 # OS/2's system install, which has a completely different semantic
3567 # ./install, which can be erroneously created by make from ./install.sh.
3568 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3569 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
3570 if test -z "$INSTALL"; then
3571 if test "${ac_cv_path_install+set}" = set; then
3572 echo $ECHO_N "(cached) $ECHO_C" >&6
3573 else
3574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3575 for as_dir in $PATH
3576 do
3577 IFS=$as_save_IFS
3578 test -z "$as_dir" && as_dir=.
3579 # Account for people who put trailing slashes in PATH elements.
3580 case $as_dir/ in
3581 ./ | .// | /cC/* | \
3582 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3583 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3584 /usr/ucb/* ) ;;
3585 *)
3586 # OSF1 and SCO ODT 3.0 have their own names for install.
3587 # Don't use installbsd from OSF since it installs stuff as root
3588 # by default.
3589 for ac_prog in ginstall scoinst install; do
3590 for ac_exec_ext in '' $ac_executable_extensions; do
3591 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3592 if test $ac_prog = install &&
3593 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3594 # AIX install. It has an incompatible calling convention.
3595 :
3596 elif test $ac_prog = install &&
3597 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3598 # program-specific install script used by HP pwplus--don't use.
3599 :
3600 else
3601 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3602 break 3
3603 fi
3604 fi
3605 done
3606 done
3607 ;;
3608 esac
3609 done
3610
3611
3612 fi
3613 if test "${ac_cv_path_install+set}" = set; then
3614 INSTALL=$ac_cv_path_install
3615 else
3616 # As a last resort, use the slow shell script. We don't cache a
3617 # path for INSTALL within a source directory, because that will
3618 # break other packages using the cache if that directory is
3619 # removed, or if the path is relative.
3620 INSTALL=$ac_install_sh
3621 fi
3622 fi
3623 echo "$as_me:$LINENO: result: $INSTALL" >&5
3624 echo "${ECHO_T}$INSTALL" >&6
3625
3626 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3627 # It thinks the first close brace ends the variable substitution.
3628 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3629
3630 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3631
3632 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3633
3634 echo "$as_me:$LINENO: checking whether ln -s works" >&5
3635 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3636 LN_S=$as_ln_s
3637 if test "$LN_S" = "ln -s"; then
3638 echo "$as_me:$LINENO: result: yes" >&5
3639 echo "${ECHO_T}yes" >&6
3640 else
3641 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
3642 echo "${ECHO_T}no, using $LN_S" >&6
3643 fi
3644
3645 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3646 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3647 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
3648 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3649 echo $ECHO_N "(cached) $ECHO_C" >&6
3650 else
3651 cat >conftest.make <<\_ACEOF
3652 all:
3653 @echo 'ac_maketemp="$(MAKE)"'
3654 _ACEOF
3655 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3656 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3657 if test -n "$ac_maketemp"; then
3658 eval ac_cv_prog_make_${ac_make}_set=yes
3659 else
3660 eval ac_cv_prog_make_${ac_make}_set=no
3661 fi
3662 rm -f conftest.make
3663 fi
3664 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3665 echo "$as_me:$LINENO: result: yes" >&5
3666 echo "${ECHO_T}yes" >&6
3667 SET_MAKE=
3668 else
3669 echo "$as_me:$LINENO: result: no" >&5
3670 echo "${ECHO_T}no" >&6
3671 SET_MAKE="MAKE=${MAKE-make}"
3672 fi
3673
3674 ac_ext=c
3675 ac_cpp='$CPP $CPPFLAGS'
3676 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3677 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3678 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3679 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3680 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3681 # On Suns, sometimes $CPP names a directory.
3682 if test -n "$CPP" && test -d "$CPP"; then
3683 CPP=
3684 fi
3685 if test -z "$CPP"; then
3686 if test "${ac_cv_prog_CPP+set}" = set; then
3687 echo $ECHO_N "(cached) $ECHO_C" >&6
3688 else
3689 # Double quotes because CPP needs to be expanded
3690 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3691 do
3692 ac_preproc_ok=false
3693 for ac_c_preproc_warn_flag in '' yes
3694 do
3695 # Use a header file that comes with gcc, so configuring glibc
3696 # with a fresh cross-compiler works.
3697 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3698 # <limits.h> exists even on freestanding compilers.
3699 # On the NeXT, cc -E runs the code through the compiler's parser,
3700 # not just through cpp. "Syntax error" is here to catch this case.
3701 cat >conftest.$ac_ext <<_ACEOF
3702 /* confdefs.h. */
3703 _ACEOF
3704 cat confdefs.h >>conftest.$ac_ext
3705 cat >>conftest.$ac_ext <<_ACEOF
3706 /* end confdefs.h. */
3707 #ifdef __STDC__
3708 # include <limits.h>
3709 #else
3710 # include <assert.h>
3711 #endif
3712 Syntax error
3713 _ACEOF
3714 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3715 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3716 ac_status=$?
3717 grep -v '^ *+' conftest.er1 >conftest.err
3718 rm -f conftest.er1
3719 cat conftest.err >&5
3720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3721 (exit $ac_status); } >/dev/null; then
3722 if test -s conftest.err; then
3723 ac_cpp_err=$ac_c_preproc_warn_flag
3724 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3725 else
3726 ac_cpp_err=
3727 fi
3728 else
3729 ac_cpp_err=yes
3730 fi
3731 if test -z "$ac_cpp_err"; then
3732 :
3733 else
3734 echo "$as_me: failed program was:" >&5
3735 sed 's/^/| /' conftest.$ac_ext >&5
3736
3737 # Broken: fails on valid input.
3738 continue
3739 fi
3740 rm -f conftest.err conftest.$ac_ext
3741
3742 # OK, works on sane cases. Now check whether non-existent headers
3743 # can be detected and how.
3744 cat >conftest.$ac_ext <<_ACEOF
3745 /* confdefs.h. */
3746 _ACEOF
3747 cat confdefs.h >>conftest.$ac_ext
3748 cat >>conftest.$ac_ext <<_ACEOF
3749 /* end confdefs.h. */
3750 #include <ac_nonexistent.h>
3751 _ACEOF
3752 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3753 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3754 ac_status=$?
3755 grep -v '^ *+' conftest.er1 >conftest.err
3756 rm -f conftest.er1
3757 cat conftest.err >&5
3758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3759 (exit $ac_status); } >/dev/null; then
3760 if test -s conftest.err; then
3761 ac_cpp_err=$ac_c_preproc_warn_flag
3762 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3763 else
3764 ac_cpp_err=
3765 fi
3766 else
3767 ac_cpp_err=yes
3768 fi
3769 if test -z "$ac_cpp_err"; then
3770 # Broken: success on invalid input.
3771 continue
3772 else
3773 echo "$as_me: failed program was:" >&5
3774 sed 's/^/| /' conftest.$ac_ext >&5
3775
3776 # Passes both tests.
3777 ac_preproc_ok=:
3778 break
3779 fi
3780 rm -f conftest.err conftest.$ac_ext
3781
3782 done
3783 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3784 rm -f conftest.err conftest.$ac_ext
3785 if $ac_preproc_ok; then
3786 break
3787 fi
3788
3789 done
3790 ac_cv_prog_CPP=$CPP
3791
3792 fi
3793 CPP=$ac_cv_prog_CPP
3794 else
3795 ac_cv_prog_CPP=$CPP
3796 fi
3797 echo "$as_me:$LINENO: result: $CPP" >&5
3798 echo "${ECHO_T}$CPP" >&6
3799 ac_preproc_ok=false
3800 for ac_c_preproc_warn_flag in '' yes
3801 do
3802 # Use a header file that comes with gcc, so configuring glibc
3803 # with a fresh cross-compiler works.
3804 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3805 # <limits.h> exists even on freestanding compilers.
3806 # On the NeXT, cc -E runs the code through the compiler's parser,
3807 # not just through cpp. "Syntax error" is here to catch this case.
3808 cat >conftest.$ac_ext <<_ACEOF
3809 /* confdefs.h. */
3810 _ACEOF
3811 cat confdefs.h >>conftest.$ac_ext
3812 cat >>conftest.$ac_ext <<_ACEOF
3813 /* end confdefs.h. */
3814 #ifdef __STDC__
3815 # include <limits.h>
3816 #else
3817 # include <assert.h>
3818 #endif
3819 Syntax error
3820 _ACEOF
3821 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3822 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3823 ac_status=$?
3824 grep -v '^ *+' conftest.er1 >conftest.err
3825 rm -f conftest.er1
3826 cat conftest.err >&5
3827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3828 (exit $ac_status); } >/dev/null; then
3829 if test -s conftest.err; then
3830 ac_cpp_err=$ac_c_preproc_warn_flag
3831 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3832 else
3833 ac_cpp_err=
3834 fi
3835 else
3836 ac_cpp_err=yes
3837 fi
3838 if test -z "$ac_cpp_err"; then
3839 :
3840 else
3841 echo "$as_me: failed program was:" >&5
3842 sed 's/^/| /' conftest.$ac_ext >&5
3843
3844 # Broken: fails on valid input.
3845 continue
3846 fi
3847 rm -f conftest.err conftest.$ac_ext
3848
3849 # OK, works on sane cases. Now check whether non-existent headers
3850 # can be detected and how.
3851 cat >conftest.$ac_ext <<_ACEOF
3852 /* confdefs.h. */
3853 _ACEOF
3854 cat confdefs.h >>conftest.$ac_ext
3855 cat >>conftest.$ac_ext <<_ACEOF
3856 /* end confdefs.h. */
3857 #include <ac_nonexistent.h>
3858 _ACEOF
3859 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3860 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3861 ac_status=$?
3862 grep -v '^ *+' conftest.er1 >conftest.err
3863 rm -f conftest.er1
3864 cat conftest.err >&5
3865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3866 (exit $ac_status); } >/dev/null; then
3867 if test -s conftest.err; then
3868 ac_cpp_err=$ac_c_preproc_warn_flag
3869 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3870 else
3871 ac_cpp_err=
3872 fi
3873 else
3874 ac_cpp_err=yes
3875 fi
3876 if test -z "$ac_cpp_err"; then
3877 # Broken: success on invalid input.
3878 continue
3879 else
3880 echo "$as_me: failed program was:" >&5
3881 sed 's/^/| /' conftest.$ac_ext >&5
3882
3883 # Passes both tests.
3884 ac_preproc_ok=:
3885 break
3886 fi
3887 rm -f conftest.err conftest.$ac_ext
3888
3889 done
3890 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3891 rm -f conftest.err conftest.$ac_ext
3892 if $ac_preproc_ok; then
3893 :
3894 else
3895 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3896 See \`config.log' for more details." >&5
3897 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3898 See \`config.log' for more details." >&2;}
3899 { (exit 1); exit 1; }; }
3900 fi
3901
3902 ac_ext=c
3903 ac_cpp='$CPP $CPPFLAGS'
3904 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3905 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3906 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3907
3908
3909 echo "$as_me:$LINENO: checking for egrep" >&5
3910 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3911 if test "${ac_cv_prog_egrep+set}" = set; then
3912 echo $ECHO_N "(cached) $ECHO_C" >&6
3913 else
3914 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3915 then ac_cv_prog_egrep='grep -E'
3916 else ac_cv_prog_egrep='egrep'
3917 fi
3918 fi
3919 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3920 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3921 EGREP=$ac_cv_prog_egrep
3922
3923
3924 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3925 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3926 if test "${ac_cv_header_stdc+set}" = set; then
3927 echo $ECHO_N "(cached) $ECHO_C" >&6
3928 else
3929 cat >conftest.$ac_ext <<_ACEOF
3930 /* confdefs.h. */
3931 _ACEOF
3932 cat confdefs.h >>conftest.$ac_ext
3933 cat >>conftest.$ac_ext <<_ACEOF
3934 /* end confdefs.h. */
3935 #include <stdlib.h>
3936 #include <stdarg.h>
3937 #include <string.h>
3938 #include <float.h>
3939
3940 int
3941 main ()
3942 {
3943
3944 ;
3945 return 0;
3946 }
3947 _ACEOF
3948 rm -f conftest.$ac_objext
3949 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3950 (eval $ac_compile) 2>conftest.er1
3951 ac_status=$?
3952 grep -v '^ *+' conftest.er1 >conftest.err
3953 rm -f conftest.er1
3954 cat conftest.err >&5
3955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3956 (exit $ac_status); } &&
3957 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3959 (eval $ac_try) 2>&5
3960 ac_status=$?
3961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3962 (exit $ac_status); }; } &&
3963 { ac_try='test -s conftest.$ac_objext'
3964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3965 (eval $ac_try) 2>&5
3966 ac_status=$?
3967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3968 (exit $ac_status); }; }; then
3969 ac_cv_header_stdc=yes
3970 else
3971 echo "$as_me: failed program was:" >&5
3972 sed 's/^/| /' conftest.$ac_ext >&5
3973
3974 ac_cv_header_stdc=no
3975 fi
3976 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3977
3978 if test $ac_cv_header_stdc = yes; then
3979 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3980 cat >conftest.$ac_ext <<_ACEOF
3981 /* confdefs.h. */
3982 _ACEOF
3983 cat confdefs.h >>conftest.$ac_ext
3984 cat >>conftest.$ac_ext <<_ACEOF
3985 /* end confdefs.h. */
3986 #include <string.h>
3987
3988 _ACEOF
3989 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3990 $EGREP "memchr" >/dev/null 2>&1; then
3991 :
3992 else
3993 ac_cv_header_stdc=no
3994 fi
3995 rm -f conftest*
3996
3997 fi
3998
3999 if test $ac_cv_header_stdc = yes; then
4000 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4001 cat >conftest.$ac_ext <<_ACEOF
4002 /* confdefs.h. */
4003 _ACEOF
4004 cat confdefs.h >>conftest.$ac_ext
4005 cat >>conftest.$ac_ext <<_ACEOF
4006 /* end confdefs.h. */
4007 #include <stdlib.h>
4008
4009 _ACEOF
4010 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4011 $EGREP "free" >/dev/null 2>&1; then
4012 :
4013 else
4014 ac_cv_header_stdc=no
4015 fi
4016 rm -f conftest*
4017
4018 fi
4019
4020 if test $ac_cv_header_stdc = yes; then
4021 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4022 if test "$cross_compiling" = yes; then
4023 :
4024 else
4025 cat >conftest.$ac_ext <<_ACEOF
4026 /* confdefs.h. */
4027 _ACEOF
4028 cat confdefs.h >>conftest.$ac_ext
4029 cat >>conftest.$ac_ext <<_ACEOF
4030 /* end confdefs.h. */
4031 #include <ctype.h>
4032 #if ((' ' & 0x0FF) == 0x020)
4033 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4034 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4035 #else
4036 # define ISLOWER(c) \
4037 (('a' <= (c) && (c) <= 'i') \
4038 || ('j' <= (c) && (c) <= 'r') \
4039 || ('s' <= (c) && (c) <= 'z'))
4040 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4041 #endif
4042
4043 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4044 int
4045 main ()
4046 {
4047 int i;
4048 for (i = 0; i < 256; i++)
4049 if (XOR (islower (i), ISLOWER (i))
4050 || toupper (i) != TOUPPER (i))
4051 exit(2);
4052 exit (0);
4053 }
4054 _ACEOF
4055 rm -f conftest$ac_exeext
4056 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4057 (eval $ac_link) 2>&5
4058 ac_status=$?
4059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4060 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4062 (eval $ac_try) 2>&5
4063 ac_status=$?
4064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4065 (exit $ac_status); }; }; then
4066 :
4067 else
4068 echo "$as_me: program exited with status $ac_status" >&5
4069 echo "$as_me: failed program was:" >&5
4070 sed 's/^/| /' conftest.$ac_ext >&5
4071
4072 ( exit $ac_status )
4073 ac_cv_header_stdc=no
4074 fi
4075 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4076 fi
4077 fi
4078 fi
4079 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4080 echo "${ECHO_T}$ac_cv_header_stdc" >&6
4081 if test $ac_cv_header_stdc = yes; then
4082
4083 cat >>confdefs.h <<\_ACEOF
4084 #define STDC_HEADERS 1
4085 _ACEOF
4086
4087 fi
4088
4089 # Check whether --enable-shared or --disable-shared was given.
4090 if test "${enable_shared+set}" = set; then
4091 enableval="$enable_shared"
4092 p=${PACKAGE-default}
4093 case $enableval in
4094 yes) enable_shared=yes ;;
4095 no) enable_shared=no ;;
4096 *)
4097 enable_shared=no
4098 # Look at the argument we got. We use all the common list separators.
4099 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4100 for pkg in $enableval; do
4101 IFS="$lt_save_ifs"
4102 if test "X$pkg" = "X$p"; then
4103 enable_shared=yes
4104 fi
4105 done
4106 IFS="$lt_save_ifs"
4107 ;;
4108 esac
4109 else
4110 enable_shared=yes
4111 fi;
4112
4113 # Check whether --enable-static or --disable-static was given.
4114 if test "${enable_static+set}" = set; then
4115 enableval="$enable_static"
4116 p=${PACKAGE-default}
4117 case $enableval in
4118 yes) enable_static=yes ;;
4119 no) enable_static=no ;;
4120 *)
4121 enable_static=no
4122 # Look at the argument we got. We use all the common list separators.
4123 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4124 for pkg in $enableval; do
4125 IFS="$lt_save_ifs"
4126 if test "X$pkg" = "X$p"; then
4127 enable_static=yes
4128 fi
4129 done
4130 IFS="$lt_save_ifs"
4131 ;;
4132 esac
4133 else
4134 enable_static=yes
4135 fi;
4136
4137 # Check whether --enable-fast-install or --disable-fast-install was given.
4138 if test "${enable_fast_install+set}" = set; then
4139 enableval="$enable_fast_install"
4140 p=${PACKAGE-default}
4141 case $enableval in
4142 yes) enable_fast_install=yes ;;
4143 no) enable_fast_install=no ;;
4144 *)
4145 enable_fast_install=no
4146 # Look at the argument we got. We use all the common list separators.
4147 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4148 for pkg in $enableval; do
4149 IFS="$lt_save_ifs"
4150 if test "X$pkg" = "X$p"; then
4151 enable_fast_install=yes
4152 fi
4153 done
4154 IFS="$lt_save_ifs"
4155 ;;
4156 esac
4157 else
4158 enable_fast_install=yes
4159 fi;
4160
4161 # Make sure we can run config.sub.
4162 $ac_config_sub sun4 >/dev/null 2>&1 ||
4163 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
4164 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
4165 { (exit 1); exit 1; }; }
4166
4167 echo "$as_me:$LINENO: checking build system type" >&5
4168 echo $ECHO_N "checking build system type... $ECHO_C" >&6
4169 if test "${ac_cv_build+set}" = set; then
4170 echo $ECHO_N "(cached) $ECHO_C" >&6
4171 else
4172 ac_cv_build_alias=$build_alias
4173 test -z "$ac_cv_build_alias" &&
4174 ac_cv_build_alias=`$ac_config_guess`
4175 test -z "$ac_cv_build_alias" &&
4176 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
4177 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
4178 { (exit 1); exit 1; }; }
4179 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
4180 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
4181 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
4182 { (exit 1); exit 1; }; }
4183
4184 fi
4185 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
4186 echo "${ECHO_T}$ac_cv_build" >&6
4187 build=$ac_cv_build
4188 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
4189 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
4190 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
4191
4192
4193 echo "$as_me:$LINENO: checking host system type" >&5
4194 echo $ECHO_N "checking host system type... $ECHO_C" >&6
4195 if test "${ac_cv_host+set}" = set; then
4196 echo $ECHO_N "(cached) $ECHO_C" >&6
4197 else
4198 ac_cv_host_alias=$host_alias
4199 test -z "$ac_cv_host_alias" &&
4200 ac_cv_host_alias=$ac_cv_build_alias
4201 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
4202 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
4203 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
4204 { (exit 1); exit 1; }; }
4205
4206 fi
4207 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
4208 echo "${ECHO_T}$ac_cv_host" >&6
4209 host=$ac_cv_host
4210 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
4211 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
4212 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
4213
4214
4215 echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
4216 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
4217 if test "${lt_cv_path_SED+set}" = set; then
4218 echo $ECHO_N "(cached) $ECHO_C" >&6
4219 else
4220 # Loop through the user's path and test for sed and gsed.
4221 # Then use that list of sed's as ones to test for truncation.
4222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4223 for as_dir in $PATH
4224 do
4225 IFS=$as_save_IFS
4226 test -z "$as_dir" && as_dir=.
4227 for lt_ac_prog in sed gsed; do
4228 for ac_exec_ext in '' $ac_executable_extensions; do
4229 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
4230 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
4231 fi
4232 done
4233 done
4234 done
4235 lt_ac_max=0
4236 lt_ac_count=0
4237 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
4238 # along with /bin/sed that truncates output.
4239 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
4240 test ! -f $lt_ac_sed && continue
4241 cat /dev/null > conftest.in
4242 lt_ac_count=0
4243 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
4244 # Check for GNU sed and select it if it is found.
4245 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
4246 lt_cv_path_SED=$lt_ac_sed
4247 break
4248 fi
4249 while true; do
4250 cat conftest.in conftest.in >conftest.tmp
4251 mv conftest.tmp conftest.in
4252 cp conftest.in conftest.nl
4253 echo >>conftest.nl
4254 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
4255 cmp -s conftest.out conftest.nl || break
4256 # 10000 chars as input seems more than enough
4257 test $lt_ac_count -gt 10 && break
4258 lt_ac_count=`expr $lt_ac_count + 1`
4259 if test $lt_ac_count -gt $lt_ac_max; then
4260 lt_ac_max=$lt_ac_count
4261 lt_cv_path_SED=$lt_ac_sed
4262 fi
4263 done
4264 done
4265
4266 fi
4267
4268 SED=$lt_cv_path_SED
4269 echo "$as_me:$LINENO: result: $SED" >&5
4270 echo "${ECHO_T}$SED" >&6
4271
4272
4273 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4274 if test "${with_gnu_ld+set}" = set; then
4275 withval="$with_gnu_ld"
4276 test "$withval" = no || with_gnu_ld=yes
4277 else
4278 with_gnu_ld=no
4279 fi;
4280 ac_prog=ld
4281 if test "$GCC" = yes; then
4282 # Check if gcc -print-prog-name=ld gives a path.
4283 echo "$as_me:$LINENO: checking for ld used by $CC" >&5
4284 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
4285 case $host in
4286 *-*-mingw*)
4287 # gcc leaves a trailing carriage return which upsets mingw
4288 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4289 *)
4290 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4291 esac
4292 case $ac_prog in
4293 # Accept absolute paths.
4294 [\\/]* | ?:[\\/]*)
4295 re_direlt='/[^/][^/]*/\.\./'
4296 # Canonicalize the pathname of ld
4297 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
4298 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4299 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
4300 done
4301 test -z "$LD" && LD="$ac_prog"
4302 ;;
4303 "")
4304 # If it fails, then pretend we aren't using GCC.
4305 ac_prog=ld
4306 ;;
4307 *)
4308 # If it is relative, then search for the first ld in PATH.
4309 with_gnu_ld=unknown
4310 ;;
4311 esac
4312 elif test "$with_gnu_ld" = yes; then
4313 echo "$as_me:$LINENO: checking for GNU ld" >&5
4314 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4315 else
4316 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4317 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4318 fi
4319 if test "${lt_cv_path_LD+set}" = set; then
4320 echo $ECHO_N "(cached) $ECHO_C" >&6
4321 else
4322 if test -z "$LD"; then
4323 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4324 for ac_dir in $PATH; do
4325 IFS="$lt_save_ifs"
4326 test -z "$ac_dir" && ac_dir=.
4327 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4328 lt_cv_path_LD="$ac_dir/$ac_prog"
4329 # Check to see if the program is GNU ld. I'd rather use --version,
4330 # but apparently some variants of GNU ld only accept -v.
4331 # Break only if it was the GNU/non-GNU ld that we prefer.
4332 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4333 *GNU* | *'with BFD'*)
4334 test "$with_gnu_ld" != no && break
4335 ;;
4336 *)
4337 test "$with_gnu_ld" != yes && break
4338 ;;
4339 esac
4340 fi
4341 done
4342 IFS="$lt_save_ifs"
4343 else
4344 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4345 fi
4346 fi
4347
4348 LD="$lt_cv_path_LD"
4349 if test -n "$LD"; then
4350 echo "$as_me:$LINENO: result: $LD" >&5
4351 echo "${ECHO_T}$LD" >&6
4352 else
4353 echo "$as_me:$LINENO: result: no" >&5
4354 echo "${ECHO_T}no" >&6
4355 fi
4356 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4357 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4358 { (exit 1); exit 1; }; }
4359 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4360 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4361 if test "${lt_cv_prog_gnu_ld+set}" = set; then
4362 echo $ECHO_N "(cached) $ECHO_C" >&6
4363 else
4364 # I'd rather use --version here, but apparently some GNU lds only accept -v.
4365 case `$LD -v 2>&1 </dev/null` in
4366 *GNU* | *'with BFD'*)
4367 lt_cv_prog_gnu_ld=yes
4368 ;;
4369 *)
4370 lt_cv_prog_gnu_ld=no
4371 ;;
4372 esac
4373 fi
4374 echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
4375 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
4376 with_gnu_ld=$lt_cv_prog_gnu_ld
4377
4378
4379 echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
4380 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
4381 if test "${lt_cv_ld_reload_flag+set}" = set; then
4382 echo $ECHO_N "(cached) $ECHO_C" >&6
4383 else
4384 lt_cv_ld_reload_flag='-r'
4385 fi
4386 echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
4387 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
4388 reload_flag=$lt_cv_ld_reload_flag
4389 case $reload_flag in
4390 "" | " "*) ;;
4391 *) reload_flag=" $reload_flag" ;;
4392 esac
4393 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4394 case $host_os in
4395 darwin*)
4396 if test "$GCC" = yes; then
4397 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4398 else
4399 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4400 fi
4401 ;;
4402 esac
4403
4404 echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
4405 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
4406 if test "${lt_cv_path_NM+set}" = set; then
4407 echo $ECHO_N "(cached) $ECHO_C" >&6
4408 else
4409 if test -n "$NM"; then
4410 # Let the user override the test.
4411 lt_cv_path_NM="$NM"
4412 else
4413 lt_nm_to_check="${ac_tool_prefix}nm"
4414 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4415 lt_nm_to_check="$lt_nm_to_check nm"
4416 fi
4417 for lt_tmp_nm in $lt_nm_to_check; do
4418 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4419 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4420 IFS="$lt_save_ifs"
4421 test -z "$ac_dir" && ac_dir=.
4422 tmp_nm="$ac_dir/$lt_tmp_nm"
4423 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4424 # Check to see if the nm accepts a BSD-compat flag.
4425 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4426 # nm: unknown option "B" ignored
4427 # Tru64's nm complains that /dev/null is an invalid object file
4428 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4429 */dev/null* | *'Invalid file or object type'*)
4430 lt_cv_path_NM="$tmp_nm -B"
4431 break
4432 ;;
4433 *)
4434 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4435 */dev/null*)
4436 lt_cv_path_NM="$tmp_nm -p"
4437 break
4438 ;;
4439 *)
4440 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4441 continue # so that we can try to find one that supports BSD flags
4442 ;;
4443 esac
4444 ;;
4445 esac
4446 fi
4447 done
4448 IFS="$lt_save_ifs"
4449 done
4450 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4451 fi
4452 fi
4453 echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
4454 echo "${ECHO_T}$lt_cv_path_NM" >&6
4455 NM="$lt_cv_path_NM"
4456
4457 echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
4458 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
4459 if test "${lt_cv_deplibs_check_method+set}" = set; then
4460 echo $ECHO_N "(cached) $ECHO_C" >&6
4461 else
4462 lt_cv_file_magic_cmd='$MAGIC_CMD'
4463 lt_cv_file_magic_test_file=
4464 lt_cv_deplibs_check_method='unknown'
4465 # Need to set the preceding variable on all platforms that support
4466 # interlibrary dependencies.
4467 # 'none' -- dependencies not supported.
4468 # `unknown' -- same as none, but documents that we really don't know.
4469 # 'pass_all' -- all dependencies passed with no checks.
4470 # 'test_compile' -- check by making test program.
4471 # 'file_magic [[regex]]' -- check by looking for files in library path
4472 # which responds to the $file_magic_cmd with a given extended regex.
4473 # If you have `file' or equivalent on your system and you're not sure
4474 # whether `pass_all' will *always* work, you probably want this one.
4475
4476 case $host_os in
4477 aix4* | aix5*)
4478 lt_cv_deplibs_check_method=pass_all
4479 ;;
4480
4481 beos*)
4482 lt_cv_deplibs_check_method=pass_all
4483 ;;
4484
4485 bsdi[45]*)
4486 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
4487 lt_cv_file_magic_cmd='/usr/bin/file -L'
4488 lt_cv_file_magic_test_file=/shlib/libc.so
4489 ;;
4490
4491 cygwin*)
4492 # func_win32_libid is a shell function defined in ltmain.sh
4493 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4494 lt_cv_file_magic_cmd='func_win32_libid'
4495 ;;
4496
4497 mingw* | pw32*)
4498 # Base MSYS/MinGW do not provide the 'file' command needed by
4499 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
4500 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4501 lt_cv_file_magic_cmd='$OBJDUMP -f'
4502 ;;
4503
4504 darwin* | rhapsody*)
4505 lt_cv_deplibs_check_method=pass_all
4506 ;;
4507
4508 freebsd* | kfreebsd*-gnu | dragonfly*)
4509 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4510 case $host_cpu in
4511 i*86 )
4512 # Not sure whether the presence of OpenBSD here was a mistake.
4513 # Let's accept both of them until this is cleared up.
4514 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
4515 lt_cv_file_magic_cmd=/usr/bin/file
4516 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4517 ;;
4518 esac
4519 else
4520 lt_cv_deplibs_check_method=pass_all
4521 fi
4522 ;;
4523
4524 gnu*)
4525 lt_cv_deplibs_check_method=pass_all
4526 ;;
4527
4528 hpux10.20* | hpux11*)
4529 lt_cv_file_magic_cmd=/usr/bin/file
4530 case $host_cpu in
4531 ia64*)
4532 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
4533 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4534 ;;
4535 hppa*64*)
4536 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
4537 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4538 ;;
4539 *)
4540 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
4541 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4542 ;;
4543 esac
4544 ;;
4545
4546 interix3*)
4547 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4548 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
4549 ;;
4550
4551 irix5* | irix6* | nonstopux*)
4552 case $LD in
4553 *-32|*"-32 ") libmagic=32-bit;;
4554 *-n32|*"-n32 ") libmagic=N32;;
4555 *-64|*"-64 ") libmagic=64-bit;;
4556 *) libmagic=never-match;;
4557 esac
4558 lt_cv_deplibs_check_method=pass_all
4559 ;;
4560
4561 # This must be Linux ELF.
4562 linux*)
4563 lt_cv_deplibs_check_method=pass_all
4564 ;;
4565
4566 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
4567 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4568 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
4569 else
4570 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
4571 fi
4572 ;;
4573
4574 newos6*)
4575 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
4576 lt_cv_file_magic_cmd=/usr/bin/file
4577 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4578 ;;
4579
4580 nto-qnx*)
4581 lt_cv_deplibs_check_method=unknown
4582 ;;
4583
4584 openbsd*)
4585 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4586 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
4587 else
4588 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
4589 fi
4590 ;;
4591
4592 osf3* | osf4* | osf5*)
4593 lt_cv_deplibs_check_method=pass_all
4594 ;;
4595
4596 solaris*)
4597 lt_cv_deplibs_check_method=pass_all
4598 ;;
4599
4600 sysv4 | sysv4.3*)
4601 case $host_vendor in
4602 motorola)
4603 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
4604 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4605 ;;
4606 ncr)
4607 lt_cv_deplibs_check_method=pass_all
4608 ;;
4609 sequent)
4610 lt_cv_file_magic_cmd='/bin/file'
4611 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4612 ;;
4613 sni)
4614 lt_cv_file_magic_cmd='/bin/file'
4615 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4616 lt_cv_file_magic_test_file=/lib/libc.so
4617 ;;
4618 siemens)
4619 lt_cv_deplibs_check_method=pass_all
4620 ;;
4621 pc)
4622 lt_cv_deplibs_check_method=pass_all
4623 ;;
4624 esac
4625 ;;
4626
4627 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4628 lt_cv_deplibs_check_method=pass_all
4629 ;;
4630 esac
4631
4632 fi
4633 echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
4634 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
4635 file_magic_cmd=$lt_cv_file_magic_cmd
4636 deplibs_check_method=$lt_cv_deplibs_check_method
4637 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4638
4639
4640
4641
4642 # If no C compiler was specified, use CC.
4643 LTCC=${LTCC-"$CC"}
4644
4645 # If no C compiler flags were specified, use CFLAGS.
4646 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
4647
4648 # Allow CC to be a program name with arguments.
4649 compiler=$CC
4650
4651 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4652 if test "${enable_libtool_lock+set}" = set; then
4653 enableval="$enable_libtool_lock"
4654
4655 fi;
4656 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4657
4658 # Some flags need to be propagated to the compiler or linker for good
4659 # libtool support.
4660 case $host in
4661 ia64-*-hpux*)
4662 # Find out which ABI we are using.
4663 echo 'int i;' > conftest.$ac_ext
4664 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4665 (eval $ac_compile) 2>&5
4666 ac_status=$?
4667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4668 (exit $ac_status); }; then
4669 case `/usr/bin/file conftest.$ac_objext` in
4670 *ELF-32*)
4671 HPUX_IA64_MODE="32"
4672 ;;
4673 *ELF-64*)
4674 HPUX_IA64_MODE="64"
4675 ;;
4676 esac
4677 fi
4678 rm -rf conftest*
4679 ;;
4680 *-*-irix6*)
4681 # Find out which ABI we are using.
4682 echo '#line 4683 "configure"' > conftest.$ac_ext
4683 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4684 (eval $ac_compile) 2>&5
4685 ac_status=$?
4686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4687 (exit $ac_status); }; then
4688 if test "$lt_cv_prog_gnu_ld" = yes; then
4689 case `/usr/bin/file conftest.$ac_objext` in
4690 *32-bit*)
4691 LD="${LD-ld} -melf32bsmip"
4692 ;;
4693 *N32*)
4694 LD="${LD-ld} -melf32bmipn32"
4695 ;;
4696 *64-bit*)
4697 LD="${LD-ld} -melf64bmip"
4698 ;;
4699 esac
4700 else
4701 case `/usr/bin/file conftest.$ac_objext` in
4702 *32-bit*)
4703 LD="${LD-ld} -32"
4704 ;;
4705 *N32*)
4706 LD="${LD-ld} -n32"
4707 ;;
4708 *64-bit*)
4709 LD="${LD-ld} -64"
4710 ;;
4711 esac
4712 fi
4713 fi
4714 rm -rf conftest*
4715 ;;
4716
4717 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
4718 # Find out which ABI we are using.
4719 echo 'int i;' > conftest.$ac_ext
4720 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4721 (eval $ac_compile) 2>&5
4722 ac_status=$?
4723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4724 (exit $ac_status); }; then
4725 case `/usr/bin/file conftest.o` in
4726 *32-bit*)
4727 case $host in
4728 x86_64-*linux*)
4729 LD="${LD-ld} -m elf_i386"
4730 ;;
4731 ppc64-*linux*|powerpc64-*linux*)
4732 LD="${LD-ld} -m elf32ppclinux"
4733 ;;
4734 s390x-*linux*)
4735 LD="${LD-ld} -m elf_s390"
4736 ;;
4737 sparc64-*linux*)
4738 LD="${LD-ld} -m elf32_sparc"
4739 ;;
4740 esac
4741 ;;
4742 *64-bit*)
4743 case $host in
4744 x86_64-*linux*)
4745 LD="${LD-ld} -m elf_x86_64"
4746 ;;
4747 ppc*-*linux*|powerpc*-*linux*)
4748 LD="${LD-ld} -m elf64ppc"
4749 ;;
4750 s390*-*linux*)
4751 LD="${LD-ld} -m elf64_s390"
4752 ;;
4753 sparc*-*linux*)
4754 LD="${LD-ld} -m elf64_sparc"
4755 ;;
4756 esac
4757 ;;
4758 esac
4759 fi
4760 rm -rf conftest*
4761 ;;
4762
4763 *-*-sco3.2v5*)
4764 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4765 SAVE_CFLAGS="$CFLAGS"
4766 CFLAGS="$CFLAGS -belf"
4767 echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
4768 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
4769 if test "${lt_cv_cc_needs_belf+set}" = set; then
4770 echo $ECHO_N "(cached) $ECHO_C" >&6
4771 else
4772 ac_ext=c
4773 ac_cpp='$CPP $CPPFLAGS'
4774 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4775 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4776 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4777
4778 cat >conftest.$ac_ext <<_ACEOF
4779 /* confdefs.h. */
4780 _ACEOF
4781 cat confdefs.h >>conftest.$ac_ext
4782 cat >>conftest.$ac_ext <<_ACEOF
4783 /* end confdefs.h. */
4784
4785 int
4786 main ()
4787 {
4788
4789 ;
4790 return 0;
4791 }
4792 _ACEOF
4793 rm -f conftest.$ac_objext conftest$ac_exeext
4794 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4795 (eval $ac_link) 2>conftest.er1
4796 ac_status=$?
4797 grep -v '^ *+' conftest.er1 >conftest.err
4798 rm -f conftest.er1
4799 cat conftest.err >&5
4800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4801 (exit $ac_status); } &&
4802 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4804 (eval $ac_try) 2>&5
4805 ac_status=$?
4806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4807 (exit $ac_status); }; } &&
4808 { ac_try='test -s conftest$ac_exeext'
4809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4810 (eval $ac_try) 2>&5
4811 ac_status=$?
4812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4813 (exit $ac_status); }; }; then
4814 lt_cv_cc_needs_belf=yes
4815 else
4816 echo "$as_me: failed program was:" >&5
4817 sed 's/^/| /' conftest.$ac_ext >&5
4818
4819 lt_cv_cc_needs_belf=no
4820 fi
4821 rm -f conftest.err conftest.$ac_objext \
4822 conftest$ac_exeext conftest.$ac_ext
4823 ac_ext=c
4824 ac_cpp='$CPP $CPPFLAGS'
4825 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4826 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4827 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4828
4829 fi
4830 echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
4831 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
4832 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4833 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4834 CFLAGS="$SAVE_CFLAGS"
4835 fi
4836 ;;
4837 sparc*-*solaris*)
4838 # Find out which ABI we are using.
4839 echo 'int i;' > conftest.$ac_ext
4840 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4841 (eval $ac_compile) 2>&5
4842 ac_status=$?
4843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4844 (exit $ac_status); }; then
4845 case `/usr/bin/file conftest.o` in
4846 *64-bit*)
4847 case $lt_cv_prog_gnu_ld in
4848 yes*) LD="${LD-ld} -m elf64_sparc" ;;
4849 *) LD="${LD-ld} -64" ;;
4850 esac
4851 ;;
4852 esac
4853 fi
4854 rm -rf conftest*
4855 ;;
4856
4857
4858 esac
4859
4860 need_locks="$enable_libtool_lock"
4861
4862
4863 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4874 inttypes.h stdint.h unistd.h
4875 do
4876 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4877 echo "$as_me:$LINENO: checking for $ac_header" >&5
4878 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4879 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4880 echo $ECHO_N "(cached) $ECHO_C" >&6
4881 else
4882 cat >conftest.$ac_ext <<_ACEOF
4883 /* confdefs.h. */
4884 _ACEOF
4885 cat confdefs.h >>conftest.$ac_ext
4886 cat >>conftest.$ac_ext <<_ACEOF
4887 /* end confdefs.h. */
4888 $ac_includes_default
4889
4890 #include <$ac_header>
4891 _ACEOF
4892 rm -f conftest.$ac_objext
4893 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4894 (eval $ac_compile) 2>conftest.er1
4895 ac_status=$?
4896 grep -v '^ *+' conftest.er1 >conftest.err
4897 rm -f conftest.er1
4898 cat conftest.err >&5
4899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4900 (exit $ac_status); } &&
4901 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4903 (eval $ac_try) 2>&5
4904 ac_status=$?
4905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4906 (exit $ac_status); }; } &&
4907 { ac_try='test -s conftest.$ac_objext'
4908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4909 (eval $ac_try) 2>&5
4910 ac_status=$?
4911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4912 (exit $ac_status); }; }; then
4913 eval "$as_ac_Header=yes"
4914 else
4915 echo "$as_me: failed program was:" >&5
4916 sed 's/^/| /' conftest.$ac_ext >&5
4917
4918 eval "$as_ac_Header=no"
4919 fi
4920 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4921 fi
4922 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4923 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4924 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4925 cat >>confdefs.h <<_ACEOF
4926 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4927 _ACEOF
4928
4929 fi
4930
4931 done
4932
4933
4934
4935 for ac_header in dlfcn.h
4936 do
4937 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4938 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4939 echo "$as_me:$LINENO: checking for $ac_header" >&5
4940 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4941 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4942 echo $ECHO_N "(cached) $ECHO_C" >&6
4943 fi
4944 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4945 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4946 else
4947 # Is the header compilable?
4948 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4949 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4950 cat >conftest.$ac_ext <<_ACEOF
4951 /* confdefs.h. */
4952 _ACEOF
4953 cat confdefs.h >>conftest.$ac_ext
4954 cat >>conftest.$ac_ext <<_ACEOF
4955 /* end confdefs.h. */
4956 $ac_includes_default
4957 #include <$ac_header>
4958 _ACEOF
4959 rm -f conftest.$ac_objext
4960 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4961 (eval $ac_compile) 2>conftest.er1
4962 ac_status=$?
4963 grep -v '^ *+' conftest.er1 >conftest.err
4964 rm -f conftest.er1
4965 cat conftest.err >&5
4966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4967 (exit $ac_status); } &&
4968 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4970 (eval $ac_try) 2>&5
4971 ac_status=$?
4972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4973 (exit $ac_status); }; } &&
4974 { ac_try='test -s conftest.$ac_objext'
4975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4976 (eval $ac_try) 2>&5
4977 ac_status=$?
4978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4979 (exit $ac_status); }; }; then
4980 ac_header_compiler=yes
4981 else
4982 echo "$as_me: failed program was:" >&5
4983 sed 's/^/| /' conftest.$ac_ext >&5
4984
4985 ac_header_compiler=no
4986 fi
4987 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4988 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4989 echo "${ECHO_T}$ac_header_compiler" >&6
4990
4991 # Is the header present?
4992 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4993 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4994 cat >conftest.$ac_ext <<_ACEOF
4995 /* confdefs.h. */
4996 _ACEOF
4997 cat confdefs.h >>conftest.$ac_ext
4998 cat >>conftest.$ac_ext <<_ACEOF
4999 /* end confdefs.h. */
5000 #include <$ac_header>
5001 _ACEOF
5002 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5003 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5004 ac_status=$?
5005 grep -v '^ *+' conftest.er1 >conftest.err
5006 rm -f conftest.er1
5007 cat conftest.err >&5
5008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5009 (exit $ac_status); } >/dev/null; then
5010 if test -s conftest.err; then
5011 ac_cpp_err=$ac_c_preproc_warn_flag
5012 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5013 else
5014 ac_cpp_err=
5015 fi
5016 else
5017 ac_cpp_err=yes
5018 fi
5019 if test -z "$ac_cpp_err"; then
5020 ac_header_preproc=yes
5021 else
5022 echo "$as_me: failed program was:" >&5
5023 sed 's/^/| /' conftest.$ac_ext >&5
5024
5025 ac_header_preproc=no
5026 fi
5027 rm -f conftest.err conftest.$ac_ext
5028 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5029 echo "${ECHO_T}$ac_header_preproc" >&6
5030
5031 # So? What about this header?
5032 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5033 yes:no: )
5034 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5035 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5036 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5037 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5038 ac_header_preproc=yes
5039 ;;
5040 no:yes:* )
5041 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5042 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5043 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5044 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5045 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5046 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5047 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5048 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5049 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5050 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5051 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5052 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5053 (
5054 cat <<\_ASBOX
5055 ## ------------------------------------------ ##
5056 ## Report this to the AC_PACKAGE_NAME lists. ##
5057 ## ------------------------------------------ ##
5058 _ASBOX
5059 ) |
5060 sed "s/^/$as_me: WARNING: /" >&2
5061 ;;
5062 esac
5063 echo "$as_me:$LINENO: checking for $ac_header" >&5
5064 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5065 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5066 echo $ECHO_N "(cached) $ECHO_C" >&6
5067 else
5068 eval "$as_ac_Header=\$ac_header_preproc"
5069 fi
5070 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5071 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5072
5073 fi
5074 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5075 cat >>confdefs.h <<_ACEOF
5076 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5077 _ACEOF
5078
5079 fi
5080
5081 done
5082
5083 ac_ext=cc
5084 ac_cpp='$CXXCPP $CPPFLAGS'
5085 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5086 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5087 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5088 if test -n "$ac_tool_prefix"; then
5089 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
5090 do
5091 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5092 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5093 echo "$as_me:$LINENO: checking for $ac_word" >&5
5094 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5095 if test "${ac_cv_prog_CXX+set}" = set; then
5096 echo $ECHO_N "(cached) $ECHO_C" >&6
5097 else
5098 if test -n "$CXX"; then
5099 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5100 else
5101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5102 for as_dir in $PATH
5103 do
5104 IFS=$as_save_IFS
5105 test -z "$as_dir" && as_dir=.
5106 for ac_exec_ext in '' $ac_executable_extensions; do
5107 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5108 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
5109 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5110 break 2
5111 fi
5112 done
5113 done
5114
5115 fi
5116 fi
5117 CXX=$ac_cv_prog_CXX
5118 if test -n "$CXX"; then
5119 echo "$as_me:$LINENO: result: $CXX" >&5
5120 echo "${ECHO_T}$CXX" >&6
5121 else
5122 echo "$as_me:$LINENO: result: no" >&5
5123 echo "${ECHO_T}no" >&6
5124 fi
5125
5126 test -n "$CXX" && break
5127 done
5128 fi
5129 if test -z "$CXX"; then
5130 ac_ct_CXX=$CXX
5131 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
5132 do
5133 # Extract the first word of "$ac_prog", so it can be a program name with args.
5134 set dummy $ac_prog; ac_word=$2
5135 echo "$as_me:$LINENO: checking for $ac_word" >&5
5136 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5137 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
5138 echo $ECHO_N "(cached) $ECHO_C" >&6
5139 else
5140 if test -n "$ac_ct_CXX"; then
5141 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5142 else
5143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5144 for as_dir in $PATH
5145 do
5146 IFS=$as_save_IFS
5147 test -z "$as_dir" && as_dir=.
5148 for ac_exec_ext in '' $ac_executable_extensions; do
5149 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5150 ac_cv_prog_ac_ct_CXX="$ac_prog"
5151 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5152 break 2
5153 fi
5154 done
5155 done
5156
5157 fi
5158 fi
5159 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5160 if test -n "$ac_ct_CXX"; then
5161 echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
5162 echo "${ECHO_T}$ac_ct_CXX" >&6
5163 else
5164 echo "$as_me:$LINENO: result: no" >&5
5165 echo "${ECHO_T}no" >&6
5166 fi
5167
5168 test -n "$ac_ct_CXX" && break
5169 done
5170 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
5171
5172 CXX=$ac_ct_CXX
5173 fi
5174
5175
5176 # Provide some information about the compiler.
5177 echo "$as_me:$LINENO:" \
5178 "checking for C++ compiler version" >&5
5179 ac_compiler=`set X $ac_compile; echo $2`
5180 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
5181 (eval $ac_compiler --version </dev/null >&5) 2>&5
5182 ac_status=$?
5183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5184 (exit $ac_status); }
5185 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
5186 (eval $ac_compiler -v </dev/null >&5) 2>&5
5187 ac_status=$?
5188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5189 (exit $ac_status); }
5190 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
5191 (eval $ac_compiler -V </dev/null >&5) 2>&5
5192 ac_status=$?
5193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5194 (exit $ac_status); }
5195
5196 echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
5197 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
5198 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
5199 echo $ECHO_N "(cached) $ECHO_C" >&6
5200 else
5201 cat >conftest.$ac_ext <<_ACEOF
5202 /* confdefs.h. */
5203 _ACEOF
5204 cat confdefs.h >>conftest.$ac_ext
5205 cat >>conftest.$ac_ext <<_ACEOF
5206 /* end confdefs.h. */
5207
5208 int
5209 main ()
5210 {
5211 #ifndef __GNUC__
5212 choke me
5213 #endif
5214
5215 ;
5216 return 0;
5217 }
5218 _ACEOF
5219 rm -f conftest.$ac_objext
5220 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5221 (eval $ac_compile) 2>conftest.er1
5222 ac_status=$?
5223 grep -v '^ *+' conftest.er1 >conftest.err
5224 rm -f conftest.er1
5225 cat conftest.err >&5
5226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5227 (exit $ac_status); } &&
5228 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
5229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5230 (eval $ac_try) 2>&5
5231 ac_status=$?
5232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5233 (exit $ac_status); }; } &&
5234 { ac_try='test -s conftest.$ac_objext'
5235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5236 (eval $ac_try) 2>&5
5237 ac_status=$?
5238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5239 (exit $ac_status); }; }; then
5240 ac_compiler_gnu=yes
5241 else
5242 echo "$as_me: failed program was:" >&5
5243 sed 's/^/| /' conftest.$ac_ext >&5
5244
5245 ac_compiler_gnu=no
5246 fi
5247 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5248 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
5249
5250 fi
5251 echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
5252 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
5253 GXX=`test $ac_compiler_gnu = yes && echo yes`
5254 ac_test_CXXFLAGS=${CXXFLAGS+set}
5255 ac_save_CXXFLAGS=$CXXFLAGS
5256 CXXFLAGS="-g"
5257 echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
5258 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
5259 if test "${ac_cv_prog_cxx_g+set}" = set; then
5260 echo $ECHO_N "(cached) $ECHO_C" >&6
5261 else
5262 cat >conftest.$ac_ext <<_ACEOF
5263 /* confdefs.h. */
5264 _ACEOF
5265 cat confdefs.h >>conftest.$ac_ext
5266 cat >>conftest.$ac_ext <<_ACEOF
5267 /* end confdefs.h. */
5268
5269 int
5270 main ()
5271 {
5272
5273 ;
5274 return 0;
5275 }
5276 _ACEOF
5277 rm -f conftest.$ac_objext
5278 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5279 (eval $ac_compile) 2>conftest.er1
5280 ac_status=$?
5281 grep -v '^ *+' conftest.er1 >conftest.err
5282 rm -f conftest.er1
5283 cat conftest.err >&5
5284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5285 (exit $ac_status); } &&
5286 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
5287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5288 (eval $ac_try) 2>&5
5289 ac_status=$?
5290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5291 (exit $ac_status); }; } &&
5292 { ac_try='test -s conftest.$ac_objext'
5293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5294 (eval $ac_try) 2>&5
5295 ac_status=$?
5296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5297 (exit $ac_status); }; }; then
5298 ac_cv_prog_cxx_g=yes
5299 else
5300 echo "$as_me: failed program was:" >&5
5301 sed 's/^/| /' conftest.$ac_ext >&5
5302
5303 ac_cv_prog_cxx_g=no
5304 fi
5305 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5306 fi
5307 echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
5308 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
5309 if test "$ac_test_CXXFLAGS" = set; then
5310 CXXFLAGS=$ac_save_CXXFLAGS
5311 elif test $ac_cv_prog_cxx_g = yes; then
5312 if test "$GXX" = yes; then
5313 CXXFLAGS="-g -O2"
5314 else
5315 CXXFLAGS="-g"
5316 fi
5317 else
5318 if test "$GXX" = yes; then
5319 CXXFLAGS="-O2"
5320 else
5321 CXXFLAGS=
5322 fi
5323 fi
5324 for ac_declaration in \
5325 '' \
5326 'extern "C" void std::exit (int) throw (); using std::exit;' \
5327 'extern "C" void std::exit (int); using std::exit;' \
5328 'extern "C" void exit (int) throw ();' \
5329 'extern "C" void exit (int);' \
5330 'void exit (int);'
5331 do
5332 cat >conftest.$ac_ext <<_ACEOF
5333 /* confdefs.h. */
5334 _ACEOF
5335 cat confdefs.h >>conftest.$ac_ext
5336 cat >>conftest.$ac_ext <<_ACEOF
5337 /* end confdefs.h. */
5338 $ac_declaration
5339 #include <stdlib.h>
5340 int
5341 main ()
5342 {
5343 exit (42);
5344 ;
5345 return 0;
5346 }
5347 _ACEOF
5348 rm -f conftest.$ac_objext
5349 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5350 (eval $ac_compile) 2>conftest.er1
5351 ac_status=$?
5352 grep -v '^ *+' conftest.er1 >conftest.err
5353 rm -f conftest.er1
5354 cat conftest.err >&5
5355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5356 (exit $ac_status); } &&
5357 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
5358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5359 (eval $ac_try) 2>&5
5360 ac_status=$?
5361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5362 (exit $ac_status); }; } &&
5363 { ac_try='test -s conftest.$ac_objext'
5364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5365 (eval $ac_try) 2>&5
5366 ac_status=$?
5367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5368 (exit $ac_status); }; }; then
5369 :
5370 else
5371 echo "$as_me: failed program was:" >&5
5372 sed 's/^/| /' conftest.$ac_ext >&5
5373
5374 continue
5375 fi
5376 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5377 cat >conftest.$ac_ext <<_ACEOF
5378 /* confdefs.h. */
5379 _ACEOF
5380 cat confdefs.h >>conftest.$ac_ext
5381 cat >>conftest.$ac_ext <<_ACEOF
5382 /* end confdefs.h. */
5383 $ac_declaration
5384 int
5385 main ()
5386 {
5387 exit (42);
5388 ;
5389 return 0;
5390 }
5391 _ACEOF
5392 rm -f conftest.$ac_objext
5393 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5394 (eval $ac_compile) 2>conftest.er1
5395 ac_status=$?
5396 grep -v '^ *+' conftest.er1 >conftest.err
5397 rm -f conftest.er1
5398 cat conftest.err >&5
5399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5400 (exit $ac_status); } &&
5401 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
5402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5403 (eval $ac_try) 2>&5
5404 ac_status=$?
5405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5406 (exit $ac_status); }; } &&
5407 { ac_try='test -s conftest.$ac_objext'
5408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5409 (eval $ac_try) 2>&5
5410 ac_status=$?
5411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5412 (exit $ac_status); }; }; then
5413 break
5414 else
5415 echo "$as_me: failed program was:" >&5
5416 sed 's/^/| /' conftest.$ac_ext >&5
5417
5418 fi
5419 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5420 done
5421 rm -f conftest*
5422 if test -n "$ac_declaration"; then
5423 echo '#ifdef __cplusplus' >>confdefs.h
5424 echo $ac_declaration >>confdefs.h
5425 echo '#endif' >>confdefs.h
5426 fi
5427
5428 ac_ext=cc
5429 ac_cpp='$CXXCPP $CPPFLAGS'
5430 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5431 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5432 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5433
5434
5435
5436 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5437 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5438 (test "X$CXX" != "Xg++"))) ; then
5439 ac_ext=cc
5440 ac_cpp='$CXXCPP $CPPFLAGS'
5441 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5442 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5443 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5444 echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
5445 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
5446 if test -z "$CXXCPP"; then
5447 if test "${ac_cv_prog_CXXCPP+set}" = set; then
5448 echo $ECHO_N "(cached) $ECHO_C" >&6
5449 else
5450 # Double quotes because CXXCPP needs to be expanded
5451 for CXXCPP in "$CXX -E" "/lib/cpp"
5452 do
5453 ac_preproc_ok=false
5454 for ac_cxx_preproc_warn_flag in '' yes
5455 do
5456 # Use a header file that comes with gcc, so configuring glibc
5457 # with a fresh cross-compiler works.
5458 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5459 # <limits.h> exists even on freestanding compilers.
5460 # On the NeXT, cc -E runs the code through the compiler's parser,
5461 # not just through cpp. "Syntax error" is here to catch this case.
5462 cat >conftest.$ac_ext <<_ACEOF
5463 /* confdefs.h. */
5464 _ACEOF
5465 cat confdefs.h >>conftest.$ac_ext
5466 cat >>conftest.$ac_ext <<_ACEOF
5467 /* end confdefs.h. */
5468 #ifdef __STDC__
5469 # include <limits.h>
5470 #else
5471 # include <assert.h>
5472 #endif
5473 Syntax error
5474 _ACEOF
5475 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5476 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5477 ac_status=$?
5478 grep -v '^ *+' conftest.er1 >conftest.err
5479 rm -f conftest.er1
5480 cat conftest.err >&5
5481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5482 (exit $ac_status); } >/dev/null; then
5483 if test -s conftest.err; then
5484 ac_cpp_err=$ac_cxx_preproc_warn_flag
5485 ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
5486 else
5487 ac_cpp_err=
5488 fi
5489 else
5490 ac_cpp_err=yes
5491 fi
5492 if test -z "$ac_cpp_err"; then
5493 :
5494 else
5495 echo "$as_me: failed program was:" >&5
5496 sed 's/^/| /' conftest.$ac_ext >&5
5497
5498 # Broken: fails on valid input.
5499 continue
5500 fi
5501 rm -f conftest.err conftest.$ac_ext
5502
5503 # OK, works on sane cases. Now check whether non-existent headers
5504 # can be detected and how.
5505 cat >conftest.$ac_ext <<_ACEOF
5506 /* confdefs.h. */
5507 _ACEOF
5508 cat confdefs.h >>conftest.$ac_ext
5509 cat >>conftest.$ac_ext <<_ACEOF
5510 /* end confdefs.h. */
5511 #include <ac_nonexistent.h>
5512 _ACEOF
5513 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5514 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5515 ac_status=$?
5516 grep -v '^ *+' conftest.er1 >conftest.err
5517 rm -f conftest.er1
5518 cat conftest.err >&5
5519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5520 (exit $ac_status); } >/dev/null; then
5521 if test -s conftest.err; then
5522 ac_cpp_err=$ac_cxx_preproc_warn_flag
5523 ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
5524 else
5525 ac_cpp_err=
5526 fi
5527 else
5528 ac_cpp_err=yes
5529 fi
5530 if test -z "$ac_cpp_err"; then
5531 # Broken: success on invalid input.
5532 continue
5533 else
5534 echo "$as_me: failed program was:" >&5
5535 sed 's/^/| /' conftest.$ac_ext >&5
5536
5537 # Passes both tests.
5538 ac_preproc_ok=:
5539 break
5540 fi
5541 rm -f conftest.err conftest.$ac_ext
5542
5543 done
5544 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5545 rm -f conftest.err conftest.$ac_ext
5546 if $ac_preproc_ok; then
5547 break
5548 fi
5549
5550 done
5551 ac_cv_prog_CXXCPP=$CXXCPP
5552
5553 fi
5554 CXXCPP=$ac_cv_prog_CXXCPP
5555 else
5556 ac_cv_prog_CXXCPP=$CXXCPP
5557 fi
5558 echo "$as_me:$LINENO: result: $CXXCPP" >&5
5559 echo "${ECHO_T}$CXXCPP" >&6
5560 ac_preproc_ok=false
5561 for ac_cxx_preproc_warn_flag in '' yes
5562 do
5563 # Use a header file that comes with gcc, so configuring glibc
5564 # with a fresh cross-compiler works.
5565 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5566 # <limits.h> exists even on freestanding compilers.
5567 # On the NeXT, cc -E runs the code through the compiler's parser,
5568 # not just through cpp. "Syntax error" is here to catch this case.
5569 cat >conftest.$ac_ext <<_ACEOF
5570 /* confdefs.h. */
5571 _ACEOF
5572 cat confdefs.h >>conftest.$ac_ext
5573 cat >>conftest.$ac_ext <<_ACEOF
5574 /* end confdefs.h. */
5575 #ifdef __STDC__
5576 # include <limits.h>
5577 #else
5578 # include <assert.h>
5579 #endif
5580 Syntax error
5581 _ACEOF
5582 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5583 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5584 ac_status=$?
5585 grep -v '^ *+' conftest.er1 >conftest.err
5586 rm -f conftest.er1
5587 cat conftest.err >&5
5588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5589 (exit $ac_status); } >/dev/null; then
5590 if test -s conftest.err; then
5591 ac_cpp_err=$ac_cxx_preproc_warn_flag
5592 ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
5593 else
5594 ac_cpp_err=
5595 fi
5596 else
5597 ac_cpp_err=yes
5598 fi
5599 if test -z "$ac_cpp_err"; then
5600 :
5601 else
5602 echo "$as_me: failed program was:" >&5
5603 sed 's/^/| /' conftest.$ac_ext >&5
5604
5605 # Broken: fails on valid input.
5606 continue
5607 fi
5608 rm -f conftest.err conftest.$ac_ext
5609
5610 # OK, works on sane cases. Now check whether non-existent headers
5611 # can be detected and how.
5612 cat >conftest.$ac_ext <<_ACEOF
5613 /* confdefs.h. */
5614 _ACEOF
5615 cat confdefs.h >>conftest.$ac_ext
5616 cat >>conftest.$ac_ext <<_ACEOF
5617 /* end confdefs.h. */
5618 #include <ac_nonexistent.h>
5619 _ACEOF
5620 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5621 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5622 ac_status=$?
5623 grep -v '^ *+' conftest.er1 >conftest.err
5624 rm -f conftest.er1
5625 cat conftest.err >&5
5626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5627 (exit $ac_status); } >/dev/null; then
5628 if test -s conftest.err; then
5629 ac_cpp_err=$ac_cxx_preproc_warn_flag
5630 ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
5631 else
5632 ac_cpp_err=
5633 fi
5634 else
5635 ac_cpp_err=yes
5636 fi
5637 if test -z "$ac_cpp_err"; then
5638 # Broken: success on invalid input.
5639 continue
5640 else
5641 echo "$as_me: failed program was:" >&5
5642 sed 's/^/| /' conftest.$ac_ext >&5
5643
5644 # Passes both tests.
5645 ac_preproc_ok=:
5646 break
5647 fi
5648 rm -f conftest.err conftest.$ac_ext
5649
5650 done
5651 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5652 rm -f conftest.err conftest.$ac_ext
5653 if $ac_preproc_ok; then
5654 :
5655 else
5656 { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
5657 See \`config.log' for more details." >&5
5658 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
5659 See \`config.log' for more details." >&2;}
5660 { (exit 1); exit 1; }; }
5661 fi
5662
5663 ac_ext=cc
5664 ac_cpp='$CXXCPP $CPPFLAGS'
5665 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5666 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5667 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5668
5669 fi
5670
5671
5672 ac_ext=f
5673 ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
5674 ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5675 ac_compiler_gnu=$ac_cv_f77_compiler_gnu
5676 if test -n "$ac_tool_prefix"; then
5677 for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
5678 do
5679 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5680 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5681 echo "$as_me:$LINENO: checking for $ac_word" >&5
5682 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5683 if test "${ac_cv_prog_F77+set}" = set; then
5684 echo $ECHO_N "(cached) $ECHO_C" >&6
5685 else
5686 if test -n "$F77"; then
5687 ac_cv_prog_F77="$F77" # Let the user override the test.
5688 else
5689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5690 for as_dir in $PATH
5691 do
5692 IFS=$as_save_IFS
5693 test -z "$as_dir" && as_dir=.
5694 for ac_exec_ext in '' $ac_executable_extensions; do
5695 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5696 ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
5697 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5698 break 2
5699 fi
5700 done
5701 done
5702
5703 fi
5704 fi
5705 F77=$ac_cv_prog_F77
5706 if test -n "$F77"; then
5707 echo "$as_me:$LINENO: result: $F77" >&5
5708 echo "${ECHO_T}$F77" >&6
5709 else
5710 echo "$as_me:$LINENO: result: no" >&5
5711 echo "${ECHO_T}no" >&6
5712 fi
5713
5714 test -n "$F77" && break
5715 done
5716 fi
5717 if test -z "$F77"; then
5718 ac_ct_F77=$F77
5719 for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
5720 do
5721 # Extract the first word of "$ac_prog", so it can be a program name with args.
5722 set dummy $ac_prog; ac_word=$2
5723 echo "$as_me:$LINENO: checking for $ac_word" >&5
5724 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5725 if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
5726 echo $ECHO_N "(cached) $ECHO_C" >&6
5727 else
5728 if test -n "$ac_ct_F77"; then
5729 ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
5730 else
5731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5732 for as_dir in $PATH
5733 do
5734 IFS=$as_save_IFS
5735 test -z "$as_dir" && as_dir=.
5736 for ac_exec_ext in '' $ac_executable_extensions; do
5737 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5738 ac_cv_prog_ac_ct_F77="$ac_prog"
5739 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5740 break 2
5741 fi
5742 done
5743 done
5744
5745 fi
5746 fi
5747 ac_ct_F77=$ac_cv_prog_ac_ct_F77
5748 if test -n "$ac_ct_F77"; then
5749 echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
5750 echo "${ECHO_T}$ac_ct_F77" >&6
5751 else
5752 echo "$as_me:$LINENO: result: no" >&5
5753 echo "${ECHO_T}no" >&6
5754 fi
5755
5756 test -n "$ac_ct_F77" && break
5757 done
5758
5759 F77=$ac_ct_F77
5760 fi
5761
5762
5763 # Provide some information about the compiler.
5764 echo "$as_me:5765:" \
5765 "checking for Fortran 77 compiler version" >&5
5766 ac_compiler=`set X $ac_compile; echo $2`
5767 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
5768 (eval $ac_compiler --version </dev/null >&5) 2>&5
5769 ac_status=$?
5770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5771 (exit $ac_status); }
5772 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
5773 (eval $ac_compiler -v </dev/null >&5) 2>&5
5774 ac_status=$?
5775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5776 (exit $ac_status); }
5777 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
5778 (eval $ac_compiler -V </dev/null >&5) 2>&5
5779 ac_status=$?
5780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5781 (exit $ac_status); }
5782 rm -f a.out
5783
5784 # If we don't use `.F' as extension, the preprocessor is not run on the
5785 # input file. (Note that this only needs to work for GNU compilers.)
5786 ac_save_ext=$ac_ext
5787 ac_ext=F
5788 echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
5789 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
5790 if test "${ac_cv_f77_compiler_gnu+set}" = set; then
5791 echo $ECHO_N "(cached) $ECHO_C" >&6
5792 else
5793 cat >conftest.$ac_ext <<_ACEOF
5794 program main
5795 #ifndef __GNUC__
5796 choke me
5797 #endif
5798
5799 end
5800 _ACEOF
5801 rm -f conftest.$ac_objext
5802 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5803 (eval $ac_compile) 2>conftest.er1
5804 ac_status=$?
5805 grep -v '^ *+' conftest.er1 >conftest.err
5806 rm -f conftest.er1
5807 cat conftest.err >&5
5808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5809 (exit $ac_status); } &&
5810 { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
5811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5812 (eval $ac_try) 2>&5
5813 ac_status=$?
5814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5815 (exit $ac_status); }; } &&
5816 { ac_try='test -s conftest.$ac_objext'
5817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5818 (eval $ac_try) 2>&5
5819 ac_status=$?
5820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5821 (exit $ac_status); }; }; then
5822 ac_compiler_gnu=yes
5823 else
5824 echo "$as_me: failed program was:" >&5
5825 sed 's/^/| /' conftest.$ac_ext >&5
5826
5827 ac_compiler_gnu=no
5828 fi
5829 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5830 ac_cv_f77_compiler_gnu=$ac_compiler_gnu
5831
5832 fi
5833 echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
5834 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
5835 ac_ext=$ac_save_ext
5836 ac_test_FFLAGS=${FFLAGS+set}
5837 ac_save_FFLAGS=$FFLAGS
5838 FFLAGS=
5839 echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
5840 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
5841 if test "${ac_cv_prog_f77_g+set}" = set; then
5842 echo $ECHO_N "(cached) $ECHO_C" >&6
5843 else
5844 FFLAGS=-g
5845 cat >conftest.$ac_ext <<_ACEOF
5846 program main
5847
5848 end
5849 _ACEOF
5850 rm -f conftest.$ac_objext
5851 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5852 (eval $ac_compile) 2>conftest.er1
5853 ac_status=$?
5854 grep -v '^ *+' conftest.er1 >conftest.err
5855 rm -f conftest.er1
5856 cat conftest.err >&5
5857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5858 (exit $ac_status); } &&
5859 { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
5860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5861 (eval $ac_try) 2>&5
5862 ac_status=$?
5863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5864 (exit $ac_status); }; } &&
5865 { ac_try='test -s conftest.$ac_objext'
5866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5867 (eval $ac_try) 2>&5
5868 ac_status=$?
5869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5870 (exit $ac_status); }; }; then
5871 ac_cv_prog_f77_g=yes
5872 else
5873 echo "$as_me: failed program was:" >&5
5874 sed 's/^/| /' conftest.$ac_ext >&5
5875
5876 ac_cv_prog_f77_g=no
5877 fi
5878 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5879
5880 fi
5881 echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
5882 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
5883 if test "$ac_test_FFLAGS" = set; then
5884 FFLAGS=$ac_save_FFLAGS
5885 elif test $ac_cv_prog_f77_g = yes; then
5886 if test "x$ac_cv_f77_compiler_gnu" = xyes; then
5887 FFLAGS="-g -O2"
5888 else
5889 FFLAGS="-g"
5890 fi
5891 else
5892 if test "x$ac_cv_f77_compiler_gnu" = xyes; then
5893 FFLAGS="-O2"
5894 else
5895 FFLAGS=
5896 fi
5897 fi
5898
5899 G77=`test $ac_compiler_gnu = yes && echo yes`
5900 ac_ext=c
5901 ac_cpp='$CPP $CPPFLAGS'
5902 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5903 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5904 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5905
5906
5907
5908 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
5909
5910 # find the maximum length of command line arguments
5911 echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
5912 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
5913 if test "${lt_cv_sys_max_cmd_len+set}" = set; then
5914 echo $ECHO_N "(cached) $ECHO_C" >&6
5915 else
5916 i=0
5917 teststring="ABCD"
5918
5919 case $build_os in
5920 msdosdjgpp*)
5921 # On DJGPP, this test can blow up pretty badly due to problems in libc
5922 # (any single argument exceeding 2000 bytes causes a buffer overrun
5923 # during glob expansion). Even if it were fixed, the result of this
5924 # check would be larger than it should be.
5925 lt_cv_sys_max_cmd_len=12288; # 12K is about right
5926 ;;
5927
5928 gnu*)
5929 # Under GNU Hurd, this test is not required because there is
5930 # no limit to the length of command line arguments.
5931 # Libtool will interpret -1 as no limit whatsoever
5932 lt_cv_sys_max_cmd_len=-1;
5933 ;;
5934
5935 cygwin* | mingw*)
5936 # On Win9x/ME, this test blows up -- it succeeds, but takes
5937 # about 5 minutes as the teststring grows exponentially.
5938 # Worse, since 9x/ME are not pre-emptively multitasking,
5939 # you end up with a "frozen" computer, even though with patience
5940 # the test eventually succeeds (with a max line length of 256k).
5941 # Instead, let's just punt: use the minimum linelength reported by
5942 # all of the supported platforms: 8192 (on NT/2K/XP).
5943 lt_cv_sys_max_cmd_len=8192;
5944 ;;
5945
5946 amigaos*)
5947 # On AmigaOS with pdksh, this test takes hours, literally.
5948 # So we just punt and use a minimum line length of 8192.
5949 lt_cv_sys_max_cmd_len=8192;
5950 ;;
5951
5952 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
5953 # This has been around since 386BSD, at least. Likely further.
5954 if test -x /sbin/sysctl; then
5955 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
5956 elif test -x /usr/sbin/sysctl; then
5957 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
5958 else
5959 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
5960 fi
5961 # And add a safety zone
5962 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5963 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5964 ;;
5965
5966 interix*)
5967 # We know the value 262144 and hardcode it with a safety zone (like BSD)
5968 lt_cv_sys_max_cmd_len=196608
5969 ;;
5970
5971 osf*)
5972 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
5973 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
5974 # nice to cause kernel panics so lets avoid the loop below.
5975 # First set a reasonable default.
5976 lt_cv_sys_max_cmd_len=16384
5977 #
5978 if test -x /sbin/sysconfig; then
5979 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
5980 *1*) lt_cv_sys_max_cmd_len=-1 ;;
5981 esac
5982 fi
5983 ;;
5984 sco3.2v5*)
5985 lt_cv_sys_max_cmd_len=102400
5986 ;;
5987 sysv5* | sco5v6* | sysv4.2uw2*)
5988 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
5989 if test -n "$kargmax"; then
5990 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
5991 else
5992 lt_cv_sys_max_cmd_len=32768
5993 fi
5994 ;;
5995 *)
5996 # If test is not a shell built-in, we'll probably end up computing a
5997 # maximum length that is only half of the actual maximum length, but
5998 # we can't tell.
5999 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6000 while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
6001 = "XX$teststring") >/dev/null 2>&1 &&
6002 new_result=`expr "X$teststring" : ".*" 2>&1` &&
6003 lt_cv_sys_max_cmd_len=$new_result &&
6004 test $i != 17 # 1/2 MB should be enough
6005 do
6006 i=`expr $i + 1`
6007 teststring=$teststring$teststring
6008 done
6009 teststring=
6010 # Add a significant safety factor because C++ compilers can tack on massive
6011 # amounts of additional arguments before passing them to the linker.
6012 # It appears as though 1/2 is a usable value.
6013 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6014 ;;
6015 esac
6016
6017 fi
6018
6019 if test -n $lt_cv_sys_max_cmd_len ; then
6020 echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
6021 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
6022 else
6023 echo "$as_me:$LINENO: result: none" >&5
6024 echo "${ECHO_T}none" >&6
6025 fi
6026
6027
6028
6029
6030 # Check for command to grab the raw symbol name followed by C symbol from nm.
6031 echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
6032 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
6033 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
6034 echo $ECHO_N "(cached) $ECHO_C" >&6
6035 else
6036
6037 # These are sane defaults that work on at least a few old systems.
6038 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
6039
6040 # Character class describing NM global symbol codes.
6041 symcode='[BCDEGRST]'
6042
6043 # Regexp to match symbols that can be accessed directly from C.
6044 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
6045
6046 # Transform an extracted symbol line into a proper C declaration
6047 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6048
6049 # Transform an extracted symbol line into symbol name and symbol address
6050 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6051
6052 # Define system-specific variables.
6053 case $host_os in
6054 aix*)
6055 symcode='[BCDT]'
6056 ;;
6057 cygwin* | mingw* | pw32*)
6058 symcode='[ABCDGISTW]'
6059 ;;
6060 hpux*) # Its linker distinguishes data from code symbols
6061 if test "$host_cpu" = ia64; then
6062 symcode='[ABCDEGRST]'
6063 fi
6064 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6065 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6066 ;;
6067 linux*)
6068 if test "$host_cpu" = ia64; then
6069 symcode='[ABCDGIRSTW]'
6070 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6071 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6072 fi
6073 ;;
6074 irix* | nonstopux*)
6075 symcode='[BCDEGRST]'
6076 ;;
6077 osf*)
6078 symcode='[BCDEGQRST]'
6079 ;;
6080 solaris*)
6081 symcode='[BDRT]'
6082 ;;
6083 sco3.2v5*)
6084 symcode='[DT]'
6085 ;;
6086 sysv4.2uw2*)
6087 symcode='[DT]'
6088 ;;
6089 sysv5* | sco5v6* | unixware* | OpenUNIX*)
6090 symcode='[ABDT]'
6091 ;;
6092 sysv4)
6093 symcode='[DFNSTU]'
6094 ;;
6095 esac
6096
6097 # Handle CRLF in mingw tool chain
6098 opt_cr=
6099 case $build_os in
6100 mingw*)
6101 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6102 ;;
6103 esac
6104
6105 # If we're using GNU nm, then use its standard symbol codes.
6106 case `$NM -V 2>&1` in
6107 *GNU* | *'with BFD'*)
6108 symcode='[ABCDGIRSTW]' ;;
6109 esac
6110
6111 # Try without a prefix undercore, then with it.
6112 for ac_symprfx in "" "_"; do
6113
6114 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6115 symxfrm="\\1 $ac_symprfx\\2 \\2"
6116
6117 # Write the raw and C identifiers.
6118 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6119
6120 # Check to see that the pipe works correctly.
6121 pipe_works=no
6122
6123 rm -f conftest*
6124 cat > conftest.$ac_ext <<EOF
6125 #ifdef __cplusplus
6126 extern "C" {
6127 #endif
6128 char nm_test_var;
6129 void nm_test_func(){}
6130 #ifdef __cplusplus
6131 }
6132 #endif
6133 int main(){nm_test_var='a';nm_test_func();return(0);}
6134 EOF
6135
6136 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6137 (eval $ac_compile) 2>&5
6138 ac_status=$?
6139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6140 (exit $ac_status); }; then
6141 # Now try to grab the symbols.
6142 nlist=conftest.nm
6143 if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
6144 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
6145 ac_status=$?
6146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6147 (exit $ac_status); } && test -s "$nlist"; then
6148 # Try sorting and uniquifying the output.
6149 if sort "$nlist" | uniq > "$nlist"T; then
6150 mv -f "$nlist"T "$nlist"
6151 else
6152 rm -f "$nlist"T
6153 fi
6154
6155 # Make sure that we snagged all the symbols we need.
6156 if grep ' nm_test_var$' "$nlist" >/dev/null; then
6157 if grep ' nm_test_func$' "$nlist" >/dev/null; then
6158 cat <<EOF > conftest.$ac_ext
6159 #ifdef __cplusplus
6160 extern "C" {
6161 #endif
6162
6163 EOF
6164 # Now generate the symbol file.
6165 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6166
6167 cat <<EOF >> conftest.$ac_ext
6168 #if defined (__STDC__) && __STDC__
6169 # define lt_ptr_t void *
6170 #else
6171 # define lt_ptr_t char *
6172 # define const
6173 #endif
6174
6175 /* The mapping between symbol names and symbols. */
6176 const struct {
6177 const char *name;
6178 lt_ptr_t address;
6179 }
6180 lt_preloaded_symbols[] =
6181 {
6182 EOF
6183 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6184 cat <<\EOF >> conftest.$ac_ext
6185 {0, (lt_ptr_t) 0}
6186 };
6187
6188 #ifdef __cplusplus
6189 }
6190 #endif
6191 EOF
6192 # Now try linking the two files.
6193 mv conftest.$ac_objext conftstm.$ac_objext
6194 lt_save_LIBS="$LIBS"
6195 lt_save_CFLAGS="$CFLAGS"
6196 LIBS="conftstm.$ac_objext"
6197 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
6198 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6199 (eval $ac_link) 2>&5
6200 ac_status=$?
6201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6202 (exit $ac_status); } && test -s conftest${ac_exeext}; then
6203 pipe_works=yes
6204 fi
6205 LIBS="$lt_save_LIBS"
6206 CFLAGS="$lt_save_CFLAGS"
6207 else
6208 echo "cannot find nm_test_func in $nlist" >&5
6209 fi
6210 else
6211 echo "cannot find nm_test_var in $nlist" >&5
6212 fi
6213 else
6214 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
6215 fi
6216 else
6217 echo "$progname: failed program was:" >&5
6218 cat conftest.$ac_ext >&5
6219 fi
6220 rm -f conftest* conftst*
6221
6222 # Do not use the global_symbol_pipe unless it works.
6223 if test "$pipe_works" = yes; then
6224 break
6225 else
6226 lt_cv_sys_global_symbol_pipe=
6227 fi
6228 done
6229
6230 fi
6231
6232 if test -z "$lt_cv_sys_global_symbol_pipe"; then
6233 lt_cv_sys_global_symbol_to_cdecl=
6234 fi
6235 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6236 echo "$as_me:$LINENO: result: failed" >&5
6237 echo "${ECHO_T}failed" >&6
6238 else
6239 echo "$as_me:$LINENO: result: ok" >&5
6240 echo "${ECHO_T}ok" >&6
6241 fi
6242
6243 echo "$as_me:$LINENO: checking for objdir" >&5
6244 echo $ECHO_N "checking for objdir... $ECHO_C" >&6
6245 if test "${lt_cv_objdir+set}" = set; then
6246 echo $ECHO_N "(cached) $ECHO_C" >&6
6247 else
6248 rm -f .libs 2>/dev/null
6249 mkdir .libs 2>/dev/null
6250 if test -d .libs; then
6251 lt_cv_objdir=.libs
6252 else
6253 # MS-DOS does not allow filenames that begin with a dot.
6254 lt_cv_objdir=_libs
6255 fi
6256 rmdir .libs 2>/dev/null
6257 fi
6258 echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
6259 echo "${ECHO_T}$lt_cv_objdir" >&6
6260 objdir=$lt_cv_objdir
6261
6262
6263
6264
6265
6266 case $host_os in
6267 aix3*)
6268 # AIX sometimes has problems with the GCC collect2 program. For some
6269 # reason, if we set the COLLECT_NAMES environment variable, the problems
6270 # vanish in a puff of smoke.
6271 if test "X${COLLECT_NAMES+set}" != Xset; then
6272 COLLECT_NAMES=
6273 export COLLECT_NAMES
6274 fi
6275 ;;
6276 esac
6277
6278 # Sed substitution that helps us do robust quoting. It backslashifies
6279 # metacharacters that are still active within double-quoted strings.
6280 Xsed='sed -e 1s/^X//'
6281 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
6282
6283 # Same as above, but do not quote variable references.
6284 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
6285
6286 # Sed substitution to delay expansion of an escaped shell variable in a
6287 # double_quote_subst'ed string.
6288 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6289
6290 # Sed substitution to avoid accidental globbing in evaled expressions
6291 no_glob_subst='s/\*/\\\*/g'
6292
6293 # Constants:
6294 rm="rm -f"
6295
6296 # Global variables:
6297 default_ofile=libtool
6298 can_build_shared=yes
6299
6300 # All known linkers require a `.a' archive for static linking (except MSVC,
6301 # which needs '.lib').
6302 libext=a
6303 ltmain="$ac_aux_dir/ltmain.sh"
6304 ofile="$default_ofile"
6305 with_gnu_ld="$lt_cv_prog_gnu_ld"
6306
6307 if test -n "$ac_tool_prefix"; then
6308 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6309 set dummy ${ac_tool_prefix}ar; ac_word=$2
6310 echo "$as_me:$LINENO: checking for $ac_word" >&5
6311 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6312 if test "${ac_cv_prog_AR+set}" = set; then
6313 echo $ECHO_N "(cached) $ECHO_C" >&6
6314 else
6315 if test -n "$AR"; then
6316 ac_cv_prog_AR="$AR" # Let the user override the test.
6317 else
6318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6319 for as_dir in $PATH
6320 do
6321 IFS=$as_save_IFS
6322 test -z "$as_dir" && as_dir=.
6323 for ac_exec_ext in '' $ac_executable_extensions; do
6324 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6325 ac_cv_prog_AR="${ac_tool_prefix}ar"
6326 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6327 break 2
6328 fi
6329 done
6330 done
6331
6332 fi
6333 fi
6334 AR=$ac_cv_prog_AR
6335 if test -n "$AR"; then
6336 echo "$as_me:$LINENO: result: $AR" >&5
6337 echo "${ECHO_T}$AR" >&6
6338 else
6339 echo "$as_me:$LINENO: result: no" >&5
6340 echo "${ECHO_T}no" >&6
6341 fi
6342
6343 fi
6344 if test -z "$ac_cv_prog_AR"; then
6345 ac_ct_AR=$AR
6346 # Extract the first word of "ar", so it can be a program name with args.
6347 set dummy ar; ac_word=$2
6348 echo "$as_me:$LINENO: checking for $ac_word" >&5
6349 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6350 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
6351 echo $ECHO_N "(cached) $ECHO_C" >&6
6352 else
6353 if test -n "$ac_ct_AR"; then
6354 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6355 else
6356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6357 for as_dir in $PATH
6358 do
6359 IFS=$as_save_IFS
6360 test -z "$as_dir" && as_dir=.
6361 for ac_exec_ext in '' $ac_executable_extensions; do
6362 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6363 ac_cv_prog_ac_ct_AR="ar"
6364 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6365 break 2
6366 fi
6367 done
6368 done
6369
6370 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
6371 fi
6372 fi
6373 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6374 if test -n "$ac_ct_AR"; then
6375 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
6376 echo "${ECHO_T}$ac_ct_AR" >&6
6377 else
6378 echo "$as_me:$LINENO: result: no" >&5
6379 echo "${ECHO_T}no" >&6
6380 fi
6381
6382 AR=$ac_ct_AR
6383 else
6384 AR="$ac_cv_prog_AR"
6385 fi
6386
6387 if test -n "$ac_tool_prefix"; then
6388 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6389 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6390 echo "$as_me:$LINENO: checking for $ac_word" >&5
6391 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6392 if test "${ac_cv_prog_RANLIB+set}" = set; then
6393 echo $ECHO_N "(cached) $ECHO_C" >&6
6394 else
6395 if test -n "$RANLIB"; then
6396 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6397 else
6398 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6399 for as_dir in $PATH
6400 do
6401 IFS=$as_save_IFS
6402 test -z "$as_dir" && as_dir=.
6403 for ac_exec_ext in '' $ac_executable_extensions; do
6404 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6405 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6406 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6407 break 2
6408 fi
6409 done
6410 done
6411
6412 fi
6413 fi
6414 RANLIB=$ac_cv_prog_RANLIB
6415 if test -n "$RANLIB"; then
6416 echo "$as_me:$LINENO: result: $RANLIB" >&5
6417 echo "${ECHO_T}$RANLIB" >&6
6418 else
6419 echo "$as_me:$LINENO: result: no" >&5
6420 echo "${ECHO_T}no" >&6
6421 fi
6422
6423 fi
6424 if test -z "$ac_cv_prog_RANLIB"; then
6425 ac_ct_RANLIB=$RANLIB
6426 # Extract the first word of "ranlib", so it can be a program name with args.
6427 set dummy ranlib; ac_word=$2
6428 echo "$as_me:$LINENO: checking for $ac_word" >&5
6429 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6430 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6431 echo $ECHO_N "(cached) $ECHO_C" >&6
6432 else
6433 if test -n "$ac_ct_RANLIB"; then
6434 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6435 else
6436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6437 for as_dir in $PATH
6438 do
6439 IFS=$as_save_IFS
6440 test -z "$as_dir" && as_dir=.
6441 for ac_exec_ext in '' $ac_executable_extensions; do
6442 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6443 ac_cv_prog_ac_ct_RANLIB="ranlib"
6444 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6445 break 2
6446 fi
6447 done
6448 done
6449
6450 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6451 fi
6452 fi
6453 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6454 if test -n "$ac_ct_RANLIB"; then
6455 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6456 echo "${ECHO_T}$ac_ct_RANLIB" >&6
6457 else
6458 echo "$as_me:$LINENO: result: no" >&5
6459 echo "${ECHO_T}no" >&6
6460 fi
6461
6462 RANLIB=$ac_ct_RANLIB
6463 else
6464 RANLIB="$ac_cv_prog_RANLIB"
6465 fi
6466
6467 if test -n "$ac_tool_prefix"; then
6468 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6469 set dummy ${ac_tool_prefix}strip; ac_word=$2
6470 echo "$as_me:$LINENO: checking for $ac_word" >&5
6471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6472 if test "${ac_cv_prog_STRIP+set}" = set; then
6473 echo $ECHO_N "(cached) $ECHO_C" >&6
6474 else
6475 if test -n "$STRIP"; then
6476 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6477 else
6478 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6479 for as_dir in $PATH
6480 do
6481 IFS=$as_save_IFS
6482 test -z "$as_dir" && as_dir=.
6483 for ac_exec_ext in '' $ac_executable_extensions; do
6484 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6485 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6486 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6487 break 2
6488 fi
6489 done
6490 done
6491
6492 fi
6493 fi
6494 STRIP=$ac_cv_prog_STRIP
6495 if test -n "$STRIP"; then
6496 echo "$as_me:$LINENO: result: $STRIP" >&5
6497 echo "${ECHO_T}$STRIP" >&6
6498 else
6499 echo "$as_me:$LINENO: result: no" >&5
6500 echo "${ECHO_T}no" >&6
6501 fi
6502
6503 fi
6504 if test -z "$ac_cv_prog_STRIP"; then
6505 ac_ct_STRIP=$STRIP
6506 # Extract the first word of "strip", so it can be a program name with args.
6507 set dummy strip; ac_word=$2
6508 echo "$as_me:$LINENO: checking for $ac_word" >&5
6509 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6510 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6511 echo $ECHO_N "(cached) $ECHO_C" >&6
6512 else
6513 if test -n "$ac_ct_STRIP"; then
6514 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6515 else
6516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6517 for as_dir in $PATH
6518 do
6519 IFS=$as_save_IFS
6520 test -z "$as_dir" && as_dir=.
6521 for ac_exec_ext in '' $ac_executable_extensions; do
6522 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6523 ac_cv_prog_ac_ct_STRIP="strip"
6524 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6525 break 2
6526 fi
6527 done
6528 done
6529
6530 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
6531 fi
6532 fi
6533 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6534 if test -n "$ac_ct_STRIP"; then
6535 echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6536 echo "${ECHO_T}$ac_ct_STRIP" >&6
6537 else
6538 echo "$as_me:$LINENO: result: no" >&5
6539 echo "${ECHO_T}no" >&6
6540 fi
6541
6542 STRIP=$ac_ct_STRIP
6543 else
6544 STRIP="$ac_cv_prog_STRIP"
6545 fi
6546
6547
6548 old_CC="$CC"
6549 old_CFLAGS="$CFLAGS"
6550
6551 # Set sane defaults for various variables
6552 test -z "$AR" && AR=ar
6553 test -z "$AR_FLAGS" && AR_FLAGS=cru
6554 test -z "$AS" && AS=as
6555 test -z "$CC" && CC=cc
6556 test -z "$LTCC" && LTCC=$CC
6557 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
6558 test -z "$DLLTOOL" && DLLTOOL=dlltool
6559 test -z "$LD" && LD=ld
6560 test -z "$LN_S" && LN_S="ln -s"
6561 test -z "$MAGIC_CMD" && MAGIC_CMD=file
6562 test -z "$NM" && NM=nm
6563 test -z "$SED" && SED=sed
6564 test -z "$OBJDUMP" && OBJDUMP=objdump
6565 test -z "$RANLIB" && RANLIB=:
6566 test -z "$STRIP" && STRIP=:
6567 test -z "$ac_objext" && ac_objext=o
6568
6569 # Determine commands to create old-style static archives.
6570 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
6571 old_postinstall_cmds='chmod 644 $oldlib'
6572 old_postuninstall_cmds=
6573
6574 if test -n "$RANLIB"; then
6575 case $host_os in
6576 openbsd*)
6577 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
6578 ;;
6579 *)
6580 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
6581 ;;
6582 esac
6583 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
6584 fi
6585
6586 for cc_temp in $compiler""; do
6587 case $cc_temp in
6588 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
6589 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
6590 \-*) ;;
6591 *) break;;
6592 esac
6593 done
6594 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
6595
6596
6597 # Only perform the check for file, if the check method requires it
6598 case $deplibs_check_method in
6599 file_magic*)
6600 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
6601 echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
6602 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
6603 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
6604 echo $ECHO_N "(cached) $ECHO_C" >&6
6605 else
6606 case $MAGIC_CMD in
6607 [\\/*] | ?:[\\/]*)
6608 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
6609 ;;
6610 *)
6611 lt_save_MAGIC_CMD="$MAGIC_CMD"
6612 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6613 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
6614 for ac_dir in $ac_dummy; do
6615 IFS="$lt_save_ifs"
6616 test -z "$ac_dir" && ac_dir=.
6617 if test -f $ac_dir/${ac_tool_prefix}file; then
6618 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
6619 if test -n "$file_magic_test_file"; then
6620 case $deplibs_check_method in
6621 "file_magic "*)
6622 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
6623 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
6624 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
6625 $EGREP "$file_magic_regex" > /dev/null; then
6626 :
6627 else
6628 cat <<EOF 1>&2
6629
6630 *** Warning: the command libtool uses to detect shared libraries,
6631 *** $file_magic_cmd, produces output that libtool cannot recognize.
6632 *** The result is that libtool may fail to recognize shared libraries
6633 *** as such. This will affect the creation of libtool libraries that
6634 *** depend on shared libraries, but programs linked with such libtool
6635 *** libraries will work regardless of this problem. Nevertheless, you
6636 *** may want to report the problem to your system manager and/or to
6637 *** bug-libtool@gnu.org
6638
6639 EOF
6640 fi ;;
6641 esac
6642 fi
6643 break
6644 fi
6645 done
6646 IFS="$lt_save_ifs"
6647 MAGIC_CMD="$lt_save_MAGIC_CMD"
6648 ;;
6649 esac
6650 fi
6651
6652 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
6653 if test -n "$MAGIC_CMD"; then
6654 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
6655 echo "${ECHO_T}$MAGIC_CMD" >&6
6656 else
6657 echo "$as_me:$LINENO: result: no" >&5
6658 echo "${ECHO_T}no" >&6
6659 fi
6660
6661 if test -z "$lt_cv_path_MAGIC_CMD"; then
6662 if test -n "$ac_tool_prefix"; then
6663 echo "$as_me:$LINENO: checking for file" >&5
6664 echo $ECHO_N "checking for file... $ECHO_C" >&6
6665 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
6666 echo $ECHO_N "(cached) $ECHO_C" >&6
6667 else
6668 case $MAGIC_CMD in
6669 [\\/*] | ?:[\\/]*)
6670 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
6671 ;;
6672 *)
6673 lt_save_MAGIC_CMD="$MAGIC_CMD"
6674 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6675 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
6676 for ac_dir in $ac_dummy; do
6677 IFS="$lt_save_ifs"
6678 test -z "$ac_dir" && ac_dir=.
6679 if test -f $ac_dir/file; then
6680 lt_cv_path_MAGIC_CMD="$ac_dir/file"
6681 if test -n "$file_magic_test_file"; then
6682 case $deplibs_check_method in
6683 "file_magic "*)
6684 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
6685 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
6686 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
6687 $EGREP "$file_magic_regex" > /dev/null; then
6688 :
6689 else
6690 cat <<EOF 1>&2
6691
6692 *** Warning: the command libtool uses to detect shared libraries,
6693 *** $file_magic_cmd, produces output that libtool cannot recognize.
6694 *** The result is that libtool may fail to recognize shared libraries
6695 *** as such. This will affect the creation of libtool libraries that
6696 *** depend on shared libraries, but programs linked with such libtool
6697 *** libraries will work regardless of this problem. Nevertheless, you
6698 *** may want to report the problem to your system manager and/or to
6699 *** bug-libtool@gnu.org
6700
6701 EOF
6702 fi ;;
6703 esac
6704 fi
6705 break
6706 fi
6707 done
6708 IFS="$lt_save_ifs"
6709 MAGIC_CMD="$lt_save_MAGIC_CMD"
6710 ;;
6711 esac
6712 fi
6713
6714 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
6715 if test -n "$MAGIC_CMD"; then
6716 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
6717 echo "${ECHO_T}$MAGIC_CMD" >&6
6718 else
6719 echo "$as_me:$LINENO: result: no" >&5
6720 echo "${ECHO_T}no" >&6
6721 fi
6722
6723 else
6724 MAGIC_CMD=:
6725 fi
6726 fi
6727
6728 fi
6729 ;;
6730 esac
6731
6732 enable_dlopen=no
6733 enable_win32_dll=no
6734
6735 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
6736 if test "${enable_libtool_lock+set}" = set; then
6737 enableval="$enable_libtool_lock"
6738
6739 fi;
6740 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6741
6742
6743 # Check whether --with-pic or --without-pic was given.
6744 if test "${with_pic+set}" = set; then
6745 withval="$with_pic"
6746 pic_mode="$withval"
6747 else
6748 pic_mode=default
6749 fi;
6750 test -z "$pic_mode" && pic_mode=default
6751
6752 # Use C for the default configuration in the libtool script
6753 tagname=
6754 lt_save_CC="$CC"
6755 ac_ext=c
6756 ac_cpp='$CPP $CPPFLAGS'
6757 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6758 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6759 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6760
6761
6762 # Source file extension for C test sources.
6763 ac_ext=c
6764
6765 # Object file extension for compiled C test sources.
6766 objext=o
6767 objext=$objext
6768
6769 # Code to be used in simple compile tests
6770 lt_simple_compile_test_code="int some_variable = 0;\n"
6771
6772 # Code to be used in simple link tests
6773 lt_simple_link_test_code='int main(){return(0);}\n'
6774
6775
6776 # If no C compiler was specified, use CC.
6777 LTCC=${LTCC-"$CC"}
6778
6779 # If no C compiler flags were specified, use CFLAGS.
6780 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
6781
6782 # Allow CC to be a program name with arguments.
6783 compiler=$CC
6784
6785
6786 # save warnings/boilerplate of simple test code
6787 ac_outfile=conftest.$ac_objext
6788 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
6789 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
6790 _lt_compiler_boilerplate=`cat conftest.err`
6791 $rm conftest*
6792
6793 ac_outfile=conftest.$ac_objext
6794 printf "$lt_simple_link_test_code" >conftest.$ac_ext
6795 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
6796 _lt_linker_boilerplate=`cat conftest.err`
6797 $rm conftest*
6798
6799
6800
6801 lt_prog_compiler_no_builtin_flag=
6802
6803 if test "$GCC" = yes; then
6804 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
6805
6806
6807 echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
6808 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
6809 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
6810 echo $ECHO_N "(cached) $ECHO_C" >&6
6811 else
6812 lt_cv_prog_compiler_rtti_exceptions=no
6813 ac_outfile=conftest.$ac_objext
6814 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6815 lt_compiler_flag="-fno-rtti -fno-exceptions"
6816 # Insert the option either (1) after the last *FLAGS variable, or
6817 # (2) before a word containing "conftest.", or (3) at the end.
6818 # Note that $ac_compile itself does not contain backslashes and begins
6819 # with a dollar sign (not a hyphen), so the echo should work correctly.
6820 # The option is referenced via a variable to avoid confusing sed.
6821 lt_compile=`echo "$ac_compile" | $SED \
6822 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
6823 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
6824 -e 's:$: $lt_compiler_flag:'`
6825 (eval echo "\"\$as_me:6826: $lt_compile\"" >&5)
6826 (eval "$lt_compile" 2>conftest.err)
6827 ac_status=$?
6828 cat conftest.err >&5
6829 echo "$as_me:6830: \$? = $ac_status" >&5
6830 if (exit $ac_status) && test -s "$ac_outfile"; then
6831 # The compiler can only warn and ignore the option if not recognized
6832 # So say no if there are warnings other than the usual output.
6833 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
6834 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
6835 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
6836 lt_cv_prog_compiler_rtti_exceptions=yes
6837 fi
6838 fi
6839 $rm conftest*
6840
6841 fi
6842 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
6843 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
6844
6845 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
6846 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
6847 else
6848 :
6849 fi
6850
6851 fi
6852
6853 lt_prog_compiler_wl=
6854 lt_prog_compiler_pic=
6855 lt_prog_compiler_static=
6856
6857 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
6858 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
6859
6860 if test "$GCC" = yes; then
6861 lt_prog_compiler_wl='-Wl,'
6862 lt_prog_compiler_static='-static'
6863
6864 case $host_os in
6865 aix*)
6866 # All AIX code is PIC.
6867 if test "$host_cpu" = ia64; then
6868 # AIX 5 now supports IA64 processor
6869 lt_prog_compiler_static='-Bstatic'
6870 fi
6871 ;;
6872
6873 amigaos*)
6874 # FIXME: we need at least 68020 code to build shared libraries, but
6875 # adding the `-m68020' flag to GCC prevents building anything better,
6876 # like `-m68040'.
6877 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
6878 ;;
6879
6880 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6881 # PIC is the default for these OSes.
6882 ;;
6883
6884 mingw* | pw32* | os2*)
6885 # This hack is so that the source file can tell whether it is being
6886 # built for inclusion in a dll (and should export symbols for example).
6887 lt_prog_compiler_pic='-DDLL_EXPORT'
6888 ;;
6889
6890 darwin* | rhapsody*)
6891 # PIC is the default on this platform
6892 # Common symbols not allowed in MH_DYLIB files
6893 lt_prog_compiler_pic='-fno-common'
6894 ;;
6895
6896 interix3*)
6897 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6898 # Instead, we relocate shared libraries at runtime.
6899 ;;
6900
6901 msdosdjgpp*)
6902 # Just because we use GCC doesn't mean we suddenly get shared libraries
6903 # on systems that don't support them.
6904 lt_prog_compiler_can_build_shared=no
6905 enable_shared=no
6906 ;;
6907
6908 sysv4*MP*)
6909 if test -d /usr/nec; then
6910 lt_prog_compiler_pic=-Kconform_pic
6911 fi
6912 ;;
6913
6914 hpux*)
6915 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6916 # not for PA HP-UX.
6917 case $host_cpu in
6918 hppa*64*|ia64*)
6919 # +Z the default
6920 ;;
6921 *)
6922 lt_prog_compiler_pic='-fPIC'
6923 ;;
6924 esac
6925 ;;
6926
6927 *)
6928 lt_prog_compiler_pic='-fPIC'
6929 ;;
6930 esac
6931 else
6932 # PORTME Check for flag to pass linker flags through the system compiler.
6933 case $host_os in
6934 aix*)
6935 lt_prog_compiler_wl='-Wl,'
6936 if test "$host_cpu" = ia64; then
6937 # AIX 5 now supports IA64 processor
6938 lt_prog_compiler_static='-Bstatic'
6939 else
6940 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
6941 fi
6942 ;;
6943 darwin*)
6944 # PIC is the default on this platform
6945 # Common symbols not allowed in MH_DYLIB files
6946 case $cc_basename in
6947 xlc*)
6948 lt_prog_compiler_pic='-qnocommon'
6949 lt_prog_compiler_wl='-Wl,'
6950 ;;
6951 esac
6952 ;;
6953
6954 mingw* | pw32* | os2*)
6955 # This hack is so that the source file can tell whether it is being
6956 # built for inclusion in a dll (and should export symbols for example).
6957 lt_prog_compiler_pic='-DDLL_EXPORT'
6958 ;;
6959
6960 hpux9* | hpux10* | hpux11*)
6961 lt_prog_compiler_wl='-Wl,'
6962 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6963 # not for PA HP-UX.
6964 case $host_cpu in
6965 hppa*64*|ia64*)
6966 # +Z the default
6967 ;;
6968 *)
6969 lt_prog_compiler_pic='+Z'
6970 ;;
6971 esac
6972 # Is there a better lt_prog_compiler_static that works with the bundled CC?
6973 lt_prog_compiler_static='${wl}-a ${wl}archive'
6974 ;;
6975
6976 irix5* | irix6* | nonstopux*)
6977 lt_prog_compiler_wl='-Wl,'
6978 # PIC (with -KPIC) is the default.
6979 lt_prog_compiler_static='-non_shared'
6980 ;;
6981
6982 newsos6)
6983 lt_prog_compiler_pic='-KPIC'
6984 lt_prog_compiler_static='-Bstatic'
6985 ;;
6986
6987 linux*)
6988 case $cc_basename in
6989 icc* | ecc*)
6990 lt_prog_compiler_wl='-Wl,'
6991 lt_prog_compiler_pic='-KPIC'
6992 lt_prog_compiler_static='-static'
6993 ;;
6994 pgcc* | pgf77* | pgf90* | pgf95*)
6995 # Portland Group compilers (*not* the Pentium gcc compiler,
6996 # which looks to be a dead project)
6997 lt_prog_compiler_wl='-Wl,'
6998 lt_prog_compiler_pic='-fpic'
6999 lt_prog_compiler_static='-Bstatic'
7000 ;;
7001 ccc*)
7002 lt_prog_compiler_wl='-Wl,'
7003 # All Alpha code is PIC.
7004 lt_prog_compiler_static='-non_shared'
7005 ;;
7006 esac
7007 ;;
7008
7009 osf3* | osf4* | osf5*)
7010 lt_prog_compiler_wl='-Wl,'
7011 # All OSF/1 code is PIC.
7012 lt_prog_compiler_static='-non_shared'
7013 ;;
7014
7015 solaris*)
7016 lt_prog_compiler_pic='-KPIC'
7017 lt_prog_compiler_static='-Bstatic'
7018 case $cc_basename in
7019 f77* | f90* | f95*)
7020 lt_prog_compiler_wl='-Qoption ld ';;
7021 *)
7022 lt_prog_compiler_wl='-Wl,';;
7023 esac
7024 ;;
7025
7026 sunos4*)
7027 lt_prog_compiler_wl='-Qoption ld '
7028 lt_prog_compiler_pic='-PIC'
7029 lt_prog_compiler_static='-Bstatic'
7030 ;;
7031
7032 sysv4 | sysv4.2uw2* | sysv4.3*)
7033 lt_prog_compiler_wl='-Wl,'
7034 lt_prog_compiler_pic='-KPIC'
7035 lt_prog_compiler_static='-Bstatic'
7036 ;;
7037
7038 sysv4*MP*)
7039 if test -d /usr/nec ;then
7040 lt_prog_compiler_pic='-Kconform_pic'
7041 lt_prog_compiler_static='-Bstatic'
7042 fi
7043 ;;
7044
7045 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7046 lt_prog_compiler_wl='-Wl,'
7047 lt_prog_compiler_pic='-KPIC'
7048 lt_prog_compiler_static='-Bstatic'
7049 ;;
7050
7051 unicos*)
7052 lt_prog_compiler_wl='-Wl,'
7053 lt_prog_compiler_can_build_shared=no
7054 ;;
7055
7056 uts4*)
7057 lt_prog_compiler_pic='-pic'
7058 lt_prog_compiler_static='-Bstatic'
7059 ;;
7060
7061 *)
7062 lt_prog_compiler_can_build_shared=no
7063 ;;
7064 esac
7065 fi
7066
7067 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
7068 echo "${ECHO_T}$lt_prog_compiler_pic" >&6
7069
7070 #
7071 # Check to make sure the PIC flag actually works.
7072 #
7073 if test -n "$lt_prog_compiler_pic"; then
7074
7075 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
7076 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
7077 if test "${lt_prog_compiler_pic_works+set}" = set; then
7078 echo $ECHO_N "(cached) $ECHO_C" >&6
7079 else
7080 lt_prog_compiler_pic_works=no
7081 ac_outfile=conftest.$ac_objext
7082 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7083 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
7084 # Insert the option either (1) after the last *FLAGS variable, or
7085 # (2) before a word containing "conftest.", or (3) at the end.
7086 # Note that $ac_compile itself does not contain backslashes and begins
7087 # with a dollar sign (not a hyphen), so the echo should work correctly.
7088 # The option is referenced via a variable to avoid confusing sed.
7089 lt_compile=`echo "$ac_compile" | $SED \
7090 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7091 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7092 -e 's:$: $lt_compiler_flag:'`
7093 (eval echo "\"\$as_me:7094: $lt_compile\"" >&5)
7094 (eval "$lt_compile" 2>conftest.err)
7095 ac_status=$?
7096 cat conftest.err >&5
7097 echo "$as_me:7098: \$? = $ac_status" >&5
7098 if (exit $ac_status) && test -s "$ac_outfile"; then
7099 # The compiler can only warn and ignore the option if not recognized
7100 # So say no if there are warnings other than the usual output.
7101 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
7102 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7103 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
7104 lt_prog_compiler_pic_works=yes
7105 fi
7106 fi
7107 $rm conftest*
7108
7109 fi
7110 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
7111 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
7112
7113 if test x"$lt_prog_compiler_pic_works" = xyes; then
7114 case $lt_prog_compiler_pic in
7115 "" | " "*) ;;
7116 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
7117 esac
7118 else
7119 lt_prog_compiler_pic=
7120 lt_prog_compiler_can_build_shared=no
7121 fi
7122
7123 fi
7124 case $host_os in
7125 # For platforms which do not support PIC, -DPIC is meaningless:
7126 *djgpp*)
7127 lt_prog_compiler_pic=
7128 ;;
7129 *)
7130 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
7131 ;;
7132 esac
7133
7134 #
7135 # Check to make sure the static flag actually works.
7136 #
7137 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
7138 echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
7139 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
7140 if test "${lt_prog_compiler_static_works+set}" = set; then
7141 echo $ECHO_N "(cached) $ECHO_C" >&6
7142 else
7143 lt_prog_compiler_static_works=no
7144 save_LDFLAGS="$LDFLAGS"
7145 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
7146 printf "$lt_simple_link_test_code" > conftest.$ac_ext
7147 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
7148 # The linker can only warn and ignore the option if not recognized
7149 # So say no if there are warnings
7150 if test -s conftest.err; then
7151 # Append any errors to the config.log.
7152 cat conftest.err 1>&5
7153 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
7154 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7155 if diff conftest.exp conftest.er2 >/dev/null; then
7156 lt_prog_compiler_static_works=yes
7157 fi
7158 else
7159 lt_prog_compiler_static_works=yes
7160 fi
7161 fi
7162 $rm conftest*
7163 LDFLAGS="$save_LDFLAGS"
7164
7165 fi
7166 echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
7167 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
7168
7169 if test x"$lt_prog_compiler_static_works" = xyes; then
7170 :
7171 else
7172 lt_prog_compiler_static=
7173 fi
7174
7175
7176 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
7177 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
7178 if test "${lt_cv_prog_compiler_c_o+set}" = set; then
7179 echo $ECHO_N "(cached) $ECHO_C" >&6
7180 else
7181 lt_cv_prog_compiler_c_o=no
7182 $rm -r conftest 2>/dev/null
7183 mkdir conftest
7184 cd conftest
7185 mkdir out
7186 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7187
7188 lt_compiler_flag="-o out/conftest2.$ac_objext"
7189 # Insert the option either (1) after the last *FLAGS variable, or
7190 # (2) before a word containing "conftest.", or (3) at the end.
7191 # Note that $ac_compile itself does not contain backslashes and begins
7192 # with a dollar sign (not a hyphen), so the echo should work correctly.
7193 lt_compile=`echo "$ac_compile" | $SED \
7194 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7195 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7196 -e 's:$: $lt_compiler_flag:'`
7197 (eval echo "\"\$as_me:7198: $lt_compile\"" >&5)
7198 (eval "$lt_compile" 2>out/conftest.err)
7199 ac_status=$?
7200 cat out/conftest.err >&5
7201 echo "$as_me:7202: \$? = $ac_status" >&5
7202 if (exit $ac_status) && test -s out/conftest2.$ac_objext
7203 then
7204 # The compiler can only warn and ignore the option if not recognized
7205 # So say no if there are warnings
7206 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
7207 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
7208 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
7209 lt_cv_prog_compiler_c_o=yes
7210 fi
7211 fi
7212 chmod u+w . 2>&5
7213 $rm conftest*
7214 # SGI C++ compiler will create directory out/ii_files/ for
7215 # template instantiation
7216 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
7217 $rm out/* && rmdir out
7218 cd ..
7219 rmdir conftest
7220 $rm conftest*
7221
7222 fi
7223 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
7224 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
7225
7226
7227 hard_links="nottested"
7228 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
7229 # do not overwrite the value of need_locks provided by the user
7230 echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
7231 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
7232 hard_links=yes
7233 $rm conftest*
7234 ln conftest.a conftest.b 2>/dev/null && hard_links=no
7235 touch conftest.a
7236 ln conftest.a conftest.b 2>&5 || hard_links=no
7237 ln conftest.a conftest.b 2>/dev/null && hard_links=no
7238 echo "$as_me:$LINENO: result: $hard_links" >&5
7239 echo "${ECHO_T}$hard_links" >&6
7240 if test "$hard_links" = no; then
7241 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
7242 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
7243 need_locks=warn
7244 fi
7245 else
7246 need_locks=no
7247 fi
7248
7249 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
7250 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
7251
7252 runpath_var=
7253 allow_undefined_flag=
7254 enable_shared_with_static_runtimes=no
7255 archive_cmds=
7256 archive_expsym_cmds=
7257 old_archive_From_new_cmds=
7258 old_archive_from_expsyms_cmds=
7259 export_dynamic_flag_spec=
7260 whole_archive_flag_spec=
7261 thread_safe_flag_spec=
7262 hardcode_libdir_flag_spec=
7263 hardcode_libdir_flag_spec_ld=
7264 hardcode_libdir_separator=
7265 hardcode_direct=no
7266 hardcode_minus_L=no
7267 hardcode_shlibpath_var=unsupported
7268 link_all_deplibs=unknown
7269 hardcode_automatic=no
7270 module_cmds=
7271 module_expsym_cmds=
7272 always_export_symbols=no
7273 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7274 # include_expsyms should be a list of space-separated symbols to be *always*
7275 # included in the symbol list
7276 include_expsyms=
7277 # exclude_expsyms can be an extended regexp of symbols to exclude
7278 # it will be wrapped by ` (' and `)$', so one must not match beginning or
7279 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
7280 # as well as any symbol that contains `d'.
7281 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
7282 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
7283 # platforms (ab)use it in PIC code, but their linkers get confused if
7284 # the symbol is explicitly referenced. Since portable code cannot
7285 # rely on this symbol name, it's probably fine to never include it in
7286 # preloaded symbol tables.
7287 extract_expsyms_cmds=
7288 # Just being paranoid about ensuring that cc_basename is set.
7289 for cc_temp in $compiler""; do
7290 case $cc_temp in
7291 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7292 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7293 \-*) ;;
7294 *) break;;
7295 esac
7296 done
7297 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
7298
7299 case $host_os in
7300 cygwin* | mingw* | pw32*)
7301 # FIXME: the MSVC++ port hasn't been tested in a loooong time
7302 # When not using gcc, we currently assume that we are using
7303 # Microsoft Visual C++.
7304 if test "$GCC" != yes; then
7305 with_gnu_ld=no
7306 fi
7307 ;;
7308 interix*)
7309 # we just hope/assume this is gcc and not c89 (= MSVC++)
7310 with_gnu_ld=yes
7311 ;;
7312 openbsd*)
7313 with_gnu_ld=no
7314 ;;
7315 esac
7316
7317 ld_shlibs=yes
7318 if test "$with_gnu_ld" = yes; then
7319 # If archive_cmds runs LD, not CC, wlarc should be empty
7320 wlarc='${wl}'
7321
7322 # Set some defaults for GNU ld with shared library support. These
7323 # are reset later if shared libraries are not supported. Putting them
7324 # here allows them to be overridden if necessary.
7325 runpath_var=LD_RUN_PATH
7326 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
7327 export_dynamic_flag_spec='${wl}--export-dynamic'
7328 # ancient GNU ld didn't support --whole-archive et. al.
7329 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
7330 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7331 else
7332 whole_archive_flag_spec=
7333 fi
7334 supports_anon_versioning=no
7335 case `$LD -v 2>/dev/null` in
7336 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
7337 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
7338 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
7339 *\ 2.11.*) ;; # other 2.11 versions
7340 *) supports_anon_versioning=yes ;;
7341 esac
7342
7343 # See if GNU ld supports shared libraries.
7344 case $host_os in
7345 aix3* | aix4* | aix5*)
7346 # On AIX/PPC, the GNU linker is very broken
7347 if test "$host_cpu" != ia64; then
7348 ld_shlibs=no
7349 cat <<EOF 1>&2
7350
7351 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
7352 *** to be unable to reliably create shared libraries on AIX.
7353 *** Therefore, libtool is disabling shared libraries support. If you
7354 *** really care for shared libraries, you may want to modify your PATH
7355 *** so that a non-GNU linker is found, and then restart.
7356
7357 EOF
7358 fi
7359 ;;
7360
7361 amigaos*)
7362 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
7363 hardcode_libdir_flag_spec='-L$libdir'
7364 hardcode_minus_L=yes
7365
7366 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
7367 # that the semantics of dynamic libraries on AmigaOS, at least up
7368 # to version 4, is to share data among multiple programs linked
7369 # with the same dynamic library. Since this doesn't match the
7370 # behavior of shared libraries on other platforms, we can't use
7371 # them.
7372 ld_shlibs=no
7373 ;;
7374
7375 beos*)
7376 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7377 allow_undefined_flag=unsupported
7378 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7379 # support --undefined. This deserves some investigation. FIXME
7380 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7381 else
7382 ld_shlibs=no
7383 fi
7384 ;;
7385
7386 cygwin* | mingw* | pw32*)
7387 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
7388 # as there is no search path for DLLs.
7389 hardcode_libdir_flag_spec='-L$libdir'
7390 allow_undefined_flag=unsupported
7391 always_export_symbols=no
7392 enable_shared_with_static_runtimes=yes
7393 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
7394
7395 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
7396 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7397 # If the export-symbols file already is a .def file (1st line
7398 # is EXPORTS), use it as is; otherwise, prepend...
7399 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7400 cp $export_symbols $output_objdir/$soname.def;
7401 else
7402 echo EXPORTS > $output_objdir/$soname.def;
7403 cat $export_symbols >> $output_objdir/$soname.def;
7404 fi~
7405 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7406 else
7407 ld_shlibs=no
7408 fi
7409 ;;
7410
7411 interix3*)
7412 hardcode_direct=no
7413 hardcode_shlibpath_var=no
7414 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
7415 export_dynamic_flag_spec='${wl}-E'
7416 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7417 # Instead, shared libraries are loaded at an image base (0x10000000 by
7418 # default) and relocated if they conflict, which is a slow very memory
7419 # consuming and fragmenting process. To avoid this, we pick a random,
7420 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7421 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
7422 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7423 archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7424 ;;
7425
7426 linux*)
7427 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7428 tmp_addflag=
7429 case $cc_basename,$host_cpu in
7430 pgcc*) # Portland Group C compiler
7431 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7432 tmp_addflag=' $pic_flag'
7433 ;;
7434 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
7435 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7436 tmp_addflag=' $pic_flag -Mnomain' ;;
7437 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
7438 tmp_addflag=' -i_dynamic' ;;
7439 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
7440 tmp_addflag=' -i_dynamic -nofor_main' ;;
7441 ifc* | ifort*) # Intel Fortran compiler
7442 tmp_addflag=' -nofor_main' ;;
7443 esac
7444 archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7445
7446 if test $supports_anon_versioning = yes; then
7447 archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
7448 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7449 $echo "local: *; };" >> $output_objdir/$libname.ver~
7450 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7451 fi
7452 link_all_deplibs=no
7453 else
7454 ld_shlibs=no
7455 fi
7456 ;;
7457
7458 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
7459 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7460 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7461 wlarc=
7462 else
7463 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7464 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7465 fi
7466 ;;
7467
7468 solaris*)
7469 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
7470 ld_shlibs=no
7471 cat <<EOF 1>&2
7472
7473 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
7474 *** create shared libraries on Solaris systems. Therefore, libtool
7475 *** is disabling shared libraries support. We urge you to upgrade GNU
7476 *** binutils to release 2.9.1 or newer. Another option is to modify
7477 *** your PATH or compiler configuration so that the native linker is
7478 *** used, and then restart.
7479
7480 EOF
7481 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7482 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7483 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7484 else
7485 ld_shlibs=no
7486 fi
7487 ;;
7488
7489 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
7490 case `$LD -v 2>&1` in
7491 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
7492 ld_shlibs=no
7493 cat <<_LT_EOF 1>&2
7494
7495 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
7496 *** reliably create shared libraries on SCO systems. Therefore, libtool
7497 *** is disabling shared libraries support. We urge you to upgrade GNU
7498 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
7499 *** your PATH or compiler configuration so that the native linker is
7500 *** used, and then restart.
7501
7502 _LT_EOF
7503 ;;
7504 *)
7505 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7506 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
7507 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
7508 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
7509 else
7510 ld_shlibs=no
7511 fi
7512 ;;
7513 esac
7514 ;;
7515
7516 sunos4*)
7517 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7518 wlarc=
7519 hardcode_direct=yes
7520 hardcode_shlibpath_var=no
7521 ;;
7522
7523 *)
7524 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7525 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7526 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7527 else
7528 ld_shlibs=no
7529 fi
7530 ;;
7531 esac
7532
7533 if test "$ld_shlibs" = no; then
7534 runpath_var=
7535 hardcode_libdir_flag_spec=
7536 export_dynamic_flag_spec=
7537 whole_archive_flag_spec=
7538 fi
7539 else
7540 # PORTME fill in a description of your system's linker (not GNU ld)
7541 case $host_os in
7542 aix3*)
7543 allow_undefined_flag=unsupported
7544 always_export_symbols=yes
7545 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
7546 # Note: this linker hardcodes the directories in LIBPATH if there
7547 # are no directories specified by -L.
7548 hardcode_minus_L=yes
7549 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
7550 # Neither direct hardcoding nor static linking is supported with a
7551 # broken collect2.
7552 hardcode_direct=unsupported
7553 fi
7554 ;;
7555
7556 aix4* | aix5*)
7557 if test "$host_cpu" = ia64; then
7558 # On IA64, the linker does run time linking by default, so we don't
7559 # have to do anything special.
7560 aix_use_runtimelinking=no
7561 exp_sym_flag='-Bexport'
7562 no_entry_flag=""
7563 else
7564 # If we're using GNU nm, then we don't want the "-C" option.
7565 # -C means demangle to AIX nm, but means don't demangle with GNU nm
7566 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7567 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
7568 else
7569 export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
7570 fi
7571 aix_use_runtimelinking=no
7572
7573 # Test if we are trying to use run time linking or normal
7574 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7575 # need to do runtime linking.
7576 case $host_os in aix4.[23]|aix4.[23].*|aix5*)
7577 for ld_flag in $LDFLAGS; do
7578 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7579 aix_use_runtimelinking=yes
7580 break
7581 fi
7582 done
7583 ;;
7584 esac
7585
7586 exp_sym_flag='-bexport'
7587 no_entry_flag='-bnoentry'
7588 fi
7589
7590 # When large executables or shared objects are built, AIX ld can
7591 # have problems creating the table of contents. If linking a library
7592 # or program results in "error TOC overflow" add -mminimal-toc to
7593 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7594 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7595
7596 archive_cmds=''
7597 hardcode_direct=yes
7598 hardcode_libdir_separator=':'
7599 link_all_deplibs=yes
7600
7601 if test "$GCC" = yes; then
7602 case $host_os in aix4.[012]|aix4.[012].*)
7603 # We only want to do this on AIX 4.2 and lower, the check
7604 # below for broken collect2 doesn't work under 4.3+
7605 collect2name=`${CC} -print-prog-name=collect2`
7606 if test -f "$collect2name" && \
7607 strings "$collect2name" | grep resolve_lib_name >/dev/null
7608 then
7609 # We have reworked collect2
7610 hardcode_direct=yes
7611 else
7612 # We have old collect2
7613 hardcode_direct=unsupported
7614 # It fails to find uninstalled libraries when the uninstalled
7615 # path is not listed in the libpath. Setting hardcode_minus_L
7616 # to unsupported forces relinking
7617 hardcode_minus_L=yes
7618 hardcode_libdir_flag_spec='-L$libdir'
7619 hardcode_libdir_separator=
7620 fi
7621 ;;
7622 esac
7623 shared_flag='-shared'
7624 if test "$aix_use_runtimelinking" = yes; then
7625 shared_flag="$shared_flag "'${wl}-G'
7626 fi
7627 else
7628 # not using gcc
7629 if test "$host_cpu" = ia64; then
7630 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7631 # chokes on -Wl,-G. The following line is correct:
7632 shared_flag='-G'
7633 else
7634 if test "$aix_use_runtimelinking" = yes; then
7635 shared_flag='${wl}-G'
7636 else
7637 shared_flag='${wl}-bM:SRE'
7638 fi
7639 fi
7640 fi
7641
7642 # It seems that -bexpall does not export symbols beginning with
7643 # underscore (_), so it is better to generate a list of symbols to export.
7644 always_export_symbols=yes
7645 if test "$aix_use_runtimelinking" = yes; then
7646 # Warning - without using the other runtime loading flags (-brtl),
7647 # -berok will link without error, but may produce a broken library.
7648 allow_undefined_flag='-berok'
7649 # Determine the default libpath from the value encoded in an empty executable.
7650 cat >conftest.$ac_ext <<_ACEOF
7651 /* confdefs.h. */
7652 _ACEOF
7653 cat confdefs.h >>conftest.$ac_ext
7654 cat >>conftest.$ac_ext <<_ACEOF
7655 /* end confdefs.h. */
7656
7657 int
7658 main ()
7659 {
7660
7661 ;
7662 return 0;
7663 }
7664 _ACEOF
7665 rm -f conftest.$ac_objext conftest$ac_exeext
7666 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7667 (eval $ac_link) 2>conftest.er1
7668 ac_status=$?
7669 grep -v '^ *+' conftest.er1 >conftest.err
7670 rm -f conftest.er1
7671 cat conftest.err >&5
7672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7673 (exit $ac_status); } &&
7674 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7676 (eval $ac_try) 2>&5
7677 ac_status=$?
7678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7679 (exit $ac_status); }; } &&
7680 { ac_try='test -s conftest$ac_exeext'
7681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7682 (eval $ac_try) 2>&5
7683 ac_status=$?
7684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7685 (exit $ac_status); }; }; then
7686
7687 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
7688 }'`
7689 # Check for a 64-bit object if we didn't find anything.
7690 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
7691 }'`; fi
7692 else
7693 echo "$as_me: failed program was:" >&5
7694 sed 's/^/| /' conftest.$ac_ext >&5
7695
7696 fi
7697 rm -f conftest.err conftest.$ac_objext \
7698 conftest$ac_exeext conftest.$ac_ext
7699 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
7700
7701 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
7702 archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7703 else
7704 if test "$host_cpu" = ia64; then
7705 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
7706 allow_undefined_flag="-z nodefs"
7707 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
7708 else
7709 # Determine the default libpath from the value encoded in an empty executable.
7710 cat >conftest.$ac_ext <<_ACEOF
7711 /* confdefs.h. */
7712 _ACEOF
7713 cat confdefs.h >>conftest.$ac_ext
7714 cat >>conftest.$ac_ext <<_ACEOF
7715 /* end confdefs.h. */
7716
7717 int
7718 main ()
7719 {
7720
7721 ;
7722 return 0;
7723 }
7724 _ACEOF
7725 rm -f conftest.$ac_objext conftest$ac_exeext
7726 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7727 (eval $ac_link) 2>conftest.er1
7728 ac_status=$?
7729 grep -v '^ *+' conftest.er1 >conftest.err
7730 rm -f conftest.er1
7731 cat conftest.err >&5
7732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7733 (exit $ac_status); } &&
7734 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7736 (eval $ac_try) 2>&5
7737 ac_status=$?
7738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7739 (exit $ac_status); }; } &&
7740 { ac_try='test -s conftest$ac_exeext'
7741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7742 (eval $ac_try) 2>&5
7743 ac_status=$?
7744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7745 (exit $ac_status); }; }; then
7746
7747 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
7748 }'`
7749 # Check for a 64-bit object if we didn't find anything.
7750 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
7751 }'`; fi
7752 else
7753 echo "$as_me: failed program was:" >&5
7754 sed 's/^/| /' conftest.$ac_ext >&5
7755
7756 fi
7757 rm -f conftest.err conftest.$ac_objext \
7758 conftest$ac_exeext conftest.$ac_ext
7759 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
7760
7761 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
7762 # Warning - without using the other run time loading flags,
7763 # -berok will link without error, but may produce a broken library.
7764 no_undefined_flag=' ${wl}-bernotok'
7765 allow_undefined_flag=' ${wl}-berok'
7766 # Exported symbols can be pulled into shared objects from archives
7767 whole_archive_flag_spec='$convenience'
7768 archive_cmds_need_lc=yes
7769 # This is similar to how AIX traditionally builds its shared libraries.
7770 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7771 fi
7772 fi
7773 ;;
7774
7775 amigaos*)
7776 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
7777 hardcode_libdir_flag_spec='-L$libdir'
7778 hardcode_minus_L=yes
7779 # see comment about different semantics on the GNU ld section
7780 ld_shlibs=no
7781 ;;
7782
7783 bsdi[45]*)
7784 export_dynamic_flag_spec=-rdynamic
7785 ;;
7786
7787 cygwin* | mingw* | pw32*)
7788 # When not using gcc, we currently assume that we are using
7789 # Microsoft Visual C++.
7790 # hardcode_libdir_flag_spec is actually meaningless, as there is
7791 # no search path for DLLs.
7792 hardcode_libdir_flag_spec=' '
7793 allow_undefined_flag=unsupported
7794 # Tell ltmain to make .lib files, not .a files.
7795 libext=lib
7796 # Tell ltmain to make .dll files, not .so files.
7797 shrext_cmds=".dll"
7798 # FIXME: Setting linknames here is a bad hack.
7799 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
7800 # The linker will automatically build a .lib file if we build a DLL.
7801 old_archive_From_new_cmds='true'
7802 # FIXME: Should let the user specify the lib program.
7803 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
7804 fix_srcfile_path='`cygpath -w "$srcfile"`'
7805 enable_shared_with_static_runtimes=yes
7806 ;;
7807
7808 darwin* | rhapsody*)
7809 case $host_os in
7810 rhapsody* | darwin1.[012])
7811 allow_undefined_flag='${wl}-undefined ${wl}suppress'
7812 ;;
7813 *) # Darwin 1.3 on
7814 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
7815 allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7816 else
7817 case ${MACOSX_DEPLOYMENT_TARGET} in
7818 10.[012])
7819 allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7820 ;;
7821 10.*)
7822 allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
7823 ;;
7824 esac
7825 fi
7826 ;;
7827 esac
7828 archive_cmds_need_lc=no
7829 hardcode_direct=no
7830 hardcode_automatic=yes
7831 hardcode_shlibpath_var=unsupported
7832 whole_archive_flag_spec=''
7833 link_all_deplibs=yes
7834 if test "$GCC" = yes ; then
7835 output_verbose_link_cmd='echo'
7836 archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
7837 module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7838 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7839 archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7840 module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7841 else
7842 case $cc_basename in
7843 xlc*)
7844 output_verbose_link_cmd='echo'
7845 archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
7846 module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7847 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7848 archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7849 module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7850 ;;
7851 *)
7852 ld_shlibs=no
7853 ;;
7854 esac
7855 fi
7856 ;;
7857
7858 dgux*)
7859 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7860 hardcode_libdir_flag_spec='-L$libdir'
7861 hardcode_shlibpath_var=no
7862 ;;
7863
7864 freebsd1*)
7865 ld_shlibs=no
7866 ;;
7867
7868 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7869 # support. Future versions do this automatically, but an explicit c++rt0.o
7870 # does not break anything, and helps significantly (at the cost of a little
7871 # extra space).
7872 freebsd2.2*)
7873 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7874 hardcode_libdir_flag_spec='-R$libdir'
7875 hardcode_direct=yes
7876 hardcode_shlibpath_var=no
7877 ;;
7878
7879 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7880 freebsd2*)
7881 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7882 hardcode_direct=yes
7883 hardcode_minus_L=yes
7884 hardcode_shlibpath_var=no
7885 ;;
7886
7887 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7888 freebsd* | dragonfly*)
7889 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7890 hardcode_libdir_flag_spec='-R$libdir'
7891 hardcode_direct=yes
7892 hardcode_shlibpath_var=no
7893 ;;
7894
7895 # GNU/kFreeBSD uses gcc -shared to do shared libraries.
7896 kfreebsd*-gnu)
7897 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7898 hardcode_libdir_flag_spec='-R$libdir'
7899 hardcode_direct=yes
7900 hardcode_shlibpath_var=no
7901 link_all_deplibs=no
7902 ;;
7903
7904 hpux9*)
7905 if test "$GCC" = yes; then
7906 archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7907 else
7908 archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7909 fi
7910 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
7911 hardcode_libdir_separator=:
7912 hardcode_direct=yes
7913
7914 # hardcode_minus_L: Not really in the search PATH,
7915 # but as the default location of the library.
7916 hardcode_minus_L=yes
7917 export_dynamic_flag_spec='${wl}-E'
7918 ;;
7919
7920 hpux10*)
7921 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7922 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7923 else
7924 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7925 fi
7926 if test "$with_gnu_ld" = no; then
7927 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
7928 hardcode_libdir_separator=:
7929
7930 hardcode_direct=yes
7931 export_dynamic_flag_spec='${wl}-E'
7932
7933 # hardcode_minus_L: Not really in the search PATH,
7934 # but as the default location of the library.
7935 hardcode_minus_L=yes
7936 fi
7937 ;;
7938
7939 hpux11*)
7940 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7941 case $host_cpu in
7942 hppa*64*)
7943 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7944 ;;
7945 ia64*)
7946 archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7947 ;;
7948 *)
7949 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7950 ;;
7951 esac
7952 else
7953 case $host_cpu in
7954 hppa*64*)
7955 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7956 ;;
7957 ia64*)
7958 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7959 ;;
7960 *)
7961 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7962 ;;
7963 esac
7964 fi
7965 if test "$with_gnu_ld" = no; then
7966 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
7967 hardcode_libdir_separator=:
7968
7969 case $host_cpu in
7970 hppa*64*|ia64*)
7971 hardcode_libdir_flag_spec_ld='+b $libdir'
7972 hardcode_direct=no
7973 hardcode_shlibpath_var=no
7974 ;;
7975 *)
7976 hardcode_direct=yes
7977 export_dynamic_flag_spec='${wl}-E'
7978
7979 # hardcode_minus_L: Not really in the search PATH,
7980 # but as the default location of the library.
7981 hardcode_minus_L=yes
7982 ;;
7983 esac
7984 fi
7985 ;;
7986
7987 irix5* | irix6* | nonstopux*)
7988 if test "$GCC" = yes; then
7989 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7990 else
7991 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7992 hardcode_libdir_flag_spec_ld='-rpath $libdir'
7993 fi
7994 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
7995 hardcode_libdir_separator=:
7996 link_all_deplibs=yes
7997 ;;
7998
7999 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
8000 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8001 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
8002 else
8003 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
8004 fi
8005 hardcode_libdir_flag_spec='-R$libdir'
8006 hardcode_direct=yes
8007 hardcode_shlibpath_var=no
8008 ;;
8009
8010 newsos6)
8011 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8012 hardcode_direct=yes
8013 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8014 hardcode_libdir_separator=:
8015 hardcode_shlibpath_var=no
8016 ;;
8017
8018 openbsd*)
8019 hardcode_direct=yes
8020 hardcode_shlibpath_var=no
8021 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8022 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8023 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8024 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8025 export_dynamic_flag_spec='${wl}-E'
8026 else
8027 case $host_os in
8028 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
8029 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8030 hardcode_libdir_flag_spec='-R$libdir'
8031 ;;
8032 *)
8033 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8034 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8035 ;;
8036 esac
8037 fi
8038 ;;
8039
8040 os2*)
8041 hardcode_libdir_flag_spec='-L$libdir'
8042 hardcode_minus_L=yes
8043 allow_undefined_flag=unsupported
8044 archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
8045 old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8046 ;;
8047
8048 osf3*)
8049 if test "$GCC" = yes; then
8050 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8051 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8052 else
8053 allow_undefined_flag=' -expect_unresolved \*'
8054 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
8055 fi
8056 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8057 hardcode_libdir_separator=:
8058 ;;
8059
8060 osf4* | osf5*) # as osf3* with the addition of -msym flag
8061 if test "$GCC" = yes; then
8062 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8063 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8064 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8065 else
8066 allow_undefined_flag=' -expect_unresolved \*'
8067 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
8068 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
8069 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
8070
8071 # Both c and cxx compiler support -rpath directly
8072 hardcode_libdir_flag_spec='-rpath $libdir'
8073 fi
8074 hardcode_libdir_separator=:
8075 ;;
8076
8077 solaris*)
8078 no_undefined_flag=' -z text'
8079 if test "$GCC" = yes; then
8080 wlarc='${wl}'
8081 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8082 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8083 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
8084 else
8085 wlarc=''
8086 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8087 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8088 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8089 fi
8090 hardcode_libdir_flag_spec='-R$libdir'
8091 hardcode_shlibpath_var=no
8092 case $host_os in
8093 solaris2.[0-5] | solaris2.[0-5].*) ;;
8094 *)
8095 # The compiler driver will combine linker options so we
8096 # cannot just pass the convience library names through
8097 # without $wl, iff we do not link with $LD.
8098 # Luckily, gcc supports the same syntax we need for Sun Studio.
8099 # Supported since Solaris 2.6 (maybe 2.5.1?)
8100 case $wlarc in
8101 '')
8102 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
8103 *)
8104 whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
8105 esac ;;
8106 esac
8107 link_all_deplibs=yes
8108 ;;
8109
8110 sunos4*)
8111 if test "x$host_vendor" = xsequent; then
8112 # Use $CC to link under sequent, because it throws in some extra .o
8113 # files that make .init and .fini sections work.
8114 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8115 else
8116 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8117 fi
8118 hardcode_libdir_flag_spec='-L$libdir'
8119 hardcode_direct=yes
8120 hardcode_minus_L=yes
8121 hardcode_shlibpath_var=no
8122 ;;
8123
8124 sysv4)
8125 case $host_vendor in
8126 sni)
8127 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8128 hardcode_direct=yes # is this really true???
8129 ;;
8130 siemens)
8131 ## LD is ld it makes a PLAMLIB
8132 ## CC just makes a GrossModule.
8133 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8134 reload_cmds='$CC -r -o $output$reload_objs'
8135 hardcode_direct=no
8136 ;;
8137 motorola)
8138 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8139 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
8140 ;;
8141 esac
8142 runpath_var='LD_RUN_PATH'
8143 hardcode_shlibpath_var=no
8144 ;;
8145
8146 sysv4.3*)
8147 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8148 hardcode_shlibpath_var=no
8149 export_dynamic_flag_spec='-Bexport'
8150 ;;
8151
8152 sysv4*MP*)
8153 if test -d /usr/nec; then
8154 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8155 hardcode_shlibpath_var=no
8156 runpath_var=LD_RUN_PATH
8157 hardcode_runpath_var=yes
8158 ld_shlibs=yes
8159 fi
8160 ;;
8161
8162 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
8163 no_undefined_flag='${wl}-z,text'
8164 archive_cmds_need_lc=no
8165 hardcode_shlibpath_var=no
8166 runpath_var='LD_RUN_PATH'
8167
8168 if test "$GCC" = yes; then
8169 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8170 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8171 else
8172 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8173 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8174 fi
8175 ;;
8176
8177 sysv5* | sco3.2v5* | sco5v6*)
8178 # Note: We can NOT use -z defs as we might desire, because we do not
8179 # link with -lc, and that would cause any symbols used from libc to
8180 # always be unresolved, which means just about no library would
8181 # ever link correctly. If we're not using GNU ld we use -z text
8182 # though, which does catch some bad symbols but isn't as heavy-handed
8183 # as -z defs.
8184 no_undefined_flag='${wl}-z,text'
8185 allow_undefined_flag='${wl}-z,nodefs'
8186 archive_cmds_need_lc=no
8187 hardcode_shlibpath_var=no
8188 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
8189 hardcode_libdir_separator=':'
8190 link_all_deplibs=yes
8191 export_dynamic_flag_spec='${wl}-Bexport'
8192 runpath_var='LD_RUN_PATH'
8193
8194 if test "$GCC" = yes; then
8195 archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8196 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8197 else
8198 archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8199 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8200 fi
8201 ;;
8202
8203 uts4*)
8204 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8205 hardcode_libdir_flag_spec='-L$libdir'
8206 hardcode_shlibpath_var=no
8207 ;;
8208
8209 *)
8210 ld_shlibs=no
8211 ;;
8212 esac
8213 fi
8214
8215 echo "$as_me:$LINENO: result: $ld_shlibs" >&5
8216 echo "${ECHO_T}$ld_shlibs" >&6
8217 test "$ld_shlibs" = no && can_build_shared=no
8218
8219 #
8220 # Do we need to explicitly link libc?
8221 #
8222 case "x$archive_cmds_need_lc" in
8223 x|xyes)
8224 # Assume -lc should be added
8225 archive_cmds_need_lc=yes
8226
8227 if test "$enable_shared" = yes && test "$GCC" = yes; then
8228 case $archive_cmds in
8229 *'~'*)
8230 # FIXME: we may have to deal with multi-command sequences.
8231 ;;
8232 '$CC '*)
8233 # Test whether the compiler implicitly links with -lc since on some
8234 # systems, -lgcc has to come before -lc. If gcc already passes -lc
8235 # to ld, don't add -lc before -lgcc.
8236 echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
8237 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
8238 $rm conftest*
8239 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8240
8241 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8242 (eval $ac_compile) 2>&5
8243 ac_status=$?
8244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8245 (exit $ac_status); } 2>conftest.err; then
8246 soname=conftest
8247 lib=conftest
8248 libobjs=conftest.$ac_objext
8249 deplibs=
8250 wl=$lt_prog_compiler_wl
8251 pic_flag=$lt_prog_compiler_pic
8252 compiler_flags=-v
8253 linker_flags=-v
8254 verstring=
8255 output_objdir=.
8256 libname=conftest
8257 lt_save_allow_undefined_flag=$allow_undefined_flag
8258 allow_undefined_flag=
8259 if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
8260 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
8261 ac_status=$?
8262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8263 (exit $ac_status); }
8264 then
8265 archive_cmds_need_lc=no
8266 else
8267 archive_cmds_need_lc=yes
8268 fi
8269 allow_undefined_flag=$lt_save_allow_undefined_flag
8270 else
8271 cat conftest.err 1>&5
8272 fi
8273 $rm conftest*
8274 echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
8275 echo "${ECHO_T}$archive_cmds_need_lc" >&6
8276 ;;
8277 esac
8278 fi
8279 ;;
8280 esac
8281
8282 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
8283 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
8284 library_names_spec=
8285 libname_spec='lib$name'
8286 soname_spec=
8287 shrext_cmds=".so"
8288 postinstall_cmds=
8289 postuninstall_cmds=
8290 finish_cmds=
8291 finish_eval=
8292 shlibpath_var=
8293 shlibpath_overrides_runpath=unknown
8294 version_type=none
8295 dynamic_linker="$host_os ld.so"
8296 sys_lib_dlsearch_path_spec="/lib /usr/lib"
8297 if test "$GCC" = yes; then
8298 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
8299 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
8300 # if the path contains ";" then we assume it to be the separator
8301 # otherwise default to the standard path separator (i.e. ":") - it is
8302 # assumed that no part of a normal pathname contains ";" but that should
8303 # okay in the real world where ";" in dirpaths is itself problematic.
8304 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
8305 else
8306 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
8307 fi
8308 else
8309 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
8310 fi
8311 need_lib_prefix=unknown
8312 hardcode_into_libs=no
8313
8314 # when you set need_version to no, make sure it does not cause -set_version
8315 # flags to be left without arguments
8316 need_version=unknown
8317
8318 case $host_os in
8319 aix3*)
8320 version_type=linux
8321 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
8322 shlibpath_var=LIBPATH
8323
8324 # AIX 3 has no versioning support, so we append a major version to the name.
8325 soname_spec='${libname}${release}${shared_ext}$major'
8326 ;;
8327
8328 aix4* | aix5*)
8329 version_type=linux
8330 need_lib_prefix=no
8331 need_version=no
8332 hardcode_into_libs=yes
8333 if test "$host_cpu" = ia64; then
8334 # AIX 5 supports IA64
8335 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
8336 shlibpath_var=LD_LIBRARY_PATH
8337 else
8338 # With GCC up to 2.95.x, collect2 would create an import file
8339 # for dependence libraries. The import file would start with
8340 # the line `#! .'. This would cause the generated library to
8341 # depend on `.', always an invalid library. This was fixed in
8342 # development snapshots of GCC prior to 3.0.
8343 case $host_os in
8344 aix4 | aix4.[01] | aix4.[01].*)
8345 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
8346 echo ' yes '
8347 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
8348 :
8349 else
8350 can_build_shared=no
8351 fi
8352 ;;
8353 esac
8354 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
8355 # soname into executable. Probably we can add versioning support to
8356 # collect2, so additional links can be useful in future.
8357 if test "$aix_use_runtimelinking" = yes; then
8358 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
8359 # instead of lib<name>.a to let people know that these are not
8360 # typical AIX shared libraries.
8361 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8362 else
8363 # We preserve .a as extension for shared libraries through AIX4.2
8364 # and later when we are not doing run time linking.
8365 library_names_spec='${libname}${release}.a $libname.a'
8366 soname_spec='${libname}${release}${shared_ext}$major'
8367 fi
8368 shlibpath_var=LIBPATH
8369 fi
8370 ;;
8371
8372 amigaos*)
8373 library_names_spec='$libname.ixlibrary $libname.a'
8374 # Create ${libname}_ixlibrary.a entries in /sys/libs.
8375 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
8376 ;;
8377
8378 beos*)
8379 library_names_spec='${libname}${shared_ext}'
8380 dynamic_linker="$host_os ld.so"
8381 shlibpath_var=LIBRARY_PATH
8382 ;;
8383
8384 bsdi[45]*)
8385 version_type=linux
8386 need_version=no
8387 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8388 soname_spec='${libname}${release}${shared_ext}$major'
8389 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
8390 shlibpath_var=LD_LIBRARY_PATH
8391 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
8392 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
8393 # the default ld.so.conf also contains /usr/contrib/lib and
8394 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
8395 # libtool to hard-code these into programs
8396 ;;
8397
8398 cygwin* | mingw* | pw32*)
8399 version_type=windows
8400 shrext_cmds=".dll"
8401 need_version=no
8402 need_lib_prefix=no
8403
8404 case $GCC,$host_os in
8405 yes,cygwin* | yes,mingw* | yes,pw32*)
8406 library_names_spec='$libname.dll.a'
8407 # DLL is installed to $(libdir)/../bin by postinstall_cmds
8408 postinstall_cmds='base_file=`basename \${file}`~
8409 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
8410 dldir=$destdir/`dirname \$dlpath`~
8411 test -d \$dldir || mkdir -p \$dldir~
8412 $install_prog $dir/$dlname \$dldir/$dlname~
8413 chmod a+x \$dldir/$dlname'
8414 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
8415 dlpath=$dir/\$dldll~
8416 $rm \$dlpath'
8417 shlibpath_overrides_runpath=yes
8418
8419 case $host_os in
8420 cygwin*)
8421 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
8422 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
8423 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
8424 ;;
8425 mingw*)
8426 # MinGW DLLs use traditional 'lib' prefix
8427 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
8428 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
8429 if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
8430 # It is most probably a Windows format PATH printed by
8431 # mingw gcc, but we are running on Cygwin. Gcc prints its search
8432 # path with ; separators, and with drive letters. We can handle the
8433 # drive letters (cygwin fileutils understands them), so leave them,
8434 # especially as we might pass files found there to a mingw objdump,
8435 # which wouldn't understand a cygwinified path. Ahh.
8436 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
8437 else
8438 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
8439 fi
8440 ;;
8441 pw32*)
8442 # pw32 DLLs use 'pw' prefix rather than 'lib'
8443 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
8444 ;;
8445 esac
8446 ;;
8447
8448 *)
8449 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
8450 ;;
8451 esac
8452 dynamic_linker='Win32 ld.exe'
8453 # FIXME: first we should search . and the directory the executable is in
8454 shlibpath_var=PATH
8455 ;;
8456
8457 darwin* | rhapsody*)
8458 dynamic_linker="$host_os dyld"
8459 version_type=darwin
8460 need_lib_prefix=no
8461 need_version=no
8462 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
8463 soname_spec='${libname}${release}${major}$shared_ext'
8464 shlibpath_overrides_runpath=yes
8465 shlibpath_var=DYLD_LIBRARY_PATH
8466 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
8467 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
8468 if test "$GCC" = yes; then
8469 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
8470 else
8471 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
8472 fi
8473 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
8474 ;;
8475
8476 dgux*)
8477 version_type=linux
8478 need_lib_prefix=no
8479 need_version=no
8480 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
8481 soname_spec='${libname}${release}${shared_ext}$major'
8482 shlibpath_var=LD_LIBRARY_PATH
8483 ;;
8484
8485 freebsd1*)
8486 dynamic_linker=no
8487 ;;
8488
8489 kfreebsd*-gnu)
8490 version_type=linux
8491 need_lib_prefix=no
8492 need_version=no
8493 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
8494 soname_spec='${libname}${release}${shared_ext}$major'
8495 shlibpath_var=LD_LIBRARY_PATH
8496 shlibpath_overrides_runpath=no
8497 hardcode_into_libs=yes
8498 dynamic_linker='GNU ld.so'
8499 ;;
8500
8501 freebsd* | dragonfly*)
8502 # DragonFly does not have aout. When/if they implement a new
8503 # versioning mechanism, adjust this.
8504 if test -x /usr/bin/objformat; then
8505 objformat=`/usr/bin/objformat`
8506 else
8507 case $host_os in
8508 freebsd[123]*) objformat=aout ;;
8509 *) objformat=elf ;;
8510 esac
8511 fi
8512 version_type=freebsd-$objformat
8513 case $version_type in
8514 freebsd-elf*)
8515 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
8516 need_version=no
8517 need_lib_prefix=no
8518 ;;
8519 freebsd-*)
8520 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
8521 need_version=yes
8522 ;;
8523 esac
8524 shlibpath_var=LD_LIBRARY_PATH
8525 case $host_os in
8526 freebsd2*)
8527 shlibpath_overrides_runpath=yes
8528 ;;
8529 freebsd3.[01]* | freebsdelf3.[01]*)
8530 shlibpath_overrides_runpath=yes
8531 hardcode_into_libs=yes
8532 ;;
8533 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
8534 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
8535 shlibpath_overrides_runpath=no
8536 hardcode_into_libs=yes
8537 ;;
8538 freebsd*) # from 4.6 on
8539 shlibpath_overrides_runpath=yes
8540 hardcode_into_libs=yes
8541 ;;
8542 esac
8543 ;;
8544
8545 gnu*)
8546 version_type=linux
8547 need_lib_prefix=no
8548 need_version=no
8549 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
8550 soname_spec='${libname}${release}${shared_ext}$major'
8551 shlibpath_var=LD_LIBRARY_PATH
8552 hardcode_into_libs=yes
8553 ;;
8554
8555 hpux9* | hpux10* | hpux11*)
8556 # Give a soname corresponding to the major version so that dld.sl refuses to
8557 # link against other versions.
8558 version_type=sunos
8559 need_lib_prefix=no
8560 need_version=no
8561 case $host_cpu in
8562 ia64*)
8563 shrext_cmds='.so'
8564 hardcode_into_libs=yes
8565 dynamic_linker="$host_os dld.so"
8566 shlibpath_var=LD_LIBRARY_PATH
8567 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
8568 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8569 soname_spec='${libname}${release}${shared_ext}$major'
8570 if test "X$HPUX_IA64_MODE" = X32; then
8571 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
8572 else
8573 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
8574 fi
8575 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
8576 ;;
8577 hppa*64*)
8578 shrext_cmds='.sl'
8579 hardcode_into_libs=yes
8580 dynamic_linker="$host_os dld.sl"
8581 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
8582 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
8583 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8584 soname_spec='${libname}${release}${shared_ext}$major'
8585 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
8586 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
8587 ;;
8588 *)
8589 shrext_cmds='.sl'
8590 dynamic_linker="$host_os dld.sl"
8591 shlibpath_var=SHLIB_PATH
8592 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
8593 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8594 soname_spec='${libname}${release}${shared_ext}$major'
8595 ;;
8596 esac
8597 # HP-UX runs *really* slowly unless shared libraries are mode 555.
8598 postinstall_cmds='chmod 555 $lib'
8599 ;;
8600
8601 interix3*)
8602 version_type=linux
8603 need_lib_prefix=no
8604 need_version=no
8605 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
8606 soname_spec='${libname}${release}${shared_ext}$major'
8607 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
8608 shlibpath_var=LD_LIBRARY_PATH
8609 shlibpath_overrides_runpath=no
8610 hardcode_into_libs=yes
8611 ;;
8612
8613 irix5* | irix6* | nonstopux*)
8614 case $host_os in
8615 nonstopux*) version_type=nonstopux ;;
8616 *)
8617 if test "$lt_cv_prog_gnu_ld" = yes; then
8618 version_type=linux
8619 else
8620 version_type=irix
8621 fi ;;
8622 esac
8623 need_lib_prefix=no
8624 need_version=no
8625 soname_spec='${libname}${release}${shared_ext}$major'
8626 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
8627 case $host_os in
8628 irix5* | nonstopux*)
8629 libsuff= shlibsuff=
8630 ;;
8631 *)
8632 case $LD in # libtool.m4 will add one of these switches to LD
8633 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
8634 libsuff= shlibsuff= libmagic=32-bit;;
8635 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
8636 libsuff=32 shlibsuff=N32 libmagic=N32;;
8637 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
8638 libsuff=64 shlibsuff=64 libmagic=64-bit;;
8639 *) libsuff= shlibsuff= libmagic=never-match;;
8640 esac
8641 ;;
8642 esac
8643 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
8644 shlibpath_overrides_runpath=no
8645 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
8646 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
8647 hardcode_into_libs=yes
8648 ;;
8649
8650 # No shared lib support for Linux oldld, aout, or coff.
8651 linux*oldld* | linux*aout* | linux*coff*)
8652 dynamic_linker=no
8653 ;;
8654
8655 # This must be Linux ELF.
8656 linux*)
8657 version_type=linux
8658 need_lib_prefix=no
8659 need_version=no
8660 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8661 soname_spec='${libname}${release}${shared_ext}$major'
8662 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
8663 shlibpath_var=LD_LIBRARY_PATH
8664 shlibpath_overrides_runpath=no
8665 # This implies no fast_install, which is unacceptable.
8666 # Some rework will be needed to allow for fast_install
8667 # before this can be enabled.
8668 hardcode_into_libs=yes
8669
8670 # Append ld.so.conf contents to the search path
8671 if test -f /etc/ld.so.conf; then
8672 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
8673 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
8674 fi
8675
8676 # We used to test for /lib/ld.so.1 and disable shared libraries on
8677 # powerpc, because MkLinux only supported shared libraries with the
8678 # GNU dynamic linker. Since this was broken with cross compilers,
8679 # most powerpc-linux boxes support dynamic linking these days and
8680 # people can always --disable-shared, the test was removed, and we
8681 # assume the GNU/Linux dynamic linker is in use.
8682 dynamic_linker='GNU/Linux ld.so'
8683 ;;
8684
8685 netbsdelf*-gnu)
8686 version_type=linux
8687 need_lib_prefix=no
8688 need_version=no
8689 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
8690 soname_spec='${libname}${release}${shared_ext}$major'
8691 shlibpath_var=LD_LIBRARY_PATH
8692 shlibpath_overrides_runpath=no
8693 hardcode_into_libs=yes
8694 dynamic_linker='NetBSD ld.elf_so'
8695 ;;
8696
8697 knetbsd*-gnu)
8698 version_type=linux
8699 need_lib_prefix=no
8700 need_version=no
8701 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
8702 soname_spec='${libname}${release}${shared_ext}$major'
8703 shlibpath_var=LD_LIBRARY_PATH
8704 shlibpath_overrides_runpath=no
8705 hardcode_into_libs=yes
8706 dynamic_linker='GNU ld.so'
8707 ;;
8708
8709 netbsd*)
8710 version_type=sunos
8711 need_lib_prefix=no
8712 need_version=no
8713 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8714 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
8715 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
8716 dynamic_linker='NetBSD (a.out) ld.so'
8717 else
8718 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
8719 soname_spec='${libname}${release}${shared_ext}$major'
8720 dynamic_linker='NetBSD ld.elf_so'
8721 fi
8722 shlibpath_var=LD_LIBRARY_PATH
8723 shlibpath_overrides_runpath=yes
8724 hardcode_into_libs=yes
8725 ;;
8726
8727 newsos6)
8728 version_type=linux
8729 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8730 shlibpath_var=LD_LIBRARY_PATH
8731 shlibpath_overrides_runpath=yes
8732 ;;
8733
8734 nto-qnx*)
8735 version_type=linux
8736 need_lib_prefix=no
8737 need_version=no
8738 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8739 soname_spec='${libname}${release}${shared_ext}$major'
8740 shlibpath_var=LD_LIBRARY_PATH
8741 shlibpath_overrides_runpath=yes
8742 ;;
8743
8744 openbsd*)
8745 version_type=sunos
8746 sys_lib_dlsearch_path_spec="/usr/lib"
8747 need_lib_prefix=no
8748 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
8749 case $host_os in
8750 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
8751 *) need_version=no ;;
8752 esac
8753 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
8754 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
8755 shlibpath_var=LD_LIBRARY_PATH
8756 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8757 case $host_os in
8758 openbsd2.[89] | openbsd2.[89].*)
8759 shlibpath_overrides_runpath=no
8760 ;;
8761 *)
8762 shlibpath_overrides_runpath=yes
8763 ;;
8764 esac
8765 else
8766 shlibpath_overrides_runpath=yes
8767 fi
8768 ;;
8769
8770 os2*)
8771 libname_spec='$name'
8772 shrext_cmds=".dll"
8773 need_lib_prefix=no
8774 library_names_spec='$libname${shared_ext} $libname.a'
8775 dynamic_linker='OS/2 ld.exe'
8776 shlibpath_var=LIBPATH
8777 ;;
8778
8779 osf3* | osf4* | osf5*)
8780 version_type=osf
8781 need_lib_prefix=no
8782 need_version=no
8783 soname_spec='${libname}${release}${shared_ext}$major'
8784 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8785 shlibpath_var=LD_LIBRARY_PATH
8786 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
8787 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
8788 ;;
8789
8790 solaris*)
8791 version_type=linux
8792 need_lib_prefix=no
8793 need_version=no
8794 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8795 soname_spec='${libname}${release}${shared_ext}$major'
8796 shlibpath_var=LD_LIBRARY_PATH
8797 shlibpath_overrides_runpath=yes
8798 hardcode_into_libs=yes
8799 # ldd complains unless libraries are executable
8800 postinstall_cmds='chmod +x $lib'
8801 ;;
8802
8803 sunos4*)
8804 version_type=sunos
8805 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
8806 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
8807 shlibpath_var=LD_LIBRARY_PATH
8808 shlibpath_overrides_runpath=yes
8809 if test "$with_gnu_ld" = yes; then
8810 need_lib_prefix=no
8811 fi
8812 need_version=yes
8813 ;;
8814
8815 sysv4 | sysv4.3*)
8816 version_type=linux
8817 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8818 soname_spec='${libname}${release}${shared_ext}$major'
8819 shlibpath_var=LD_LIBRARY_PATH
8820 case $host_vendor in
8821 sni)
8822 shlibpath_overrides_runpath=no
8823 need_lib_prefix=no
8824 export_dynamic_flag_spec='${wl}-Blargedynsym'
8825 runpath_var=LD_RUN_PATH
8826 ;;
8827 siemens)
8828 need_lib_prefix=no
8829 ;;
8830 motorola)
8831 need_lib_prefix=no
8832 need_version=no
8833 shlibpath_overrides_runpath=no
8834 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
8835 ;;
8836 esac
8837 ;;
8838
8839 sysv4*MP*)
8840 if test -d /usr/nec ;then
8841 version_type=linux
8842 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
8843 soname_spec='$libname${shared_ext}.$major'
8844 shlibpath_var=LD_LIBRARY_PATH
8845 fi
8846 ;;
8847
8848 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8849 version_type=freebsd-elf
8850 need_lib_prefix=no
8851 need_version=no
8852 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
8853 soname_spec='${libname}${release}${shared_ext}$major'
8854 shlibpath_var=LD_LIBRARY_PATH
8855 hardcode_into_libs=yes
8856 if test "$with_gnu_ld" = yes; then
8857 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
8858 shlibpath_overrides_runpath=no
8859 else
8860 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
8861 shlibpath_overrides_runpath=yes
8862 case $host_os in
8863 sco3.2v5*)
8864 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
8865 ;;
8866 esac
8867 fi
8868 sys_lib_dlsearch_path_spec='/usr/lib'
8869 ;;
8870
8871 uts4*)
8872 version_type=linux
8873 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8874 soname_spec='${libname}${release}${shared_ext}$major'
8875 shlibpath_var=LD_LIBRARY_PATH
8876 ;;
8877
8878 *)
8879 dynamic_linker=no
8880 ;;
8881 esac
8882 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
8883 echo "${ECHO_T}$dynamic_linker" >&6
8884 test "$dynamic_linker" = no && can_build_shared=no
8885
8886 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
8887 if test "$GCC" = yes; then
8888 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
8889 fi
8890
8891 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
8892 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
8893 hardcode_action=
8894 if test -n "$hardcode_libdir_flag_spec" || \
8895 test -n "$runpath_var" || \
8896 test "X$hardcode_automatic" = "Xyes" ; then
8897
8898 # We can hardcode non-existant directories.
8899 if test "$hardcode_direct" != no &&
8900 # If the only mechanism to avoid hardcoding is shlibpath_var, we
8901 # have to relink, otherwise we might link with an installed library
8902 # when we should be linking with a yet-to-be-installed one
8903 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
8904 test "$hardcode_minus_L" != no; then
8905 # Linking always hardcodes the temporary library directory.
8906 hardcode_action=relink
8907 else
8908 # We can link without hardcoding, and we can hardcode nonexisting dirs.
8909 hardcode_action=immediate
8910 fi
8911 else
8912 # We cannot hardcode anything, or else we can only hardcode existing
8913 # directories.
8914 hardcode_action=unsupported
8915 fi
8916 echo "$as_me:$LINENO: result: $hardcode_action" >&5
8917 echo "${ECHO_T}$hardcode_action" >&6
8918
8919 if test "$hardcode_action" = relink; then
8920 # Fast installation is not supported
8921 enable_fast_install=no
8922 elif test "$shlibpath_overrides_runpath" = yes ||
8923 test "$enable_shared" = no; then
8924 # Fast installation is not necessary
8925 enable_fast_install=needless
8926 fi
8927
8928 striplib=
8929 old_striplib=
8930 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
8931 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
8932 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
8933 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
8934 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
8935 echo "$as_me:$LINENO: result: yes" >&5
8936 echo "${ECHO_T}yes" >&6
8937 else
8938 # FIXME - insert some real tests, host_os isn't really good enough
8939 case $host_os in
8940 darwin*)
8941 if test -n "$STRIP" ; then
8942 striplib="$STRIP -x"
8943 echo "$as_me:$LINENO: result: yes" >&5
8944 echo "${ECHO_T}yes" >&6
8945 else
8946 echo "$as_me:$LINENO: result: no" >&5
8947 echo "${ECHO_T}no" >&6
8948 fi
8949 ;;
8950 *)
8951 echo "$as_me:$LINENO: result: no" >&5
8952 echo "${ECHO_T}no" >&6
8953 ;;
8954 esac
8955 fi
8956
8957 if test "x$enable_dlopen" != xyes; then
8958 enable_dlopen=unknown
8959 enable_dlopen_self=unknown
8960 enable_dlopen_self_static=unknown
8961 else
8962 lt_cv_dlopen=no
8963 lt_cv_dlopen_libs=
8964
8965 case $host_os in
8966 beos*)
8967 lt_cv_dlopen="load_add_on"
8968 lt_cv_dlopen_libs=
8969 lt_cv_dlopen_self=yes
8970 ;;
8971
8972 mingw* | pw32*)
8973 lt_cv_dlopen="LoadLibrary"
8974 lt_cv_dlopen_libs=
8975 ;;
8976
8977 cygwin*)
8978 lt_cv_dlopen="dlopen"
8979 lt_cv_dlopen_libs=
8980 ;;
8981
8982 darwin*)
8983 # if libdl is installed we need to link against it
8984 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8985 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8986 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8987 echo $ECHO_N "(cached) $ECHO_C" >&6
8988 else
8989 ac_check_lib_save_LIBS=$LIBS
8990 LIBS="-ldl $LIBS"
8991 cat >conftest.$ac_ext <<_ACEOF
8992 /* confdefs.h. */
8993 _ACEOF
8994 cat confdefs.h >>conftest.$ac_ext
8995 cat >>conftest.$ac_ext <<_ACEOF
8996 /* end confdefs.h. */
8997
8998 /* Override any gcc2 internal prototype to avoid an error. */
8999 #ifdef __cplusplus
9000 extern "C"
9001 #endif
9002 /* We use char because int might match the return type of a gcc2
9003 builtin and then its argument prototype would still apply. */
9004 char dlopen ();
9005 int
9006 main ()
9007 {
9008 dlopen ();
9009 ;
9010 return 0;
9011 }
9012 _ACEOF
9013 rm -f conftest.$ac_objext conftest$ac_exeext
9014 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9015 (eval $ac_link) 2>conftest.er1
9016 ac_status=$?
9017 grep -v '^ *+' conftest.er1 >conftest.err
9018 rm -f conftest.er1
9019 cat conftest.err >&5
9020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9021 (exit $ac_status); } &&
9022 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9024 (eval $ac_try) 2>&5
9025 ac_status=$?
9026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9027 (exit $ac_status); }; } &&
9028 { ac_try='test -s conftest$ac_exeext'
9029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9030 (eval $ac_try) 2>&5
9031 ac_status=$?
9032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9033 (exit $ac_status); }; }; then
9034 ac_cv_lib_dl_dlopen=yes
9035 else
9036 echo "$as_me: failed program was:" >&5
9037 sed 's/^/| /' conftest.$ac_ext >&5
9038
9039 ac_cv_lib_dl_dlopen=no
9040 fi
9041 rm -f conftest.err conftest.$ac_objext \
9042 conftest$ac_exeext conftest.$ac_ext
9043 LIBS=$ac_check_lib_save_LIBS
9044 fi
9045 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9046 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9047 if test $ac_cv_lib_dl_dlopen = yes; then
9048 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9049 else
9050
9051 lt_cv_dlopen="dyld"
9052 lt_cv_dlopen_libs=
9053 lt_cv_dlopen_self=yes
9054
9055 fi
9056
9057 ;;
9058
9059 *)
9060 echo "$as_me:$LINENO: checking for shl_load" >&5
9061 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
9062 if test "${ac_cv_func_shl_load+set}" = set; then
9063 echo $ECHO_N "(cached) $ECHO_C" >&6
9064 else
9065 cat >conftest.$ac_ext <<_ACEOF
9066 /* confdefs.h. */
9067 _ACEOF
9068 cat confdefs.h >>conftest.$ac_ext
9069 cat >>conftest.$ac_ext <<_ACEOF
9070 /* end confdefs.h. */
9071 /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
9072 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9073 #define shl_load innocuous_shl_load
9074
9075 /* System header to define __stub macros and hopefully few prototypes,
9076 which can conflict with char shl_load (); below.
9077 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9078 <limits.h> exists even on freestanding compilers. */
9079
9080 #ifdef __STDC__
9081 # include <limits.h>
9082 #else
9083 # include <assert.h>
9084 #endif
9085
9086 #undef shl_load
9087
9088 /* Override any gcc2 internal prototype to avoid an error. */
9089 #ifdef __cplusplus
9090 extern "C"
9091 {
9092 #endif
9093 /* We use char because int might match the return type of a gcc2
9094 builtin and then its argument prototype would still apply. */
9095 char shl_load ();
9096 /* The GNU C library defines this for functions which it implements
9097 to always fail with ENOSYS. Some functions are actually named
9098 something starting with __ and the normal name is an alias. */
9099 #if defined (__stub_shl_load) || defined (__stub___shl_load)
9100 choke me
9101 #else
9102 char (*f) () = shl_load;
9103 #endif
9104 #ifdef __cplusplus
9105 }
9106 #endif
9107
9108 int
9109 main ()
9110 {
9111 return f != shl_load;
9112 ;
9113 return 0;
9114 }
9115 _ACEOF
9116 rm -f conftest.$ac_objext conftest$ac_exeext
9117 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9118 (eval $ac_link) 2>conftest.er1
9119 ac_status=$?
9120 grep -v '^ *+' conftest.er1 >conftest.err
9121 rm -f conftest.er1
9122 cat conftest.err >&5
9123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9124 (exit $ac_status); } &&
9125 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9127 (eval $ac_try) 2>&5
9128 ac_status=$?
9129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9130 (exit $ac_status); }; } &&
9131 { ac_try='test -s conftest$ac_exeext'
9132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9133 (eval $ac_try) 2>&5
9134 ac_status=$?
9135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9136 (exit $ac_status); }; }; then
9137 ac_cv_func_shl_load=yes
9138 else
9139 echo "$as_me: failed program was:" >&5
9140 sed 's/^/| /' conftest.$ac_ext >&5
9141
9142 ac_cv_func_shl_load=no
9143 fi
9144 rm -f conftest.err conftest.$ac_objext \
9145 conftest$ac_exeext conftest.$ac_ext
9146 fi
9147 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
9148 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
9149 if test $ac_cv_func_shl_load = yes; then
9150 lt_cv_dlopen="shl_load"
9151 else
9152 echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9153 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9154 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9155 echo $ECHO_N "(cached) $ECHO_C" >&6
9156 else
9157 ac_check_lib_save_LIBS=$LIBS
9158 LIBS="-ldld $LIBS"
9159 cat >conftest.$ac_ext <<_ACEOF
9160 /* confdefs.h. */
9161 _ACEOF
9162 cat confdefs.h >>conftest.$ac_ext
9163 cat >>conftest.$ac_ext <<_ACEOF
9164 /* end confdefs.h. */
9165
9166 /* Override any gcc2 internal prototype to avoid an error. */
9167 #ifdef __cplusplus
9168 extern "C"
9169 #endif
9170 /* We use char because int might match the return type of a gcc2
9171 builtin and then its argument prototype would still apply. */
9172 char shl_load ();
9173 int
9174 main ()
9175 {
9176 shl_load ();
9177 ;
9178 return 0;
9179 }
9180 _ACEOF
9181 rm -f conftest.$ac_objext conftest$ac_exeext
9182 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9183 (eval $ac_link) 2>conftest.er1
9184 ac_status=$?
9185 grep -v '^ *+' conftest.er1 >conftest.err
9186 rm -f conftest.er1
9187 cat conftest.err >&5
9188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9189 (exit $ac_status); } &&
9190 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9192 (eval $ac_try) 2>&5
9193 ac_status=$?
9194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9195 (exit $ac_status); }; } &&
9196 { ac_try='test -s conftest$ac_exeext'
9197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9198 (eval $ac_try) 2>&5
9199 ac_status=$?
9200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9201 (exit $ac_status); }; }; then
9202 ac_cv_lib_dld_shl_load=yes
9203 else
9204 echo "$as_me: failed program was:" >&5
9205 sed 's/^/| /' conftest.$ac_ext >&5
9206
9207 ac_cv_lib_dld_shl_load=no
9208 fi
9209 rm -f conftest.err conftest.$ac_objext \
9210 conftest$ac_exeext conftest.$ac_ext
9211 LIBS=$ac_check_lib_save_LIBS
9212 fi
9213 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9214 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9215 if test $ac_cv_lib_dld_shl_load = yes; then
9216 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
9217 else
9218 echo "$as_me:$LINENO: checking for dlopen" >&5
9219 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
9220 if test "${ac_cv_func_dlopen+set}" = set; then
9221 echo $ECHO_N "(cached) $ECHO_C" >&6
9222 else
9223 cat >conftest.$ac_ext <<_ACEOF
9224 /* confdefs.h. */
9225 _ACEOF
9226 cat confdefs.h >>conftest.$ac_ext
9227 cat >>conftest.$ac_ext <<_ACEOF
9228 /* end confdefs.h. */
9229 /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
9230 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9231 #define dlopen innocuous_dlopen
9232
9233 /* System header to define __stub macros and hopefully few prototypes,
9234 which can conflict with char dlopen (); below.
9235 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9236 <limits.h> exists even on freestanding compilers. */
9237
9238 #ifdef __STDC__
9239 # include <limits.h>
9240 #else
9241 # include <assert.h>
9242 #endif
9243
9244 #undef dlopen
9245
9246 /* Override any gcc2 internal prototype to avoid an error. */
9247 #ifdef __cplusplus
9248 extern "C"
9249 {
9250 #endif
9251 /* We use char because int might match the return type of a gcc2
9252 builtin and then its argument prototype would still apply. */
9253 char dlopen ();
9254 /* The GNU C library defines this for functions which it implements
9255 to always fail with ENOSYS. Some functions are actually named
9256 something starting with __ and the normal name is an alias. */
9257 #if defined (__stub_dlopen) || defined (__stub___dlopen)
9258 choke me
9259 #else
9260 char (*f) () = dlopen;
9261 #endif
9262 #ifdef __cplusplus
9263 }
9264 #endif
9265
9266 int
9267 main ()
9268 {
9269 return f != dlopen;
9270 ;
9271 return 0;
9272 }
9273 _ACEOF
9274 rm -f conftest.$ac_objext conftest$ac_exeext
9275 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9276 (eval $ac_link) 2>conftest.er1
9277 ac_status=$?
9278 grep -v '^ *+' conftest.er1 >conftest.err
9279 rm -f conftest.er1
9280 cat conftest.err >&5
9281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9282 (exit $ac_status); } &&
9283 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9285 (eval $ac_try) 2>&5
9286 ac_status=$?
9287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9288 (exit $ac_status); }; } &&
9289 { ac_try='test -s conftest$ac_exeext'
9290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9291 (eval $ac_try) 2>&5
9292 ac_status=$?
9293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9294 (exit $ac_status); }; }; then
9295 ac_cv_func_dlopen=yes
9296 else
9297 echo "$as_me: failed program was:" >&5
9298 sed 's/^/| /' conftest.$ac_ext >&5
9299
9300 ac_cv_func_dlopen=no
9301 fi
9302 rm -f conftest.err conftest.$ac_objext \
9303 conftest$ac_exeext conftest.$ac_ext
9304 fi
9305 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
9306 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
9307 if test $ac_cv_func_dlopen = yes; then
9308 lt_cv_dlopen="dlopen"
9309 else
9310 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9311 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9312 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9313 echo $ECHO_N "(cached) $ECHO_C" >&6
9314 else
9315 ac_check_lib_save_LIBS=$LIBS
9316 LIBS="-ldl $LIBS"
9317 cat >conftest.$ac_ext <<_ACEOF
9318 /* confdefs.h. */
9319 _ACEOF
9320 cat confdefs.h >>conftest.$ac_ext
9321 cat >>conftest.$ac_ext <<_ACEOF
9322 /* end confdefs.h. */
9323
9324 /* Override any gcc2 internal prototype to avoid an error. */
9325 #ifdef __cplusplus
9326 extern "C"
9327 #endif
9328 /* We use char because int might match the return type of a gcc2
9329 builtin and then its argument prototype would still apply. */
9330 char dlopen ();
9331 int
9332 main ()
9333 {
9334 dlopen ();
9335 ;
9336 return 0;
9337 }
9338 _ACEOF
9339 rm -f conftest.$ac_objext conftest$ac_exeext
9340 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9341 (eval $ac_link) 2>conftest.er1
9342 ac_status=$?
9343 grep -v '^ *+' conftest.er1 >conftest.err
9344 rm -f conftest.er1
9345 cat conftest.err >&5
9346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9347 (exit $ac_status); } &&
9348 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9350 (eval $ac_try) 2>&5
9351 ac_status=$?
9352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9353 (exit $ac_status); }; } &&
9354 { ac_try='test -s conftest$ac_exeext'
9355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9356 (eval $ac_try) 2>&5
9357 ac_status=$?
9358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9359 (exit $ac_status); }; }; then
9360 ac_cv_lib_dl_dlopen=yes
9361 else
9362 echo "$as_me: failed program was:" >&5
9363 sed 's/^/| /' conftest.$ac_ext >&5
9364
9365 ac_cv_lib_dl_dlopen=no
9366 fi
9367 rm -f conftest.err conftest.$ac_objext \
9368 conftest$ac_exeext conftest.$ac_ext
9369 LIBS=$ac_check_lib_save_LIBS
9370 fi
9371 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9372 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9373 if test $ac_cv_lib_dl_dlopen = yes; then
9374 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9375 else
9376 echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
9377 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
9378 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
9379 echo $ECHO_N "(cached) $ECHO_C" >&6
9380 else
9381 ac_check_lib_save_LIBS=$LIBS
9382 LIBS="-lsvld $LIBS"
9383 cat >conftest.$ac_ext <<_ACEOF
9384 /* confdefs.h. */
9385 _ACEOF
9386 cat confdefs.h >>conftest.$ac_ext
9387 cat >>conftest.$ac_ext <<_ACEOF
9388 /* end confdefs.h. */
9389
9390 /* Override any gcc2 internal prototype to avoid an error. */
9391 #ifdef __cplusplus
9392 extern "C"
9393 #endif
9394 /* We use char because int might match the return type of a gcc2
9395 builtin and then its argument prototype would still apply. */
9396 char dlopen ();
9397 int
9398 main ()
9399 {
9400 dlopen ();
9401 ;
9402 return 0;
9403 }
9404 _ACEOF
9405 rm -f conftest.$ac_objext conftest$ac_exeext
9406 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9407 (eval $ac_link) 2>conftest.er1
9408 ac_status=$?
9409 grep -v '^ *+' conftest.er1 >conftest.err
9410 rm -f conftest.er1
9411 cat conftest.err >&5
9412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9413 (exit $ac_status); } &&
9414 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9416 (eval $ac_try) 2>&5
9417 ac_status=$?
9418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9419 (exit $ac_status); }; } &&
9420 { ac_try='test -s conftest$ac_exeext'
9421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9422 (eval $ac_try) 2>&5
9423 ac_status=$?
9424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9425 (exit $ac_status); }; }; then
9426 ac_cv_lib_svld_dlopen=yes
9427 else
9428 echo "$as_me: failed program was:" >&5
9429 sed 's/^/| /' conftest.$ac_ext >&5
9430
9431 ac_cv_lib_svld_dlopen=no
9432 fi
9433 rm -f conftest.err conftest.$ac_objext \
9434 conftest$ac_exeext conftest.$ac_ext
9435 LIBS=$ac_check_lib_save_LIBS
9436 fi
9437 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
9438 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
9439 if test $ac_cv_lib_svld_dlopen = yes; then
9440 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
9441 else
9442 echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
9443 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
9444 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
9445 echo $ECHO_N "(cached) $ECHO_C" >&6
9446 else
9447 ac_check_lib_save_LIBS=$LIBS
9448 LIBS="-ldld $LIBS"
9449 cat >conftest.$ac_ext <<_ACEOF
9450 /* confdefs.h. */
9451 _ACEOF
9452 cat confdefs.h >>conftest.$ac_ext
9453 cat >>conftest.$ac_ext <<_ACEOF
9454 /* end confdefs.h. */
9455
9456 /* Override any gcc2 internal prototype to avoid an error. */
9457 #ifdef __cplusplus
9458 extern "C"
9459 #endif
9460 /* We use char because int might match the return type of a gcc2
9461 builtin and then its argument prototype would still apply. */
9462 char dld_link ();
9463 int
9464 main ()
9465 {
9466 dld_link ();
9467 ;
9468 return 0;
9469 }
9470 _ACEOF
9471 rm -f conftest.$ac_objext conftest$ac_exeext
9472 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9473 (eval $ac_link) 2>conftest.er1
9474 ac_status=$?
9475 grep -v '^ *+' conftest.er1 >conftest.err
9476 rm -f conftest.er1
9477 cat conftest.err >&5
9478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9479 (exit $ac_status); } &&
9480 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9482 (eval $ac_try) 2>&5
9483 ac_status=$?
9484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9485 (exit $ac_status); }; } &&
9486 { ac_try='test -s conftest$ac_exeext'
9487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9488 (eval $ac_try) 2>&5
9489 ac_status=$?
9490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9491 (exit $ac_status); }; }; then
9492 ac_cv_lib_dld_dld_link=yes
9493 else
9494 echo "$as_me: failed program was:" >&5
9495 sed 's/^/| /' conftest.$ac_ext >&5
9496
9497 ac_cv_lib_dld_dld_link=no
9498 fi
9499 rm -f conftest.err conftest.$ac_objext \
9500 conftest$ac_exeext conftest.$ac_ext
9501 LIBS=$ac_check_lib_save_LIBS
9502 fi
9503 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
9504 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
9505 if test $ac_cv_lib_dld_dld_link = yes; then
9506 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
9507 fi
9508
9509
9510 fi
9511
9512
9513 fi
9514
9515
9516 fi
9517
9518
9519 fi
9520
9521
9522 fi
9523
9524 ;;
9525 esac
9526
9527 if test "x$lt_cv_dlopen" != xno; then
9528 enable_dlopen=yes
9529 else
9530 enable_dlopen=no
9531 fi
9532
9533 case $lt_cv_dlopen in
9534 dlopen)
9535 save_CPPFLAGS="$CPPFLAGS"
9536 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
9537
9538 save_LDFLAGS="$LDFLAGS"
9539 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
9540
9541 save_LIBS="$LIBS"
9542 LIBS="$lt_cv_dlopen_libs $LIBS"
9543
9544 echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
9545 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
9546 if test "${lt_cv_dlopen_self+set}" = set; then
9547 echo $ECHO_N "(cached) $ECHO_C" >&6
9548 else
9549 if test "$cross_compiling" = yes; then :
9550 lt_cv_dlopen_self=cross
9551 else
9552 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
9553 lt_status=$lt_dlunknown
9554 cat > conftest.$ac_ext <<EOF
9555 #line 9556 "configure"
9556 #include "confdefs.h"
9557
9558 #if HAVE_DLFCN_H
9559 #include <dlfcn.h>
9560 #endif
9561
9562 #include <stdio.h>
9563
9564 #ifdef RTLD_GLOBAL
9565 # define LT_DLGLOBAL RTLD_GLOBAL
9566 #else
9567 # ifdef DL_GLOBAL
9568 # define LT_DLGLOBAL DL_GLOBAL
9569 # else
9570 # define LT_DLGLOBAL 0
9571 # endif
9572 #endif
9573
9574 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
9575 find out it does not work in some platform. */
9576 #ifndef LT_DLLAZY_OR_NOW
9577 # ifdef RTLD_LAZY
9578 # define LT_DLLAZY_OR_NOW RTLD_LAZY
9579 # else
9580 # ifdef DL_LAZY
9581 # define LT_DLLAZY_OR_NOW DL_LAZY
9582 # else
9583 # ifdef RTLD_NOW
9584 # define LT_DLLAZY_OR_NOW RTLD_NOW
9585 # else
9586 # ifdef DL_NOW
9587 # define LT_DLLAZY_OR_NOW DL_NOW
9588 # else
9589 # define LT_DLLAZY_OR_NOW 0
9590 # endif
9591 # endif
9592 # endif
9593 # endif
9594 #endif
9595
9596 #ifdef __cplusplus
9597 extern "C" void exit (int);
9598 #endif
9599
9600 void fnord() { int i=42;}
9601 int main ()
9602 {
9603 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
9604 int status = $lt_dlunknown;
9605
9606 if (self)
9607 {
9608 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
9609 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
9610 /* dlclose (self); */
9611 }
9612 else
9613 puts (dlerror ());
9614
9615 exit (status);
9616 }
9617 EOF
9618 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9619 (eval $ac_link) 2>&5
9620 ac_status=$?
9621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9622 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
9623 (./conftest; exit; ) >&5 2>/dev/null
9624 lt_status=$?
9625 case x$lt_status in
9626 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
9627 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
9628 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
9629 esac
9630 else :
9631 # compilation failed
9632 lt_cv_dlopen_self=no
9633 fi
9634 fi
9635 rm -fr conftest*
9636
9637
9638 fi
9639 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
9640 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
9641
9642 if test "x$lt_cv_dlopen_self" = xyes; then
9643 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
9644 echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
9645 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
9646 if test "${lt_cv_dlopen_self_static+set}" = set; then
9647 echo $ECHO_N "(cached) $ECHO_C" >&6
9648 else
9649 if test "$cross_compiling" = yes; then :
9650 lt_cv_dlopen_self_static=cross
9651 else
9652 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
9653 lt_status=$lt_dlunknown
9654 cat > conftest.$ac_ext <<EOF
9655 #line 9656 "configure"
9656 #include "confdefs.h"
9657
9658 #if HAVE_DLFCN_H
9659 #include <dlfcn.h>
9660 #endif
9661
9662 #include <stdio.h>
9663
9664 #ifdef RTLD_GLOBAL
9665 # define LT_DLGLOBAL RTLD_GLOBAL
9666 #else
9667 # ifdef DL_GLOBAL
9668 # define LT_DLGLOBAL DL_GLOBAL
9669 # else
9670 # define LT_DLGLOBAL 0
9671 # endif
9672 #endif
9673
9674 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
9675 find out it does not work in some platform. */
9676 #ifndef LT_DLLAZY_OR_NOW
9677 # ifdef RTLD_LAZY
9678 # define LT_DLLAZY_OR_NOW RTLD_LAZY
9679 # else
9680 # ifdef DL_LAZY
9681 # define LT_DLLAZY_OR_NOW DL_LAZY
9682 # else
9683 # ifdef RTLD_NOW
9684 # define LT_DLLAZY_OR_NOW RTLD_NOW
9685 # else
9686 # ifdef DL_NOW
9687 # define LT_DLLAZY_OR_NOW DL_NOW
9688 # else
9689 # define LT_DLLAZY_OR_NOW 0
9690 # endif
9691 # endif
9692 # endif
9693 # endif
9694 #endif
9695
9696 #ifdef __cplusplus
9697 extern "C" void exit (int);
9698 #endif
9699
9700 void fnord() { int i=42;}
9701 int main ()
9702 {
9703 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
9704 int status = $lt_dlunknown;
9705
9706 if (self)
9707 {
9708 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
9709 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
9710 /* dlclose (self); */
9711 }
9712 else
9713 puts (dlerror ());
9714
9715 exit (status);
9716 }
9717 EOF
9718 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9719 (eval $ac_link) 2>&5
9720 ac_status=$?
9721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9722 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
9723 (./conftest; exit; ) >&5 2>/dev/null
9724 lt_status=$?
9725 case x$lt_status in
9726 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
9727 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
9728 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
9729 esac
9730 else :
9731 # compilation failed
9732 lt_cv_dlopen_self_static=no
9733 fi
9734 fi
9735 rm -fr conftest*
9736
9737
9738 fi
9739 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
9740 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
9741 fi
9742
9743 CPPFLAGS="$save_CPPFLAGS"
9744 LDFLAGS="$save_LDFLAGS"
9745 LIBS="$save_LIBS"
9746 ;;
9747 esac
9748
9749 case $lt_cv_dlopen_self in
9750 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
9751 *) enable_dlopen_self=unknown ;;
9752 esac
9753
9754 case $lt_cv_dlopen_self_static in
9755 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
9756 *) enable_dlopen_self_static=unknown ;;
9757 esac
9758 fi
9759
9760
9761 # Report which library types will actually be built
9762 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
9763 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
9764 echo "$as_me:$LINENO: result: $can_build_shared" >&5
9765 echo "${ECHO_T}$can_build_shared" >&6
9766
9767 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
9768 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
9769 test "$can_build_shared" = "no" && enable_shared=no
9770
9771 # On AIX, shared libraries and static libraries use the same namespace, and
9772 # are all built from PIC.
9773 case $host_os in
9774 aix3*)
9775 test "$enable_shared" = yes && enable_static=no
9776 if test -n "$RANLIB"; then
9777 archive_cmds="$archive_cmds~\$RANLIB \$lib"
9778 postinstall_cmds='$RANLIB $lib'
9779 fi
9780 ;;
9781
9782 aix4* | aix5*)
9783 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9784 test "$enable_shared" = yes && enable_static=no
9785 fi
9786 ;;
9787 esac
9788 echo "$as_me:$LINENO: result: $enable_shared" >&5
9789 echo "${ECHO_T}$enable_shared" >&6
9790
9791 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
9792 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
9793 # Make sure either enable_shared or enable_static is yes.
9794 test "$enable_shared" = yes || enable_static=yes
9795 echo "$as_me:$LINENO: result: $enable_static" >&5
9796 echo "${ECHO_T}$enable_static" >&6
9797
9798 # The else clause should only fire when bootstrapping the
9799 # libtool distribution, otherwise you forgot to ship ltmain.sh
9800 # with your package, and you will get complaints that there are
9801 # no rules to generate ltmain.sh.
9802 if test -f "$ltmain"; then
9803 # See if we are running on zsh, and set the options which allow our commands through
9804 # without removal of \ escapes.
9805 if test -n "${ZSH_VERSION+set}" ; then
9806 setopt NO_GLOB_SUBST
9807 fi
9808 # Now quote all the things that may contain metacharacters while being
9809 # careful not to overquote the AC_SUBSTed values. We take copies of the
9810 # variables and quote the copies for generation of the libtool script.
9811 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
9812 SED SHELL STRIP \
9813 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
9814 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
9815 deplibs_check_method reload_flag reload_cmds need_locks \
9816 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
9817 lt_cv_sys_global_symbol_to_c_name_address \
9818 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
9819 old_postinstall_cmds old_postuninstall_cmds \
9820 compiler \
9821 CC \
9822 LD \
9823 lt_prog_compiler_wl \
9824 lt_prog_compiler_pic \
9825 lt_prog_compiler_static \
9826 lt_prog_compiler_no_builtin_flag \
9827 export_dynamic_flag_spec \
9828 thread_safe_flag_spec \
9829 whole_archive_flag_spec \
9830 enable_shared_with_static_runtimes \
9831 old_archive_cmds \
9832 old_archive_from_new_cmds \
9833 predep_objects \
9834 postdep_objects \
9835 predeps \
9836 postdeps \
9837 compiler_lib_search_path \
9838 archive_cmds \
9839 archive_expsym_cmds \
9840 postinstall_cmds \
9841 postuninstall_cmds \
9842 old_archive_from_expsyms_cmds \
9843 allow_undefined_flag \
9844 no_undefined_flag \
9845 export_symbols_cmds \
9846 hardcode_libdir_flag_spec \
9847 hardcode_libdir_flag_spec_ld \
9848 hardcode_libdir_separator \
9849 hardcode_automatic \
9850 module_cmds \
9851 module_expsym_cmds \
9852 lt_cv_prog_compiler_c_o \
9853 exclude_expsyms \
9854 include_expsyms; do
9855
9856 case $var in
9857 old_archive_cmds | \
9858 old_archive_from_new_cmds | \
9859 archive_cmds | \
9860 archive_expsym_cmds | \
9861 module_cmds | \
9862 module_expsym_cmds | \
9863 old_archive_from_expsyms_cmds | \
9864 export_symbols_cmds | \
9865 extract_expsyms_cmds | reload_cmds | finish_cmds | \
9866 postinstall_cmds | postuninstall_cmds | \
9867 old_postinstall_cmds | old_postuninstall_cmds | \
9868 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
9869 # Double-quote double-evaled strings.
9870 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
9871 ;;
9872 *)
9873 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
9874 ;;
9875 esac
9876 done
9877
9878 case $lt_echo in
9879 *'\$0 --fallback-echo"')
9880 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
9881 ;;
9882 esac
9883
9884 cfgfile="${ofile}T"
9885 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
9886 $rm -f "$cfgfile"
9887 { echo "$as_me:$LINENO: creating $ofile" >&5
9888 echo "$as_me: creating $ofile" >&6;}
9889
9890 cat <<__EOF__ >> "$cfgfile"
9891 #! $SHELL
9892
9893 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
9894 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
9895 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
9896 #
9897 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
9898 # Free Software Foundation, Inc.
9899 #
9900 # This file is part of GNU Libtool:
9901 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9902 #
9903 # This program is free software; you can redistribute it and/or modify
9904 # it under the terms of the GNU General Public License as published by
9905 # the Free Software Foundation; either version 2 of the License, or
9906 # (at your option) any later version.
9907 #
9908 # This program is distributed in the hope that it will be useful, but
9909 # WITHOUT ANY WARRANTY; without even the implied warranty of
9910 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9911 # General Public License for more details.
9912 #
9913 # You should have received a copy of the GNU General Public License
9914 # along with this program; if not, write to the Free Software
9915 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
9916 #
9917 # As a special exception to the GNU General Public License, if you
9918 # distribute this file as part of a program that contains a
9919 # configuration script generated by Autoconf, you may include it under
9920 # the same distribution terms that you use for the rest of that program.
9921
9922 # A sed program that does not truncate output.
9923 SED=$lt_SED
9924
9925 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
9926 Xsed="$SED -e 1s/^X//"
9927
9928 # The HP-UX ksh and POSIX shell print the target directory to stdout
9929 # if CDPATH is set.
9930 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
9931
9932 # The names of the tagged configurations supported by this script.
9933 available_tags=
9934
9935 # ### BEGIN LIBTOOL CONFIG
9936
9937 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9938
9939 # Shell to use when invoking shell scripts.
9940 SHELL=$lt_SHELL
9941
9942 # Whether or not to build shared libraries.
9943 build_libtool_libs=$enable_shared
9944
9945 # Whether or not to build static libraries.
9946 build_old_libs=$enable_static
9947
9948 # Whether or not to add -lc for building shared libraries.
9949 build_libtool_need_lc=$archive_cmds_need_lc
9950
9951 # Whether or not to disallow shared libs when runtime libs are static
9952 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
9953
9954 # Whether or not to optimize for fast installation.
9955 fast_install=$enable_fast_install
9956
9957 # The host system.
9958 host_alias=$host_alias
9959 host=$host
9960 host_os=$host_os
9961
9962 # The build system.
9963 build_alias=$build_alias
9964 build=$build
9965 build_os=$build_os
9966
9967 # An echo program that does not interpret backslashes.
9968 echo=$lt_echo
9969
9970 # The archiver.
9971 AR=$lt_AR
9972 AR_FLAGS=$lt_AR_FLAGS
9973
9974 # A C compiler.
9975 LTCC=$lt_LTCC
9976
9977 # LTCC compiler flags.
9978 LTCFLAGS=$lt_LTCFLAGS
9979
9980 # A language-specific compiler.
9981 CC=$lt_compiler
9982
9983 # Is the compiler the GNU C compiler?
9984 with_gcc=$GCC
9985
9986 # An ERE matcher.
9987 EGREP=$lt_EGREP
9988
9989 # The linker used to build libraries.
9990 LD=$lt_LD
9991
9992 # Whether we need hard or soft links.
9993 LN_S=$lt_LN_S
9994
9995 # A BSD-compatible nm program.
9996 NM=$lt_NM
9997
9998 # A symbol stripping program
9999 STRIP=$lt_STRIP
10000
10001 # Used to examine libraries when file_magic_cmd begins "file"
10002 MAGIC_CMD=$MAGIC_CMD
10003
10004 # Used on cygwin: DLL creation program.
10005 DLLTOOL="$DLLTOOL"
10006
10007 # Used on cygwin: object dumper.
10008 OBJDUMP="$OBJDUMP"
10009
10010 # Used on cygwin: assembler.
10011 AS="$AS"
10012
10013 # The name of the directory that contains temporary libtool files.
10014 objdir=$objdir
10015
10016 # How to create reloadable object files.
10017 reload_flag=$lt_reload_flag
10018 reload_cmds=$lt_reload_cmds
10019
10020 # How to pass a linker flag through the compiler.
10021 wl=$lt_lt_prog_compiler_wl
10022
10023 # Object file suffix (normally "o").
10024 objext="$ac_objext"
10025
10026 # Old archive suffix (normally "a").
10027 libext="$libext"
10028
10029 # Shared library suffix (normally ".so").
10030 shrext_cmds='$shrext_cmds'
10031
10032 # Executable file suffix (normally "").
10033 exeext="$exeext"
10034
10035 # Additional compiler flags for building library objects.
10036 pic_flag=$lt_lt_prog_compiler_pic
10037 pic_mode=$pic_mode
10038
10039 # What is the maximum length of a command?
10040 max_cmd_len=$lt_cv_sys_max_cmd_len
10041
10042 # Does compiler simultaneously support -c and -o options?
10043 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
10044
10045 # Must we lock files when doing compilation?
10046 need_locks=$lt_need_locks
10047
10048 # Do we need the lib prefix for modules?
10049 need_lib_prefix=$need_lib_prefix
10050
10051 # Do we need a version for libraries?
10052 need_version=$need_version
10053
10054 # Whether dlopen is supported.
10055 dlopen_support=$enable_dlopen
10056
10057 # Whether dlopen of programs is supported.
10058 dlopen_self=$enable_dlopen_self
10059
10060 # Whether dlopen of statically linked programs is supported.
10061 dlopen_self_static=$enable_dlopen_self_static
10062
10063 # Compiler flag to prevent dynamic linking.
10064 link_static_flag=$lt_lt_prog_compiler_static
10065
10066 # Compiler flag to turn off builtin functions.
10067 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
10068
10069 # Compiler flag to allow reflexive dlopens.
10070 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
10071
10072 # Compiler flag to generate shared objects directly from archives.
10073 whole_archive_flag_spec=$lt_whole_archive_flag_spec
10074
10075 # Compiler flag to generate thread-safe objects.
10076 thread_safe_flag_spec=$lt_thread_safe_flag_spec
10077
10078 # Library versioning type.
10079 version_type=$version_type
10080
10081 # Format of library name prefix.
10082 libname_spec=$lt_libname_spec
10083
10084 # List of archive names. First name is the real one, the rest are links.
10085 # The last name is the one that the linker finds with -lNAME.
10086 library_names_spec=$lt_library_names_spec
10087
10088 # The coded name of the library, if different from the real name.
10089 soname_spec=$lt_soname_spec
10090
10091 # Commands used to build and install an old-style archive.
10092 RANLIB=$lt_RANLIB
10093 old_archive_cmds=$lt_old_archive_cmds
10094 old_postinstall_cmds=$lt_old_postinstall_cmds
10095 old_postuninstall_cmds=$lt_old_postuninstall_cmds
10096
10097 # Create an old-style archive from a shared archive.
10098 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
10099
10100 # Create a temporary old-style archive to link instead of a shared archive.
10101 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
10102
10103 # Commands used to build and install a shared archive.
10104 archive_cmds=$lt_archive_cmds
10105 archive_expsym_cmds=$lt_archive_expsym_cmds
10106 postinstall_cmds=$lt_postinstall_cmds
10107 postuninstall_cmds=$lt_postuninstall_cmds
10108
10109 # Commands used to build a loadable module (assumed same as above if empty)
10110 module_cmds=$lt_module_cmds
10111 module_expsym_cmds=$lt_module_expsym_cmds
10112
10113 # Commands to strip libraries.
10114 old_striplib=$lt_old_striplib
10115 striplib=$lt_striplib
10116
10117 # Dependencies to place before the objects being linked to create a
10118 # shared library.
10119 predep_objects=$lt_predep_objects
10120
10121 # Dependencies to place after the objects being linked to create a
10122 # shared library.
10123 postdep_objects=$lt_postdep_objects
10124
10125 # Dependencies to place before the objects being linked to create a
10126 # shared library.
10127 predeps=$lt_predeps
10128
10129 # Dependencies to place after the objects being linked to create a
10130 # shared library.
10131 postdeps=$lt_postdeps
10132
10133 # The library search path used internally by the compiler when linking
10134 # a shared library.
10135 compiler_lib_search_path=$lt_compiler_lib_search_path
10136
10137 # Method to check whether dependent libraries are shared objects.
10138 deplibs_check_method=$lt_deplibs_check_method
10139
10140 # Command to use when deplibs_check_method == file_magic.
10141 file_magic_cmd=$lt_file_magic_cmd
10142
10143 # Flag that allows shared libraries with undefined symbols to be built.
10144 allow_undefined_flag=$lt_allow_undefined_flag
10145
10146 # Flag that forces no undefined symbols.
10147 no_undefined_flag=$lt_no_undefined_flag
10148
10149 # Commands used to finish a libtool library installation in a directory.
10150 finish_cmds=$lt_finish_cmds
10151
10152 # Same as above, but a single script fragment to be evaled but not shown.
10153 finish_eval=$lt_finish_eval
10154
10155 # Take the output of nm and produce a listing of raw symbols and C names.
10156 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
10157
10158 # Transform the output of nm in a proper C declaration
10159 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
10160
10161 # Transform the output of nm in a C name address pair
10162 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
10163
10164 # This is the shared library runtime path variable.
10165 runpath_var=$runpath_var
10166
10167 # This is the shared library path variable.
10168 shlibpath_var=$shlibpath_var
10169
10170 # Is shlibpath searched before the hard-coded library search path?
10171 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
10172
10173 # How to hardcode a shared library path into an executable.
10174 hardcode_action=$hardcode_action
10175
10176 # Whether we should hardcode library paths into libraries.
10177 hardcode_into_libs=$hardcode_into_libs
10178
10179 # Flag to hardcode \$libdir into a binary during linking.
10180 # This must work even if \$libdir does not exist.
10181 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
10182
10183 # If ld is used when linking, flag to hardcode \$libdir into
10184 # a binary during linking. This must work even if \$libdir does
10185 # not exist.
10186 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
10187
10188 # Whether we need a single -rpath flag with a separated argument.
10189 hardcode_libdir_separator=$lt_hardcode_libdir_separator
10190
10191 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
10192 # resulting binary.
10193 hardcode_direct=$hardcode_direct
10194
10195 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
10196 # resulting binary.
10197 hardcode_minus_L=$hardcode_minus_L
10198
10199 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
10200 # the resulting binary.
10201 hardcode_shlibpath_var=$hardcode_shlibpath_var
10202
10203 # Set to yes if building a shared library automatically hardcodes DIR into the library
10204 # and all subsequent libraries and executables linked against it.
10205 hardcode_automatic=$hardcode_automatic
10206
10207 # Variables whose values should be saved in libtool wrapper scripts and
10208 # restored at relink time.
10209 variables_saved_for_relink="$variables_saved_for_relink"
10210
10211 # Whether libtool must link a program against all its dependency libraries.
10212 link_all_deplibs=$link_all_deplibs
10213
10214 # Compile-time system search path for libraries
10215 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
10216
10217 # Run-time system search path for libraries
10218 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
10219
10220 # Fix the shell variable \$srcfile for the compiler.
10221 fix_srcfile_path="$fix_srcfile_path"
10222
10223 # Set to yes if exported symbols are required.
10224 always_export_symbols=$always_export_symbols
10225
10226 # The commands to list exported symbols.
10227 export_symbols_cmds=$lt_export_symbols_cmds
10228
10229 # The commands to extract the exported symbol list from a shared archive.
10230 extract_expsyms_cmds=$lt_extract_expsyms_cmds
10231
10232 # Symbols that should not be listed in the preloaded symbols.
10233 exclude_expsyms=$lt_exclude_expsyms
10234
10235 # Symbols that must always be exported.
10236 include_expsyms=$lt_include_expsyms
10237
10238 # ### END LIBTOOL CONFIG
10239
10240 __EOF__
10241
10242
10243 case $host_os in
10244 aix3*)
10245 cat <<\EOF >> "$cfgfile"
10246
10247 # AIX sometimes has problems with the GCC collect2 program. For some
10248 # reason, if we set the COLLECT_NAMES environment variable, the problems
10249 # vanish in a puff of smoke.
10250 if test "X${COLLECT_NAMES+set}" != Xset; then
10251 COLLECT_NAMES=
10252 export COLLECT_NAMES
10253 fi
10254 EOF
10255 ;;
10256 esac
10257
10258 # We use sed instead of cat because bash on DJGPP gets confused if
10259 # if finds mixed CR/LF and LF-only lines. Since sed operates in
10260 # text mode, it properly converts lines to CR/LF. This bash problem
10261 # is reportedly fixed, but why not run on old versions too?
10262 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
10263
10264 mv -f "$cfgfile" "$ofile" || \
10265 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10266 chmod +x "$ofile"
10267
10268 else
10269 # If there is no Makefile yet, we rely on a make rule to execute
10270 # `config.status --recheck' to rerun these tests and create the
10271 # libtool script then.
10272 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
10273 if test -f "$ltmain_in"; then
10274 test -f Makefile && make "$ltmain"
10275 fi
10276 fi
10277
10278
10279 ac_ext=c
10280 ac_cpp='$CPP $CPPFLAGS'
10281 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10282 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10283 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10284
10285 CC="$lt_save_CC"
10286
10287
10288 # Check whether --with-tags or --without-tags was given.
10289 if test "${with_tags+set}" = set; then
10290 withval="$with_tags"
10291 tagnames="$withval"
10292 fi;
10293
10294 if test -f "$ltmain" && test -n "$tagnames"; then
10295 if test ! -f "${ofile}"; then
10296 { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
10297 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
10298 fi
10299
10300 if test -z "$LTCC"; then
10301 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
10302 if test -z "$LTCC"; then
10303 { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
10304 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
10305 else
10306 { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
10307 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
10308 fi
10309 fi
10310 if test -z "$LTCFLAGS"; then
10311 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
10312 fi
10313
10314 # Extract list of available tagged configurations in $ofile.
10315 # Note that this assumes the entire list is on one line.
10316 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
10317
10318 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10319 for tagname in $tagnames; do
10320 IFS="$lt_save_ifs"
10321 # Check whether tagname contains only valid characters
10322 case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
10323 "") ;;
10324 *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
10325 echo "$as_me: error: invalid tag name: $tagname" >&2;}
10326 { (exit 1); exit 1; }; }
10327 ;;
10328 esac
10329
10330 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
10331 then
10332 { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
10333 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
10334 { (exit 1); exit 1; }; }
10335 fi
10336
10337 # Update the list of available tags.
10338 if test -n "$tagname"; then
10339 echo appending configuration tag \"$tagname\" to $ofile
10340
10341 case $tagname in
10342 CXX)
10343 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
10344 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
10345 (test "X$CXX" != "Xg++"))) ; then
10346 ac_ext=cc
10347 ac_cpp='$CXXCPP $CPPFLAGS'
10348 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10349 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10350 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10351
10352
10353
10354
10355 archive_cmds_need_lc_CXX=no
10356 allow_undefined_flag_CXX=
10357 always_export_symbols_CXX=no
10358 archive_expsym_cmds_CXX=
10359 export_dynamic_flag_spec_CXX=
10360 hardcode_direct_CXX=no
10361 hardcode_libdir_flag_spec_CXX=
10362 hardcode_libdir_flag_spec_ld_CXX=
10363 hardcode_libdir_separator_CXX=
10364 hardcode_minus_L_CXX=no
10365 hardcode_shlibpath_var_CXX=unsupported
10366 hardcode_automatic_CXX=no
10367 module_cmds_CXX=
10368 module_expsym_cmds_CXX=
10369 link_all_deplibs_CXX=unknown
10370 old_archive_cmds_CXX=$old_archive_cmds
10371 no_undefined_flag_CXX=
10372 whole_archive_flag_spec_CXX=
10373 enable_shared_with_static_runtimes_CXX=no
10374
10375 # Dependencies to place before and after the object being linked:
10376 predep_objects_CXX=
10377 postdep_objects_CXX=
10378 predeps_CXX=
10379 postdeps_CXX=
10380 compiler_lib_search_path_CXX=
10381
10382 # Source file extension for C++ test sources.
10383 ac_ext=cpp
10384
10385 # Object file extension for compiled C++ test sources.
10386 objext=o
10387 objext_CXX=$objext
10388
10389 # Code to be used in simple compile tests
10390 lt_simple_compile_test_code="int some_variable = 0;\n"
10391
10392 # Code to be used in simple link tests
10393 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
10394
10395 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
10396
10397 # If no C compiler was specified, use CC.
10398 LTCC=${LTCC-"$CC"}
10399
10400 # If no C compiler flags were specified, use CFLAGS.
10401 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10402
10403 # Allow CC to be a program name with arguments.
10404 compiler=$CC
10405
10406
10407 # save warnings/boilerplate of simple test code
10408 ac_outfile=conftest.$ac_objext
10409 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
10410 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10411 _lt_compiler_boilerplate=`cat conftest.err`
10412 $rm conftest*
10413
10414 ac_outfile=conftest.$ac_objext
10415 printf "$lt_simple_link_test_code" >conftest.$ac_ext
10416 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10417 _lt_linker_boilerplate=`cat conftest.err`
10418 $rm conftest*
10419
10420
10421 # Allow CC to be a program name with arguments.
10422 lt_save_CC=$CC
10423 lt_save_LD=$LD
10424 lt_save_GCC=$GCC
10425 GCC=$GXX
10426 lt_save_with_gnu_ld=$with_gnu_ld
10427 lt_save_path_LD=$lt_cv_path_LD
10428 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
10429 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
10430 else
10431 $as_unset lt_cv_prog_gnu_ld
10432 fi
10433 if test -n "${lt_cv_path_LDCXX+set}"; then
10434 lt_cv_path_LD=$lt_cv_path_LDCXX
10435 else
10436 $as_unset lt_cv_path_LD
10437 fi
10438 test -z "${LDCXX+set}" || LD=$LDCXX
10439 CC=${CXX-"c++"}
10440 compiler=$CC
10441 compiler_CXX=$CC
10442 for cc_temp in $compiler""; do
10443 case $cc_temp in
10444 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10445 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
10446 \-*) ;;
10447 *) break;;
10448 esac
10449 done
10450 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
10451
10452
10453 # We don't want -fno-exception wen compiling C++ code, so set the
10454 # no_builtin_flag separately
10455 if test "$GXX" = yes; then
10456 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
10457 else
10458 lt_prog_compiler_no_builtin_flag_CXX=
10459 fi
10460
10461 if test "$GXX" = yes; then
10462 # Set up default GNU C++ configuration
10463
10464
10465 # Check whether --with-gnu-ld or --without-gnu-ld was given.
10466 if test "${with_gnu_ld+set}" = set; then
10467 withval="$with_gnu_ld"
10468 test "$withval" = no || with_gnu_ld=yes
10469 else
10470 with_gnu_ld=no
10471 fi;
10472 ac_prog=ld
10473 if test "$GCC" = yes; then
10474 # Check if gcc -print-prog-name=ld gives a path.
10475 echo "$as_me:$LINENO: checking for ld used by $CC" >&5
10476 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
10477 case $host in
10478 *-*-mingw*)
10479 # gcc leaves a trailing carriage return which upsets mingw
10480 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10481 *)
10482 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10483 esac
10484 case $ac_prog in
10485 # Accept absolute paths.
10486 [\\/]* | ?:[\\/]*)
10487 re_direlt='/[^/][^/]*/\.\./'
10488 # Canonicalize the pathname of ld
10489 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
10490 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10491 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
10492 done
10493 test -z "$LD" && LD="$ac_prog"
10494 ;;
10495 "")
10496 # If it fails, then pretend we aren't using GCC.
10497 ac_prog=ld
10498 ;;
10499 *)
10500 # If it is relative, then search for the first ld in PATH.
10501 with_gnu_ld=unknown
10502 ;;
10503 esac
10504 elif test "$with_gnu_ld" = yes; then
10505 echo "$as_me:$LINENO: checking for GNU ld" >&5
10506 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
10507 else
10508 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10509 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
10510 fi
10511 if test "${lt_cv_path_LD+set}" = set; then
10512 echo $ECHO_N "(cached) $ECHO_C" >&6
10513 else
10514 if test -z "$LD"; then
10515 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
10516 for ac_dir in $PATH; do
10517 IFS="$lt_save_ifs"
10518 test -z "$ac_dir" && ac_dir=.
10519 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10520 lt_cv_path_LD="$ac_dir/$ac_prog"
10521 # Check to see if the program is GNU ld. I'd rather use --version,
10522 # but apparently some variants of GNU ld only accept -v.
10523 # Break only if it was the GNU/non-GNU ld that we prefer.
10524 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
10525 *GNU* | *'with BFD'*)
10526 test "$with_gnu_ld" != no && break
10527 ;;
10528 *)
10529 test "$with_gnu_ld" != yes && break
10530 ;;
10531 esac
10532 fi
10533 done
10534 IFS="$lt_save_ifs"
10535 else
10536 lt_cv_path_LD="$LD" # Let the user override the test with a path.
10537 fi
10538 fi
10539
10540 LD="$lt_cv_path_LD"
10541 if test -n "$LD"; then
10542 echo "$as_me:$LINENO: result: $LD" >&5
10543 echo "${ECHO_T}$LD" >&6
10544 else
10545 echo "$as_me:$LINENO: result: no" >&5
10546 echo "${ECHO_T}no" >&6
10547 fi
10548 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10549 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10550 { (exit 1); exit 1; }; }
10551 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10552 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10553 if test "${lt_cv_prog_gnu_ld+set}" = set; then
10554 echo $ECHO_N "(cached) $ECHO_C" >&6
10555 else
10556 # I'd rather use --version here, but apparently some GNU lds only accept -v.
10557 case `$LD -v 2>&1 </dev/null` in
10558 *GNU* | *'with BFD'*)
10559 lt_cv_prog_gnu_ld=yes
10560 ;;
10561 *)
10562 lt_cv_prog_gnu_ld=no
10563 ;;
10564 esac
10565 fi
10566 echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
10567 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
10568 with_gnu_ld=$lt_cv_prog_gnu_ld
10569
10570
10571
10572 # Check if GNU C++ uses GNU ld as the underlying linker, since the
10573 # archiving commands below assume that GNU ld is being used.
10574 if test "$with_gnu_ld" = yes; then
10575 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
10576 archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10577
10578 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
10579 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
10580
10581 # If archive_cmds runs LD, not CC, wlarc should be empty
10582 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
10583 # investigate it a little bit more. (MM)
10584 wlarc='${wl}'
10585
10586 # ancient GNU ld didn't support --whole-archive et. al.
10587 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
10588 grep 'no-whole-archive' > /dev/null; then
10589 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
10590 else
10591 whole_archive_flag_spec_CXX=
10592 fi
10593 else
10594 with_gnu_ld=no
10595 wlarc=
10596
10597 # A generic and very simple default shared library creation
10598 # command for GNU C++ for the case where it uses the native
10599 # linker, instead of GNU ld. If possible, this setting should
10600 # overridden to take advantage of the native linker features on
10601 # the platform it is being used on.
10602 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
10603 fi
10604
10605 # Commands to make compiler produce verbose output that lists
10606 # what "hidden" libraries, object files and flags are used when
10607 # linking a shared library.
10608 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
10609
10610 else
10611 GXX=no
10612 with_gnu_ld=no
10613 wlarc=
10614 fi
10615
10616 # PORTME: fill in a description of your system's C++ link characteristics
10617 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
10618 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
10619 ld_shlibs_CXX=yes
10620 case $host_os in
10621 aix3*)
10622 # FIXME: insert proper C++ library support
10623 ld_shlibs_CXX=no
10624 ;;
10625 aix4* | aix5*)
10626 if test "$host_cpu" = ia64; then
10627 # On IA64, the linker does run time linking by default, so we don't
10628 # have to do anything special.
10629 aix_use_runtimelinking=no
10630 exp_sym_flag='-Bexport'
10631 no_entry_flag=""
10632 else
10633 aix_use_runtimelinking=no
10634
10635 # Test if we are trying to use run time linking or normal
10636 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
10637 # need to do runtime linking.
10638 case $host_os in aix4.[23]|aix4.[23].*|aix5*)
10639 for ld_flag in $LDFLAGS; do
10640 case $ld_flag in
10641 *-brtl*)
10642 aix_use_runtimelinking=yes
10643 break
10644 ;;
10645 esac
10646 done
10647 ;;
10648 esac
10649
10650 exp_sym_flag='-bexport'
10651 no_entry_flag='-bnoentry'
10652 fi
10653
10654 # When large executables or shared objects are built, AIX ld can
10655 # have problems creating the table of contents. If linking a library
10656 # or program results in "error TOC overflow" add -mminimal-toc to
10657 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
10658 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10659
10660 archive_cmds_CXX=''
10661 hardcode_direct_CXX=yes
10662 hardcode_libdir_separator_CXX=':'
10663 link_all_deplibs_CXX=yes
10664
10665 if test "$GXX" = yes; then
10666 case $host_os in aix4.[012]|aix4.[012].*)
10667 # We only want to do this on AIX 4.2 and lower, the check
10668 # below for broken collect2 doesn't work under 4.3+
10669 collect2name=`${CC} -print-prog-name=collect2`
10670 if test -f "$collect2name" && \
10671 strings "$collect2name" | grep resolve_lib_name >/dev/null
10672 then
10673 # We have reworked collect2
10674 hardcode_direct_CXX=yes
10675 else
10676 # We have old collect2
10677 hardcode_direct_CXX=unsupported
10678 # It fails to find uninstalled libraries when the uninstalled
10679 # path is not listed in the libpath. Setting hardcode_minus_L
10680 # to unsupported forces relinking
10681 hardcode_minus_L_CXX=yes
10682 hardcode_libdir_flag_spec_CXX='-L$libdir'
10683 hardcode_libdir_separator_CXX=
10684 fi
10685 ;;
10686 esac
10687 shared_flag='-shared'
10688 if test "$aix_use_runtimelinking" = yes; then
10689 shared_flag="$shared_flag "'${wl}-G'
10690 fi
10691 else
10692 # not using gcc
10693 if test "$host_cpu" = ia64; then
10694 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10695 # chokes on -Wl,-G. The following line is correct:
10696 shared_flag='-G'
10697 else
10698 if test "$aix_use_runtimelinking" = yes; then
10699 shared_flag='${wl}-G'
10700 else
10701 shared_flag='${wl}-bM:SRE'
10702 fi
10703 fi
10704 fi
10705
10706 # It seems that -bexpall does not export symbols beginning with
10707 # underscore (_), so it is better to generate a list of symbols to export.
10708 always_export_symbols_CXX=yes
10709 if test "$aix_use_runtimelinking" = yes; then
10710 # Warning - without using the other runtime loading flags (-brtl),
10711 # -berok will link without error, but may produce a broken library.
10712 allow_undefined_flag_CXX='-berok'
10713 # Determine the default libpath from the value encoded in an empty executable.
10714 cat >conftest.$ac_ext <<_ACEOF
10715 /* confdefs.h. */
10716 _ACEOF
10717 cat confdefs.h >>conftest.$ac_ext
10718 cat >>conftest.$ac_ext <<_ACEOF
10719 /* end confdefs.h. */
10720
10721 int
10722 main ()
10723 {
10724
10725 ;
10726 return 0;
10727 }
10728 _ACEOF
10729 rm -f conftest.$ac_objext conftest$ac_exeext
10730 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10731 (eval $ac_link) 2>conftest.er1
10732 ac_status=$?
10733 grep -v '^ *+' conftest.er1 >conftest.err
10734 rm -f conftest.er1
10735 cat conftest.err >&5
10736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10737 (exit $ac_status); } &&
10738 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
10739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10740 (eval $ac_try) 2>&5
10741 ac_status=$?
10742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10743 (exit $ac_status); }; } &&
10744 { ac_try='test -s conftest$ac_exeext'
10745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10746 (eval $ac_try) 2>&5
10747 ac_status=$?
10748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10749 (exit $ac_status); }; }; then
10750
10751 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
10752 }'`
10753 # Check for a 64-bit object if we didn't find anything.
10754 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
10755 }'`; fi
10756 else
10757 echo "$as_me: failed program was:" >&5
10758 sed 's/^/| /' conftest.$ac_ext >&5
10759
10760 fi
10761 rm -f conftest.err conftest.$ac_objext \
10762 conftest$ac_exeext conftest.$ac_ext
10763 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
10764
10765 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
10766
10767 archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
10768 else
10769 if test "$host_cpu" = ia64; then
10770 hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
10771 allow_undefined_flag_CXX="-z nodefs"
10772 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
10773 else
10774 # Determine the default libpath from the value encoded in an empty executable.
10775 cat >conftest.$ac_ext <<_ACEOF
10776 /* confdefs.h. */
10777 _ACEOF
10778 cat confdefs.h >>conftest.$ac_ext
10779 cat >>conftest.$ac_ext <<_ACEOF
10780 /* end confdefs.h. */
10781
10782 int
10783 main ()
10784 {
10785
10786 ;
10787 return 0;
10788 }
10789 _ACEOF
10790 rm -f conftest.$ac_objext conftest$ac_exeext
10791 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10792 (eval $ac_link) 2>conftest.er1
10793 ac_status=$?
10794 grep -v '^ *+' conftest.er1 >conftest.err
10795 rm -f conftest.er1
10796 cat conftest.err >&5
10797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10798 (exit $ac_status); } &&
10799 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
10800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10801 (eval $ac_try) 2>&5
10802 ac_status=$?
10803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10804 (exit $ac_status); }; } &&
10805 { ac_try='test -s conftest$ac_exeext'
10806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10807 (eval $ac_try) 2>&5
10808 ac_status=$?
10809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10810 (exit $ac_status); }; }; then
10811
10812 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
10813 }'`
10814 # Check for a 64-bit object if we didn't find anything.
10815 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
10816 }'`; fi
10817 else
10818 echo "$as_me: failed program was:" >&5
10819 sed 's/^/| /' conftest.$ac_ext >&5
10820
10821 fi
10822 rm -f conftest.err conftest.$ac_objext \
10823 conftest$ac_exeext conftest.$ac_ext
10824 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
10825
10826 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
10827 # Warning - without using the other run time loading flags,
10828 # -berok will link without error, but may produce a broken library.
10829 no_undefined_flag_CXX=' ${wl}-bernotok'
10830 allow_undefined_flag_CXX=' ${wl}-berok'
10831 # Exported symbols can be pulled into shared objects from archives
10832 whole_archive_flag_spec_CXX='$convenience'
10833 archive_cmds_need_lc_CXX=yes
10834 # This is similar to how AIX traditionally builds its shared libraries.
10835 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
10836 fi
10837 fi
10838 ;;
10839
10840 beos*)
10841 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10842 allow_undefined_flag_CXX=unsupported
10843 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
10844 # support --undefined. This deserves some investigation. FIXME
10845 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10846 else
10847 ld_shlibs_CXX=no
10848 fi
10849 ;;
10850
10851 chorus*)
10852 case $cc_basename in
10853 *)
10854 # FIXME: insert proper C++ library support
10855 ld_shlibs_CXX=no
10856 ;;
10857 esac
10858 ;;
10859
10860 cygwin* | mingw* | pw32*)
10861 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
10862 # as there is no search path for DLLs.
10863 hardcode_libdir_flag_spec_CXX='-L$libdir'
10864 allow_undefined_flag_CXX=unsupported
10865 always_export_symbols_CXX=no
10866 enable_shared_with_static_runtimes_CXX=yes
10867
10868 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
10869 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
10870 # If the export-symbols file already is a .def file (1st line
10871 # is EXPORTS), use it as is; otherwise, prepend...
10872 archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10873 cp $export_symbols $output_objdir/$soname.def;
10874 else
10875 echo EXPORTS > $output_objdir/$soname.def;
10876 cat $export_symbols >> $output_objdir/$soname.def;
10877 fi~
10878 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
10879 else
10880 ld_shlibs_CXX=no
10881 fi
10882 ;;
10883 darwin* | rhapsody*)
10884 case $host_os in
10885 rhapsody* | darwin1.[012])
10886 allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
10887 ;;
10888 *) # Darwin 1.3 on
10889 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
10890 allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
10891 else
10892 case ${MACOSX_DEPLOYMENT_TARGET} in
10893 10.[012])
10894 allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
10895 ;;
10896 10.*)
10897 allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
10898 ;;
10899 esac
10900 fi
10901 ;;
10902 esac
10903 archive_cmds_need_lc_CXX=no
10904 hardcode_direct_CXX=no
10905 hardcode_automatic_CXX=yes
10906 hardcode_shlibpath_var_CXX=unsupported
10907 whole_archive_flag_spec_CXX=''
10908 link_all_deplibs_CXX=yes
10909
10910 if test "$GXX" = yes ; then
10911 lt_int_apple_cc_single_mod=no
10912 output_verbose_link_cmd='echo'
10913 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
10914 lt_int_apple_cc_single_mod=yes
10915 fi
10916 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
10917 archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
10918 else
10919 archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
10920 fi
10921 module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
10922 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
10923 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
10924 archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10925 else
10926 archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10927 fi
10928 module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10929 else
10930 case $cc_basename in
10931 xlc*)
10932 output_verbose_link_cmd='echo'
10933 archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
10934 module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
10935 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
10936 archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10937 module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10938 ;;
10939 *)
10940 ld_shlibs_CXX=no
10941 ;;
10942 esac
10943 fi
10944 ;;
10945
10946 dgux*)
10947 case $cc_basename in
10948 ec++*)
10949 # FIXME: insert proper C++ library support
10950 ld_shlibs_CXX=no
10951 ;;
10952 ghcx*)
10953 # Green Hills C++ Compiler
10954 # FIXME: insert proper C++ library support
10955 ld_shlibs_CXX=no
10956 ;;
10957 *)
10958 # FIXME: insert proper C++ library support
10959 ld_shlibs_CXX=no
10960 ;;
10961 esac
10962 ;;
10963 freebsd[12]*)
10964 # C++ shared libraries reported to be fairly broken before switch to ELF
10965 ld_shlibs_CXX=no
10966 ;;
10967 freebsd-elf*)
10968 archive_cmds_need_lc_CXX=no
10969 ;;
10970 freebsd* | kfreebsd*-gnu | dragonfly*)
10971 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
10972 # conventions
10973 ld_shlibs_CXX=yes
10974 ;;
10975 gnu*)
10976 ;;
10977 hpux9*)
10978 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
10979 hardcode_libdir_separator_CXX=:
10980 export_dynamic_flag_spec_CXX='${wl}-E'
10981 hardcode_direct_CXX=yes
10982 hardcode_minus_L_CXX=yes # Not in the search PATH,
10983 # but as the default
10984 # location of the library.
10985
10986 case $cc_basename in
10987 CC*)
10988 # FIXME: insert proper C++ library support
10989 ld_shlibs_CXX=no
10990 ;;
10991 aCC*)
10992 archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
10993 # Commands to make compiler produce verbose output that lists
10994 # what "hidden" libraries, object files and flags are used when
10995 # linking a shared library.
10996 #
10997 # There doesn't appear to be a way to prevent this compiler from
10998 # explicitly linking system object files so we need to strip them
10999 # from the output so that they don't get included in the library
11000 # dependencies.
11001 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
11002 ;;
11003 *)
11004 if test "$GXX" = yes; then
11005 archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
11006 else
11007 # FIXME: insert proper C++ library support
11008 ld_shlibs_CXX=no
11009 fi
11010 ;;
11011 esac
11012 ;;
11013 hpux10*|hpux11*)
11014 if test $with_gnu_ld = no; then
11015 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
11016 hardcode_libdir_separator_CXX=:
11017
11018 case $host_cpu in
11019 hppa*64*|ia64*)
11020 hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
11021 ;;
11022 *)
11023 export_dynamic_flag_spec_CXX='${wl}-E'
11024 ;;
11025 esac
11026 fi
11027 case $host_cpu in
11028 hppa*64*|ia64*)
11029 hardcode_direct_CXX=no
11030 hardcode_shlibpath_var_CXX=no
11031 ;;
11032 *)
11033 hardcode_direct_CXX=yes
11034 hardcode_minus_L_CXX=yes # Not in the search PATH,
11035 # but as the default
11036 # location of the library.
11037 ;;
11038 esac
11039
11040 case $cc_basename in
11041 CC*)
11042 # FIXME: insert proper C++ library support
11043 ld_shlibs_CXX=no
11044 ;;
11045 aCC*)
11046 case $host_cpu in
11047 hppa*64*)
11048 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11049 ;;
11050 ia64*)
11051 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11052 ;;
11053 *)
11054 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11055 ;;
11056 esac
11057 # Commands to make compiler produce verbose output that lists
11058 # what "hidden" libraries, object files and flags are used when
11059 # linking a shared library.
11060 #
11061 # There doesn't appear to be a way to prevent this compiler from
11062 # explicitly linking system object files so we need to strip them
11063 # from the output so that they don't get included in the library
11064 # dependencies.
11065 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
11066 ;;
11067 *)
11068 if test "$GXX" = yes; then
11069 if test $with_gnu_ld = no; then
11070 case $host_cpu in
11071 hppa*64*)
11072 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11073 ;;
11074 ia64*)
11075 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11076 ;;
11077 *)
11078 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11079 ;;
11080 esac
11081 fi
11082 else
11083 # FIXME: insert proper C++ library support
11084 ld_shlibs_CXX=no
11085 fi
11086 ;;
11087 esac
11088 ;;
11089 interix3*)
11090 hardcode_direct_CXX=no
11091 hardcode_shlibpath_var_CXX=no
11092 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11093 export_dynamic_flag_spec_CXX='${wl}-E'
11094 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11095 # Instead, shared libraries are loaded at an image base (0x10000000 by
11096 # default) and relocated if they conflict, which is a slow very memory
11097 # consuming and fragmenting process. To avoid this, we pick a random,
11098 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11099 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
11100 archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11101 archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11102 ;;
11103 irix5* | irix6*)
11104 case $cc_basename in
11105 CC*)
11106 # SGI C++
11107 archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
11108
11109 # Archives containing C++ object files must be created using
11110 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
11111 # necessary to make sure instantiated templates are included
11112 # in the archive.
11113 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
11114 ;;
11115 *)
11116 if test "$GXX" = yes; then
11117 if test "$with_gnu_ld" = no; then
11118 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11119 else
11120 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
11121 fi
11122 fi
11123 link_all_deplibs_CXX=yes
11124 ;;
11125 esac
11126 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
11127 hardcode_libdir_separator_CXX=:
11128 ;;
11129 linux*)
11130 case $cc_basename in
11131 KCC*)
11132 # Kuck and Associates, Inc. (KAI) C++ Compiler
11133
11134 # KCC will only create a shared library if the output file
11135 # ends with ".so" (or ".sl" for HP-UX), so rename the library
11136 # to its proper name (with version) after linking.
11137 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
11138 archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
11139 # Commands to make compiler produce verbose output that lists
11140 # what "hidden" libraries, object files and flags are used when
11141 # linking a shared library.
11142 #
11143 # There doesn't appear to be a way to prevent this compiler from
11144 # explicitly linking system object files so we need to strip them
11145 # from the output so that they don't get included in the library
11146 # dependencies.
11147 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
11148
11149 hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
11150 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
11151
11152 # Archives containing C++ object files must be created using
11153 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
11154 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
11155 ;;
11156 icpc*)
11157 # Intel C++
11158 with_gnu_ld=yes
11159 # version 8.0 and above of icpc choke on multiply defined symbols
11160 # if we add $predep_objects and $postdep_objects, however 7.1 and
11161 # earlier do not add the objects themselves.
11162 case `$CC -V 2>&1` in
11163 *"Version 7."*)
11164 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
11165 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11166 ;;
11167 *) # Version 8.0 or newer
11168 tmp_idyn=
11169 case $host_cpu in
11170 ia64*) tmp_idyn=' -i_dynamic';;
11171 esac
11172 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11173 archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11174 ;;
11175 esac
11176 archive_cmds_need_lc_CXX=no
11177 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11178 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
11179 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
11180 ;;
11181 pgCC*)
11182 # Portland Group C++ compiler
11183 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
11184 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
11185
11186 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
11187 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
11188 whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
11189 ;;
11190 cxx*)
11191 # Compaq C++
11192 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
11193 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
11194
11195 runpath_var=LD_RUN_PATH
11196 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
11197 hardcode_libdir_separator_CXX=:
11198
11199 # Commands to make compiler produce verbose output that lists
11200 # what "hidden" libraries, object files and flags are used when
11201 # linking a shared library.
11202 #
11203 # There doesn't appear to be a way to prevent this compiler from
11204 # explicitly linking system object files so we need to strip them
11205 # from the output so that they don't get included in the library
11206 # dependencies.
11207 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
11208 ;;
11209 esac
11210 ;;
11211 lynxos*)
11212 # FIXME: insert proper C++ library support
11213 ld_shlibs_CXX=no
11214 ;;
11215 m88k*)
11216 # FIXME: insert proper C++ library support
11217 ld_shlibs_CXX=no
11218 ;;
11219 mvs*)
11220 case $cc_basename in
11221 cxx*)
11222 # FIXME: insert proper C++ library support
11223 ld_shlibs_CXX=no
11224 ;;
11225 *)
11226 # FIXME: insert proper C++ library support
11227 ld_shlibs_CXX=no
11228 ;;
11229 esac
11230 ;;
11231 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
11232 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11233 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
11234 wlarc=
11235 hardcode_libdir_flag_spec_CXX='-R$libdir'
11236 hardcode_direct_CXX=yes
11237 hardcode_shlibpath_var_CXX=no
11238 fi
11239 # Workaround some broken pre-1.5 toolchains
11240 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
11241 ;;
11242 openbsd2*)
11243 # C++ shared libraries are fairly broken
11244 ld_shlibs_CXX=no
11245 ;;
11246 openbsd*)
11247 hardcode_direct_CXX=yes
11248 hardcode_shlibpath_var_CXX=no
11249 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
11250 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11251 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11252 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
11253 export_dynamic_flag_spec_CXX='${wl}-E'
11254 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
11255 fi
11256 output_verbose_link_cmd='echo'
11257 ;;
11258 osf3*)
11259 case $cc_basename in
11260 KCC*)
11261 # Kuck and Associates, Inc. (KAI) C++ Compiler
11262
11263 # KCC will only create a shared library if the output file
11264 # ends with ".so" (or ".sl" for HP-UX), so rename the library
11265 # to its proper name (with version) after linking.
11266 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
11267
11268 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11269 hardcode_libdir_separator_CXX=:
11270
11271 # Archives containing C++ object files must be created using
11272 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
11273 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
11274
11275 ;;
11276 RCC*)
11277 # Rational C++ 2.4.1
11278 # FIXME: insert proper C++ library support
11279 ld_shlibs_CXX=no
11280 ;;
11281 cxx*)
11282 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
11283 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
11284
11285 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
11286 hardcode_libdir_separator_CXX=:
11287
11288 # Commands to make compiler produce verbose output that lists
11289 # what "hidden" libraries, object files and flags are used when
11290 # linking a shared library.
11291 #
11292 # There doesn't appear to be a way to prevent this compiler from
11293 # explicitly linking system object files so we need to strip them
11294 # from the output so that they don't get included in the library
11295 # dependencies.
11296 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
11297 ;;
11298 *)
11299 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
11300 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
11301 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11302
11303 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
11304 hardcode_libdir_separator_CXX=:
11305
11306 # Commands to make compiler produce verbose output that lists
11307 # what "hidden" libraries, object files and flags are used when
11308 # linking a shared library.
11309 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
11310
11311 else
11312 # FIXME: insert proper C++ library support
11313 ld_shlibs_CXX=no
11314 fi
11315 ;;
11316 esac
11317 ;;
11318 osf4* | osf5*)
11319 case $cc_basename in
11320 KCC*)
11321 # Kuck and Associates, Inc. (KAI) C++ Compiler
11322
11323 # KCC will only create a shared library if the output file
11324 # ends with ".so" (or ".sl" for HP-UX), so rename the library
11325 # to its proper name (with version) after linking.
11326 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
11327
11328 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11329 hardcode_libdir_separator_CXX=:
11330
11331 # Archives containing C++ object files must be created using
11332 # the KAI C++ compiler.
11333 old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
11334 ;;
11335 RCC*)
11336 # Rational C++ 2.4.1
11337 # FIXME: insert proper C++ library support
11338 ld_shlibs_CXX=no
11339 ;;
11340 cxx*)
11341 allow_undefined_flag_CXX=' -expect_unresolved \*'
11342 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
11343 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
11344 echo "-hidden">> $lib.exp~
11345 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
11346 $rm $lib.exp'
11347
11348 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
11349 hardcode_libdir_separator_CXX=:
11350
11351 # Commands to make compiler produce verbose output that lists
11352 # what "hidden" libraries, object files and flags are used when
11353 # linking a shared library.
11354 #
11355 # There doesn't appear to be a way to prevent this compiler from
11356 # explicitly linking system object files so we need to strip them
11357 # from the output so that they don't get included in the library
11358 # dependencies.
11359 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
11360 ;;
11361 *)
11362 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
11363 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
11364 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11365
11366 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
11367 hardcode_libdir_separator_CXX=:
11368
11369 # Commands to make compiler produce verbose output that lists
11370 # what "hidden" libraries, object files and flags are used when
11371 # linking a shared library.
11372 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
11373
11374 else
11375 # FIXME: insert proper C++ library support
11376 ld_shlibs_CXX=no
11377 fi
11378 ;;
11379 esac
11380 ;;
11381 psos*)
11382 # FIXME: insert proper C++ library support
11383 ld_shlibs_CXX=no
11384 ;;
11385 sunos4*)
11386 case $cc_basename in
11387 CC*)
11388 # Sun C++ 4.x
11389 # FIXME: insert proper C++ library support
11390 ld_shlibs_CXX=no
11391 ;;
11392 lcc*)
11393 # Lucid
11394 # FIXME: insert proper C++ library support
11395 ld_shlibs_CXX=no
11396 ;;
11397 *)
11398 # FIXME: insert proper C++ library support
11399 ld_shlibs_CXX=no
11400 ;;
11401 esac
11402 ;;
11403 solaris*)
11404 case $cc_basename in
11405 CC*)
11406 # Sun C++ 4.2, 5.x and Centerline C++
11407 archive_cmds_need_lc_CXX=yes
11408 no_undefined_flag_CXX=' -zdefs'
11409 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11410 archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11411 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
11412
11413 hardcode_libdir_flag_spec_CXX='-R$libdir'
11414 hardcode_shlibpath_var_CXX=no
11415 case $host_os in
11416 solaris2.[0-5] | solaris2.[0-5].*) ;;
11417 *)
11418 # The C++ compiler is used as linker so we must use $wl
11419 # flag to pass the commands to the underlying system
11420 # linker. We must also pass each convience library through
11421 # to the system linker between allextract/defaultextract.
11422 # The C++ compiler will combine linker options so we
11423 # cannot just pass the convience library names through
11424 # without $wl.
11425 # Supported since Solaris 2.6 (maybe 2.5.1?)
11426 whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
11427 ;;
11428 esac
11429 link_all_deplibs_CXX=yes
11430
11431 output_verbose_link_cmd='echo'
11432
11433 # Archives containing C++ object files must be created using
11434 # "CC -xar", where "CC" is the Sun C++ compiler. This is
11435 # necessary to make sure instantiated templates are included
11436 # in the archive.
11437 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
11438 ;;
11439 gcx*)
11440 # Green Hills C++ Compiler
11441 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
11442
11443 # The C++ compiler must be used to create the archive.
11444 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
11445 ;;
11446 *)
11447 # GNU C++ compiler with Solaris linker
11448 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
11449 no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
11450 if $CC --version | grep -v '^2\.7' > /dev/null; then
11451 archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
11452 archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11453 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
11454
11455 # Commands to make compiler produce verbose output that lists
11456 # what "hidden" libraries, object files and flags are used when
11457 # linking a shared library.
11458 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
11459 else
11460 # g++ 2.7 appears to require `-G' NOT `-shared' on this
11461 # platform.
11462 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
11463 archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11464 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
11465
11466 # Commands to make compiler produce verbose output that lists
11467 # what "hidden" libraries, object files and flags are used when
11468 # linking a shared library.
11469 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
11470 fi
11471
11472 hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
11473 fi
11474 ;;
11475 esac
11476 ;;
11477 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
11478 no_undefined_flag_CXX='${wl}-z,text'
11479 archive_cmds_need_lc_CXX=no
11480 hardcode_shlibpath_var_CXX=no
11481 runpath_var='LD_RUN_PATH'
11482
11483 case $cc_basename in
11484 CC*)
11485 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11486 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11487 ;;
11488 *)
11489 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11490 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11491 ;;
11492 esac
11493 ;;
11494 sysv5* | sco3.2v5* | sco5v6*)
11495 # Note: We can NOT use -z defs as we might desire, because we do not
11496 # link with -lc, and that would cause any symbols used from libc to
11497 # always be unresolved, which means just about no library would
11498 # ever link correctly. If we're not using GNU ld we use -z text
11499 # though, which does catch some bad symbols but isn't as heavy-handed
11500 # as -z defs.
11501 # For security reasons, it is highly recommended that you always
11502 # use absolute paths for naming shared libraries, and exclude the
11503 # DT_RUNPATH tag from executables and libraries. But doing so
11504 # requires that you compile everything twice, which is a pain.
11505 # So that behaviour is only enabled if SCOABSPATH is set to a
11506 # non-empty value in the environment. Most likely only useful for
11507 # creating official distributions of packages.
11508 # This is a hack until libtool officially supports absolute path
11509 # names for shared libraries.
11510 no_undefined_flag_CXX='${wl}-z,text'
11511 allow_undefined_flag_CXX='${wl}-z,nodefs'
11512 archive_cmds_need_lc_CXX=no
11513 hardcode_shlibpath_var_CXX=no
11514 hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
11515 hardcode_libdir_separator_CXX=':'
11516 link_all_deplibs_CXX=yes
11517 export_dynamic_flag_spec_CXX='${wl}-Bexport'
11518 runpath_var='LD_RUN_PATH'
11519
11520 case $cc_basename in
11521 CC*)
11522 archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
11523 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
11524 ;;
11525 *)
11526 archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
11527 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
11528 ;;
11529 esac
11530 ;;
11531 tandem*)
11532 case $cc_basename in
11533 NCC*)
11534 # NonStop-UX NCC 3.20
11535 # FIXME: insert proper C++ library support
11536 ld_shlibs_CXX=no
11537 ;;
11538 *)
11539 # FIXME: insert proper C++ library support
11540 ld_shlibs_CXX=no
11541 ;;
11542 esac
11543 ;;
11544 vxworks*)
11545 # FIXME: insert proper C++ library support
11546 ld_shlibs_CXX=no
11547 ;;
11548 *)
11549 # FIXME: insert proper C++ library support
11550 ld_shlibs_CXX=no
11551 ;;
11552 esac
11553 echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
11554 echo "${ECHO_T}$ld_shlibs_CXX" >&6
11555 test "$ld_shlibs_CXX" = no && can_build_shared=no
11556
11557 GCC_CXX="$GXX"
11558 LD_CXX="$LD"
11559
11560
11561 cat > conftest.$ac_ext <<EOF
11562 class Foo
11563 {
11564 public:
11565 Foo (void) { a = 0; }
11566 private:
11567 int a;
11568 };
11569 EOF
11570
11571 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11572 (eval $ac_compile) 2>&5
11573 ac_status=$?
11574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11575 (exit $ac_status); }; then
11576 # Parse the compiler output and extract the necessary
11577 # objects, libraries and library flags.
11578
11579 # Sentinel used to keep track of whether or not we are before
11580 # the conftest object file.
11581 pre_test_object_deps_done=no
11582
11583 # The `*' in the case matches for architectures that use `case' in
11584 # $output_verbose_cmd can trigger glob expansion during the loop
11585 # eval without this substitution.
11586 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
11587
11588 for p in `eval $output_verbose_link_cmd`; do
11589 case $p in
11590
11591 -L* | -R* | -l*)
11592 # Some compilers place space between "-{L,R}" and the path.
11593 # Remove the space.
11594 if test $p = "-L" \
11595 || test $p = "-R"; then
11596 prev=$p
11597 continue
11598 else
11599 prev=
11600 fi
11601
11602 if test "$pre_test_object_deps_done" = no; then
11603 case $p in
11604 -L* | -R*)
11605 # Internal compiler library paths should come after those
11606 # provided the user. The postdeps already come after the
11607 # user supplied libs so there is no need to process them.
11608 if test -z "$compiler_lib_search_path_CXX"; then
11609 compiler_lib_search_path_CXX="${prev}${p}"
11610 else
11611 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
11612 fi
11613 ;;
11614 # The "-l" case would never come before the object being
11615 # linked, so don't bother handling this case.
11616 esac
11617 else
11618 if test -z "$postdeps_CXX"; then
11619 postdeps_CXX="${prev}${p}"
11620 else
11621 postdeps_CXX="${postdeps_CXX} ${prev}${p}"
11622 fi
11623 fi
11624 ;;
11625
11626 *.$objext)
11627 # This assumes that the test object file only shows up
11628 # once in the compiler output.
11629 if test "$p" = "conftest.$objext"; then
11630 pre_test_object_deps_done=yes
11631 continue
11632 fi
11633
11634 if test "$pre_test_object_deps_done" = no; then
11635 if test -z "$predep_objects_CXX"; then
11636 predep_objects_CXX="$p"
11637 else
11638 predep_objects_CXX="$predep_objects_CXX $p"
11639 fi
11640 else
11641 if test -z "$postdep_objects_CXX"; then
11642 postdep_objects_CXX="$p"
11643 else
11644 postdep_objects_CXX="$postdep_objects_CXX $p"
11645 fi
11646 fi
11647 ;;
11648
11649 *) ;; # Ignore the rest.
11650
11651 esac
11652 done
11653
11654 # Clean up.
11655 rm -f a.out a.exe
11656 else
11657 echo "libtool.m4: error: problem compiling CXX test program"
11658 fi
11659
11660 $rm -f confest.$objext
11661
11662 # PORTME: override above test on systems where it is broken
11663 case $host_os in
11664 interix3*)
11665 # Interix 3.5 installs completely hosed .la files for C++, so rather than
11666 # hack all around it, let's just trust "g++" to DTRT.
11667 predep_objects_CXX=
11668 postdep_objects_CXX=
11669 postdeps_CXX=
11670 ;;
11671
11672 solaris*)
11673 case $cc_basename in
11674 CC*)
11675 # Adding this requires a known-good setup of shared libraries for
11676 # Sun compiler versions before 5.6, else PIC objects from an old
11677 # archive will be linked into the output, leading to subtle bugs.
11678 postdeps_CXX='-lCstd -lCrun'
11679 ;;
11680 esac
11681 ;;
11682 esac
11683
11684
11685 case " $postdeps_CXX " in
11686 *" -lc "*) archive_cmds_need_lc_CXX=no ;;
11687 esac
11688
11689 lt_prog_compiler_wl_CXX=
11690 lt_prog_compiler_pic_CXX=
11691 lt_prog_compiler_static_CXX=
11692
11693 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
11694 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
11695
11696 # C++ specific cases for pic, static, wl, etc.
11697 if test "$GXX" = yes; then
11698 lt_prog_compiler_wl_CXX='-Wl,'
11699 lt_prog_compiler_static_CXX='-static'
11700
11701 case $host_os in
11702 aix*)
11703 # All AIX code is PIC.
11704 if test "$host_cpu" = ia64; then
11705 # AIX 5 now supports IA64 processor
11706 lt_prog_compiler_static_CXX='-Bstatic'
11707 fi
11708 ;;
11709 amigaos*)
11710 # FIXME: we need at least 68020 code to build shared libraries, but
11711 # adding the `-m68020' flag to GCC prevents building anything better,
11712 # like `-m68040'.
11713 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
11714 ;;
11715 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
11716 # PIC is the default for these OSes.
11717 ;;
11718 mingw* | os2* | pw32*)
11719 # This hack is so that the source file can tell whether it is being
11720 # built for inclusion in a dll (and should export symbols for example).
11721 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
11722 ;;
11723 darwin* | rhapsody*)
11724 # PIC is the default on this platform
11725 # Common symbols not allowed in MH_DYLIB files
11726 lt_prog_compiler_pic_CXX='-fno-common'
11727 ;;
11728 *djgpp*)
11729 # DJGPP does not support shared libraries at all
11730 lt_prog_compiler_pic_CXX=
11731 ;;
11732 interix3*)
11733 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
11734 # Instead, we relocate shared libraries at runtime.
11735 ;;
11736 sysv4*MP*)
11737 if test -d /usr/nec; then
11738 lt_prog_compiler_pic_CXX=-Kconform_pic
11739 fi
11740 ;;
11741 hpux*)
11742 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11743 # not for PA HP-UX.
11744 case $host_cpu in
11745 hppa*64*|ia64*)
11746 ;;
11747 *)
11748 lt_prog_compiler_pic_CXX='-fPIC'
11749 ;;
11750 esac
11751 ;;
11752 *)
11753 lt_prog_compiler_pic_CXX='-fPIC'
11754 ;;
11755 esac
11756 else
11757 case $host_os in
11758 aix4* | aix5*)
11759 # All AIX code is PIC.
11760 if test "$host_cpu" = ia64; then
11761 # AIX 5 now supports IA64 processor
11762 lt_prog_compiler_static_CXX='-Bstatic'
11763 else
11764 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
11765 fi
11766 ;;
11767 chorus*)
11768 case $cc_basename in
11769 cxch68*)
11770 # Green Hills C++ Compiler
11771 # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
11772 ;;
11773 esac
11774 ;;
11775 darwin*)
11776 # PIC is the default on this platform
11777 # Common symbols not allowed in MH_DYLIB files
11778 case $cc_basename in
11779 xlc*)
11780 lt_prog_compiler_pic_CXX='-qnocommon'
11781 lt_prog_compiler_wl_CXX='-Wl,'
11782 ;;
11783 esac
11784 ;;
11785 dgux*)
11786 case $cc_basename in
11787 ec++*)
11788 lt_prog_compiler_pic_CXX='-KPIC'
11789 ;;
11790 ghcx*)
11791 # Green Hills C++ Compiler
11792 lt_prog_compiler_pic_CXX='-pic'
11793 ;;
11794 *)
11795 ;;
11796 esac
11797 ;;
11798 freebsd* | kfreebsd*-gnu | dragonfly*)
11799 # FreeBSD uses GNU C++
11800 ;;
11801 hpux9* | hpux10* | hpux11*)
11802 case $cc_basename in
11803 CC*)
11804 lt_prog_compiler_wl_CXX='-Wl,'
11805 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
11806 if test "$host_cpu" != ia64; then
11807 lt_prog_compiler_pic_CXX='+Z'
11808 fi
11809 ;;
11810 aCC*)
11811 lt_prog_compiler_wl_CXX='-Wl,'
11812 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
11813 case $host_cpu in
11814 hppa*64*|ia64*)
11815 # +Z the default
11816 ;;
11817 *)
11818 lt_prog_compiler_pic_CXX='+Z'
11819 ;;
11820 esac
11821 ;;
11822 *)
11823 ;;
11824 esac
11825 ;;
11826 interix*)
11827 # This is c89, which is MS Visual C++ (no shared libs)
11828 # Anyone wants to do a port?
11829 ;;
11830 irix5* | irix6* | nonstopux*)
11831 case $cc_basename in
11832 CC*)
11833 lt_prog_compiler_wl_CXX='-Wl,'
11834 lt_prog_compiler_static_CXX='-non_shared'
11835 # CC pic flag -KPIC is the default.
11836 ;;
11837 *)
11838 ;;
11839 esac
11840 ;;
11841 linux*)
11842 case $cc_basename in
11843 KCC*)
11844 # KAI C++ Compiler
11845 lt_prog_compiler_wl_CXX='--backend -Wl,'
11846 lt_prog_compiler_pic_CXX='-fPIC'
11847 ;;
11848 icpc* | ecpc*)
11849 # Intel C++
11850 lt_prog_compiler_wl_CXX='-Wl,'
11851 lt_prog_compiler_pic_CXX='-KPIC'
11852 lt_prog_compiler_static_CXX='-static'
11853 ;;
11854 pgCC*)
11855 # Portland Group C++ compiler.
11856 lt_prog_compiler_wl_CXX='-Wl,'
11857 lt_prog_compiler_pic_CXX='-fpic'
11858 lt_prog_compiler_static_CXX='-Bstatic'
11859 ;;
11860 cxx*)
11861 # Compaq C++
11862 # Make sure the PIC flag is empty. It appears that all Alpha
11863 # Linux and Compaq Tru64 Unix objects are PIC.
11864 lt_prog_compiler_pic_CXX=
11865 lt_prog_compiler_static_CXX='-non_shared'
11866 ;;
11867 *)
11868 ;;
11869 esac
11870 ;;
11871 lynxos*)
11872 ;;
11873 m88k*)
11874 ;;
11875 mvs*)
11876 case $cc_basename in
11877 cxx*)
11878 lt_prog_compiler_pic_CXX='-W c,exportall'
11879 ;;
11880 *)
11881 ;;
11882 esac
11883 ;;
11884 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
11885 ;;
11886 osf3* | osf4* | osf5*)
11887 case $cc_basename in
11888 KCC*)
11889 lt_prog_compiler_wl_CXX='--backend -Wl,'
11890 ;;
11891 RCC*)
11892 # Rational C++ 2.4.1
11893 lt_prog_compiler_pic_CXX='-pic'
11894 ;;
11895 cxx*)
11896 # Digital/Compaq C++
11897 lt_prog_compiler_wl_CXX='-Wl,'
11898 # Make sure the PIC flag is empty. It appears that all Alpha
11899 # Linux and Compaq Tru64 Unix objects are PIC.
11900 lt_prog_compiler_pic_CXX=
11901 lt_prog_compiler_static_CXX='-non_shared'
11902 ;;
11903 *)
11904 ;;
11905 esac
11906 ;;
11907 psos*)
11908 ;;
11909 solaris*)
11910 case $cc_basename in
11911 CC*)
11912 # Sun C++ 4.2, 5.x and Centerline C++
11913 lt_prog_compiler_pic_CXX='-KPIC'
11914 lt_prog_compiler_static_CXX='-Bstatic'
11915 lt_prog_compiler_wl_CXX='-Qoption ld '
11916 ;;
11917 gcx*)
11918 # Green Hills C++ Compiler
11919 lt_prog_compiler_pic_CXX='-PIC'
11920 ;;
11921 *)
11922 ;;
11923 esac
11924 ;;
11925 sunos4*)
11926 case $cc_basename in
11927 CC*)
11928 # Sun C++ 4.x
11929 lt_prog_compiler_pic_CXX='-pic'
11930 lt_prog_compiler_static_CXX='-Bstatic'
11931 ;;
11932 lcc*)
11933 # Lucid
11934 lt_prog_compiler_pic_CXX='-pic'
11935 ;;
11936 *)
11937 ;;
11938 esac
11939 ;;
11940 tandem*)
11941 case $cc_basename in
11942 NCC*)
11943 # NonStop-UX NCC 3.20
11944 lt_prog_compiler_pic_CXX='-KPIC'
11945 ;;
11946 *)
11947 ;;
11948 esac
11949 ;;
11950 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11951 case $cc_basename in
11952 CC*)
11953 lt_prog_compiler_wl_CXX='-Wl,'
11954 lt_prog_compiler_pic_CXX='-KPIC'
11955 lt_prog_compiler_static_CXX='-Bstatic'
11956 ;;
11957 esac
11958 ;;
11959 vxworks*)
11960 ;;
11961 *)
11962 lt_prog_compiler_can_build_shared_CXX=no
11963 ;;
11964 esac
11965 fi
11966
11967 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
11968 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6
11969
11970 #
11971 # Check to make sure the PIC flag actually works.
11972 #
11973 if test -n "$lt_prog_compiler_pic_CXX"; then
11974
11975 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
11976 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
11977 if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
11978 echo $ECHO_N "(cached) $ECHO_C" >&6
11979 else
11980 lt_prog_compiler_pic_works_CXX=no
11981 ac_outfile=conftest.$ac_objext
11982 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
11983 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
11984 # Insert the option either (1) after the last *FLAGS variable, or
11985 # (2) before a word containing "conftest.", or (3) at the end.
11986 # Note that $ac_compile itself does not contain backslashes and begins
11987 # with a dollar sign (not a hyphen), so the echo should work correctly.
11988 # The option is referenced via a variable to avoid confusing sed.
11989 lt_compile=`echo "$ac_compile" | $SED \
11990 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11991 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11992 -e 's:$: $lt_compiler_flag:'`
11993 (eval echo "\"\$as_me:11994: $lt_compile\"" >&5)
11994 (eval "$lt_compile" 2>conftest.err)
11995 ac_status=$?
11996 cat conftest.err >&5
11997 echo "$as_me:11998: \$? = $ac_status" >&5
11998 if (exit $ac_status) && test -s "$ac_outfile"; then
11999 # The compiler can only warn and ignore the option if not recognized
12000 # So say no if there are warnings other than the usual output.
12001 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
12002 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12003 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12004 lt_prog_compiler_pic_works_CXX=yes
12005 fi
12006 fi
12007 $rm conftest*
12008
12009 fi
12010 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
12011 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6
12012
12013 if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
12014 case $lt_prog_compiler_pic_CXX in
12015 "" | " "*) ;;
12016 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
12017 esac
12018 else
12019 lt_prog_compiler_pic_CXX=
12020 lt_prog_compiler_can_build_shared_CXX=no
12021 fi
12022
12023 fi
12024 case $host_os in
12025 # For platforms which do not support PIC, -DPIC is meaningless:
12026 *djgpp*)
12027 lt_prog_compiler_pic_CXX=
12028 ;;
12029 *)
12030 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
12031 ;;
12032 esac
12033
12034 #
12035 # Check to make sure the static flag actually works.
12036 #
12037 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
12038 echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
12039 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
12040 if test "${lt_prog_compiler_static_works_CXX+set}" = set; then
12041 echo $ECHO_N "(cached) $ECHO_C" >&6
12042 else
12043 lt_prog_compiler_static_works_CXX=no
12044 save_LDFLAGS="$LDFLAGS"
12045 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
12046 printf "$lt_simple_link_test_code" > conftest.$ac_ext
12047 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12048 # The linker can only warn and ignore the option if not recognized
12049 # So say no if there are warnings
12050 if test -s conftest.err; then
12051 # Append any errors to the config.log.
12052 cat conftest.err 1>&5
12053 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
12054 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12055 if diff conftest.exp conftest.er2 >/dev/null; then
12056 lt_prog_compiler_static_works_CXX=yes
12057 fi
12058 else
12059 lt_prog_compiler_static_works_CXX=yes
12060 fi
12061 fi
12062 $rm conftest*
12063 LDFLAGS="$save_LDFLAGS"
12064
12065 fi
12066 echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5
12067 echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6
12068
12069 if test x"$lt_prog_compiler_static_works_CXX" = xyes; then
12070 :
12071 else
12072 lt_prog_compiler_static_CXX=
12073 fi
12074
12075
12076 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
12077 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
12078 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
12079 echo $ECHO_N "(cached) $ECHO_C" >&6
12080 else
12081 lt_cv_prog_compiler_c_o_CXX=no
12082 $rm -r conftest 2>/dev/null
12083 mkdir conftest
12084 cd conftest
12085 mkdir out
12086 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
12087
12088 lt_compiler_flag="-o out/conftest2.$ac_objext"
12089 # Insert the option either (1) after the last *FLAGS variable, or
12090 # (2) before a word containing "conftest.", or (3) at the end.
12091 # Note that $ac_compile itself does not contain backslashes and begins
12092 # with a dollar sign (not a hyphen), so the echo should work correctly.
12093 lt_compile=`echo "$ac_compile" | $SED \
12094 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12095 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12096 -e 's:$: $lt_compiler_flag:'`
12097 (eval echo "\"\$as_me:12098: $lt_compile\"" >&5)
12098 (eval "$lt_compile" 2>out/conftest.err)
12099 ac_status=$?
12100 cat out/conftest.err >&5
12101 echo "$as_me:12102: \$? = $ac_status" >&5
12102 if (exit $ac_status) && test -s out/conftest2.$ac_objext
12103 then
12104 # The compiler can only warn and ignore the option if not recognized
12105 # So say no if there are warnings
12106 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
12107 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12108 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12109 lt_cv_prog_compiler_c_o_CXX=yes
12110 fi
12111 fi
12112 chmod u+w . 2>&5
12113 $rm conftest*
12114 # SGI C++ compiler will create directory out/ii_files/ for
12115 # template instantiation
12116 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
12117 $rm out/* && rmdir out
12118 cd ..
12119 rmdir conftest
12120 $rm conftest*
12121
12122 fi
12123 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
12124 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
12125
12126
12127 hard_links="nottested"
12128 if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
12129 # do not overwrite the value of need_locks provided by the user
12130 echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
12131 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
12132 hard_links=yes
12133 $rm conftest*
12134 ln conftest.a conftest.b 2>/dev/null && hard_links=no
12135 touch conftest.a
12136 ln conftest.a conftest.b 2>&5 || hard_links=no
12137 ln conftest.a conftest.b 2>/dev/null && hard_links=no
12138 echo "$as_me:$LINENO: result: $hard_links" >&5
12139 echo "${ECHO_T}$hard_links" >&6
12140 if test "$hard_links" = no; then
12141 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
12142 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
12143 need_locks=warn
12144 fi
12145 else
12146 need_locks=no
12147 fi
12148
12149 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
12150 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
12151
12152 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
12153 case $host_os in
12154 aix4* | aix5*)
12155 # If we're using GNU nm, then we don't want the "-C" option.
12156 # -C means demangle to AIX nm, but means don't demangle with GNU nm
12157 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
12158 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
12159 else
12160 export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
12161 fi
12162 ;;
12163 pw32*)
12164 export_symbols_cmds_CXX="$ltdll_cmds"
12165 ;;
12166 cygwin* | mingw*)
12167 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
12168 ;;
12169 kfreebsd*-gnu)
12170 link_all_deplibs_CXX=no
12171 ;;
12172 linux*)
12173 link_all_deplibs_CXX=no
12174 ;;
12175 *)
12176 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
12177 ;;
12178 esac
12179
12180 echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
12181 echo "${ECHO_T}$ld_shlibs_CXX" >&6
12182 test "$ld_shlibs_CXX" = no && can_build_shared=no
12183
12184 #
12185 # Do we need to explicitly link libc?
12186 #
12187 case "x$archive_cmds_need_lc_CXX" in
12188 x|xyes)
12189 # Assume -lc should be added
12190 archive_cmds_need_lc_CXX=yes
12191
12192 if test "$enable_shared" = yes && test "$GCC" = yes; then
12193 case $archive_cmds_CXX in
12194 *'~'*)
12195 # FIXME: we may have to deal with multi-command sequences.
12196 ;;
12197 '$CC '*)
12198 # Test whether the compiler implicitly links with -lc since on some
12199 # systems, -lgcc has to come before -lc. If gcc already passes -lc
12200 # to ld, don't add -lc before -lgcc.
12201 echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
12202 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
12203 $rm conftest*
12204 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
12205
12206 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12207 (eval $ac_compile) 2>&5
12208 ac_status=$?
12209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12210 (exit $ac_status); } 2>conftest.err; then
12211 soname=conftest
12212 lib=conftest
12213 libobjs=conftest.$ac_objext
12214 deplibs=
12215 wl=$lt_prog_compiler_wl_CXX
12216 pic_flag=$lt_prog_compiler_pic_CXX
12217 compiler_flags=-v
12218 linker_flags=-v
12219 verstring=
12220 output_objdir=.
12221 libname=conftest
12222 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
12223 allow_undefined_flag_CXX=
12224 if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
12225 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
12226 ac_status=$?
12227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12228 (exit $ac_status); }
12229 then
12230 archive_cmds_need_lc_CXX=no
12231 else
12232 archive_cmds_need_lc_CXX=yes
12233 fi
12234 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
12235 else
12236 cat conftest.err 1>&5
12237 fi
12238 $rm conftest*
12239 echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
12240 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6
12241 ;;
12242 esac
12243 fi
12244 ;;
12245 esac
12246
12247 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
12248 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
12249 library_names_spec=
12250 libname_spec='lib$name'
12251 soname_spec=
12252 shrext_cmds=".so"
12253 postinstall_cmds=
12254 postuninstall_cmds=
12255 finish_cmds=
12256 finish_eval=
12257 shlibpath_var=
12258 shlibpath_overrides_runpath=unknown
12259 version_type=none
12260 dynamic_linker="$host_os ld.so"
12261 sys_lib_dlsearch_path_spec="/lib /usr/lib"
12262 if test "$GCC" = yes; then
12263 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
12264 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
12265 # if the path contains ";" then we assume it to be the separator
12266 # otherwise default to the standard path separator (i.e. ":") - it is
12267 # assumed that no part of a normal pathname contains ";" but that should
12268 # okay in the real world where ";" in dirpaths is itself problematic.
12269 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
12270 else
12271 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12272 fi
12273 else
12274 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12275 fi
12276 need_lib_prefix=unknown
12277 hardcode_into_libs=no
12278
12279 # when you set need_version to no, make sure it does not cause -set_version
12280 # flags to be left without arguments
12281 need_version=unknown
12282
12283 case $host_os in
12284 aix3*)
12285 version_type=linux
12286 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
12287 shlibpath_var=LIBPATH
12288
12289 # AIX 3 has no versioning support, so we append a major version to the name.
12290 soname_spec='${libname}${release}${shared_ext}$major'
12291 ;;
12292
12293 aix4* | aix5*)
12294 version_type=linux
12295 need_lib_prefix=no
12296 need_version=no
12297 hardcode_into_libs=yes
12298 if test "$host_cpu" = ia64; then
12299 # AIX 5 supports IA64
12300 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
12301 shlibpath_var=LD_LIBRARY_PATH
12302 else
12303 # With GCC up to 2.95.x, collect2 would create an import file
12304 # for dependence libraries. The import file would start with
12305 # the line `#! .'. This would cause the generated library to
12306 # depend on `.', always an invalid library. This was fixed in
12307 # development snapshots of GCC prior to 3.0.
12308 case $host_os in
12309 aix4 | aix4.[01] | aix4.[01].*)
12310 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12311 echo ' yes '
12312 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
12313 :
12314 else
12315 can_build_shared=no
12316 fi
12317 ;;
12318 esac
12319 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
12320 # soname into executable. Probably we can add versioning support to
12321 # collect2, so additional links can be useful in future.
12322 if test "$aix_use_runtimelinking" = yes; then
12323 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
12324 # instead of lib<name>.a to let people know that these are not
12325 # typical AIX shared libraries.
12326 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12327 else
12328 # We preserve .a as extension for shared libraries through AIX4.2
12329 # and later when we are not doing run time linking.
12330 library_names_spec='${libname}${release}.a $libname.a'
12331 soname_spec='${libname}${release}${shared_ext}$major'
12332 fi
12333 shlibpath_var=LIBPATH
12334 fi
12335 ;;
12336
12337 amigaos*)
12338 library_names_spec='$libname.ixlibrary $libname.a'
12339 # Create ${libname}_ixlibrary.a entries in /sys/libs.
12340 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
12341 ;;
12342
12343 beos*)
12344 library_names_spec='${libname}${shared_ext}'
12345 dynamic_linker="$host_os ld.so"
12346 shlibpath_var=LIBRARY_PATH
12347 ;;
12348
12349 bsdi[45]*)
12350 version_type=linux
12351 need_version=no
12352 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12353 soname_spec='${libname}${release}${shared_ext}$major'
12354 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
12355 shlibpath_var=LD_LIBRARY_PATH
12356 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
12357 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
12358 # the default ld.so.conf also contains /usr/contrib/lib and
12359 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
12360 # libtool to hard-code these into programs
12361 ;;
12362
12363 cygwin* | mingw* | pw32*)
12364 version_type=windows
12365 shrext_cmds=".dll"
12366 need_version=no
12367 need_lib_prefix=no
12368
12369 case $GCC,$host_os in
12370 yes,cygwin* | yes,mingw* | yes,pw32*)
12371 library_names_spec='$libname.dll.a'
12372 # DLL is installed to $(libdir)/../bin by postinstall_cmds
12373 postinstall_cmds='base_file=`basename \${file}`~
12374 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
12375 dldir=$destdir/`dirname \$dlpath`~
12376 test -d \$dldir || mkdir -p \$dldir~
12377 $install_prog $dir/$dlname \$dldir/$dlname~
12378 chmod a+x \$dldir/$dlname'
12379 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12380 dlpath=$dir/\$dldll~
12381 $rm \$dlpath'
12382 shlibpath_overrides_runpath=yes
12383
12384 case $host_os in
12385 cygwin*)
12386 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
12387 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12388 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
12389 ;;
12390 mingw*)
12391 # MinGW DLLs use traditional 'lib' prefix
12392 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12393 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
12394 if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
12395 # It is most probably a Windows format PATH printed by
12396 # mingw gcc, but we are running on Cygwin. Gcc prints its search
12397 # path with ; separators, and with drive letters. We can handle the
12398 # drive letters (cygwin fileutils understands them), so leave them,
12399 # especially as we might pass files found there to a mingw objdump,
12400 # which wouldn't understand a cygwinified path. Ahh.
12401 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
12402 else
12403 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12404 fi
12405 ;;
12406 pw32*)
12407 # pw32 DLLs use 'pw' prefix rather than 'lib'
12408 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12409 ;;
12410 esac
12411 ;;
12412
12413 *)
12414 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
12415 ;;
12416 esac
12417 dynamic_linker='Win32 ld.exe'
12418 # FIXME: first we should search . and the directory the executable is in
12419 shlibpath_var=PATH
12420 ;;
12421
12422 darwin* | rhapsody*)
12423 dynamic_linker="$host_os dyld"
12424 version_type=darwin
12425 need_lib_prefix=no
12426 need_version=no
12427 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
12428 soname_spec='${libname}${release}${major}$shared_ext'
12429 shlibpath_overrides_runpath=yes
12430 shlibpath_var=DYLD_LIBRARY_PATH
12431 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
12432 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
12433 if test "$GCC" = yes; then
12434 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
12435 else
12436 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
12437 fi
12438 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
12439 ;;
12440
12441 dgux*)
12442 version_type=linux
12443 need_lib_prefix=no
12444 need_version=no
12445 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
12446 soname_spec='${libname}${release}${shared_ext}$major'
12447 shlibpath_var=LD_LIBRARY_PATH
12448 ;;
12449
12450 freebsd1*)
12451 dynamic_linker=no
12452 ;;
12453
12454 kfreebsd*-gnu)
12455 version_type=linux
12456 need_lib_prefix=no
12457 need_version=no
12458 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12459 soname_spec='${libname}${release}${shared_ext}$major'
12460 shlibpath_var=LD_LIBRARY_PATH
12461 shlibpath_overrides_runpath=no
12462 hardcode_into_libs=yes
12463 dynamic_linker='GNU ld.so'
12464 ;;
12465
12466 freebsd* | dragonfly*)
12467 # DragonFly does not have aout. When/if they implement a new
12468 # versioning mechanism, adjust this.
12469 if test -x /usr/bin/objformat; then
12470 objformat=`/usr/bin/objformat`
12471 else
12472 case $host_os in
12473 freebsd[123]*) objformat=aout ;;
12474 *) objformat=elf ;;
12475 esac
12476 fi
12477 version_type=freebsd-$objformat
12478 case $version_type in
12479 freebsd-elf*)
12480 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
12481 need_version=no
12482 need_lib_prefix=no
12483 ;;
12484 freebsd-*)
12485 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
12486 need_version=yes
12487 ;;
12488 esac
12489 shlibpath_var=LD_LIBRARY_PATH
12490 case $host_os in
12491 freebsd2*)
12492 shlibpath_overrides_runpath=yes
12493 ;;
12494 freebsd3.[01]* | freebsdelf3.[01]*)
12495 shlibpath_overrides_runpath=yes
12496 hardcode_into_libs=yes
12497 ;;
12498 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
12499 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
12500 shlibpath_overrides_runpath=no
12501 hardcode_into_libs=yes
12502 ;;
12503 freebsd*) # from 4.6 on
12504 shlibpath_overrides_runpath=yes
12505 hardcode_into_libs=yes
12506 ;;
12507 esac
12508 ;;
12509
12510 gnu*)
12511 version_type=linux
12512 need_lib_prefix=no
12513 need_version=no
12514 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
12515 soname_spec='${libname}${release}${shared_ext}$major'
12516 shlibpath_var=LD_LIBRARY_PATH
12517 hardcode_into_libs=yes
12518 ;;
12519
12520 hpux9* | hpux10* | hpux11*)
12521 # Give a soname corresponding to the major version so that dld.sl refuses to
12522 # link against other versions.
12523 version_type=sunos
12524 need_lib_prefix=no
12525 need_version=no
12526 case $host_cpu in
12527 ia64*)
12528 shrext_cmds='.so'
12529 hardcode_into_libs=yes
12530 dynamic_linker="$host_os dld.so"
12531 shlibpath_var=LD_LIBRARY_PATH
12532 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12533 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12534 soname_spec='${libname}${release}${shared_ext}$major'
12535 if test "X$HPUX_IA64_MODE" = X32; then
12536 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
12537 else
12538 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
12539 fi
12540 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12541 ;;
12542 hppa*64*)
12543 shrext_cmds='.sl'
12544 hardcode_into_libs=yes
12545 dynamic_linker="$host_os dld.sl"
12546 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
12547 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12548 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12549 soname_spec='${libname}${release}${shared_ext}$major'
12550 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
12551 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12552 ;;
12553 *)
12554 shrext_cmds='.sl'
12555 dynamic_linker="$host_os dld.sl"
12556 shlibpath_var=SHLIB_PATH
12557 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
12558 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12559 soname_spec='${libname}${release}${shared_ext}$major'
12560 ;;
12561 esac
12562 # HP-UX runs *really* slowly unless shared libraries are mode 555.
12563 postinstall_cmds='chmod 555 $lib'
12564 ;;
12565
12566 interix3*)
12567 version_type=linux
12568 need_lib_prefix=no
12569 need_version=no
12570 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12571 soname_spec='${libname}${release}${shared_ext}$major'
12572 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
12573 shlibpath_var=LD_LIBRARY_PATH
12574 shlibpath_overrides_runpath=no
12575 hardcode_into_libs=yes
12576 ;;
12577
12578 irix5* | irix6* | nonstopux*)
12579 case $host_os in
12580 nonstopux*) version_type=nonstopux ;;
12581 *)
12582 if test "$lt_cv_prog_gnu_ld" = yes; then
12583 version_type=linux
12584 else
12585 version_type=irix
12586 fi ;;
12587 esac
12588 need_lib_prefix=no
12589 need_version=no
12590 soname_spec='${libname}${release}${shared_ext}$major'
12591 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
12592 case $host_os in
12593 irix5* | nonstopux*)
12594 libsuff= shlibsuff=
12595 ;;
12596 *)
12597 case $LD in # libtool.m4 will add one of these switches to LD
12598 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
12599 libsuff= shlibsuff= libmagic=32-bit;;
12600 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
12601 libsuff=32 shlibsuff=N32 libmagic=N32;;
12602 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
12603 libsuff=64 shlibsuff=64 libmagic=64-bit;;
12604 *) libsuff= shlibsuff= libmagic=never-match;;
12605 esac
12606 ;;
12607 esac
12608 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
12609 shlibpath_overrides_runpath=no
12610 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
12611 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
12612 hardcode_into_libs=yes
12613 ;;
12614
12615 # No shared lib support for Linux oldld, aout, or coff.
12616 linux*oldld* | linux*aout* | linux*coff*)
12617 dynamic_linker=no
12618 ;;
12619
12620 # This must be Linux ELF.
12621 linux*)
12622 version_type=linux
12623 need_lib_prefix=no
12624 need_version=no
12625 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12626 soname_spec='${libname}${release}${shared_ext}$major'
12627 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
12628 shlibpath_var=LD_LIBRARY_PATH
12629 shlibpath_overrides_runpath=no
12630 # This implies no fast_install, which is unacceptable.
12631 # Some rework will be needed to allow for fast_install
12632 # before this can be enabled.
12633 hardcode_into_libs=yes
12634
12635 # Append ld.so.conf contents to the search path
12636 if test -f /etc/ld.so.conf; then
12637 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
12638 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
12639 fi
12640
12641 # We used to test for /lib/ld.so.1 and disable shared libraries on
12642 # powerpc, because MkLinux only supported shared libraries with the
12643 # GNU dynamic linker. Since this was broken with cross compilers,
12644 # most powerpc-linux boxes support dynamic linking these days and
12645 # people can always --disable-shared, the test was removed, and we
12646 # assume the GNU/Linux dynamic linker is in use.
12647 dynamic_linker='GNU/Linux ld.so'
12648 ;;
12649
12650 netbsdelf*-gnu)
12651 version_type=linux
12652 need_lib_prefix=no
12653 need_version=no
12654 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12655 soname_spec='${libname}${release}${shared_ext}$major'
12656 shlibpath_var=LD_LIBRARY_PATH
12657 shlibpath_overrides_runpath=no
12658 hardcode_into_libs=yes
12659 dynamic_linker='NetBSD ld.elf_so'
12660 ;;
12661
12662 knetbsd*-gnu)
12663 version_type=linux
12664 need_lib_prefix=no
12665 need_version=no
12666 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12667 soname_spec='${libname}${release}${shared_ext}$major'
12668 shlibpath_var=LD_LIBRARY_PATH
12669 shlibpath_overrides_runpath=no
12670 hardcode_into_libs=yes
12671 dynamic_linker='GNU ld.so'
12672 ;;
12673
12674 netbsd*)
12675 version_type=sunos
12676 need_lib_prefix=no
12677 need_version=no
12678 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
12679 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
12680 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12681 dynamic_linker='NetBSD (a.out) ld.so'
12682 else
12683 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12684 soname_spec='${libname}${release}${shared_ext}$major'
12685 dynamic_linker='NetBSD ld.elf_so'
12686 fi
12687 shlibpath_var=LD_LIBRARY_PATH
12688 shlibpath_overrides_runpath=yes
12689 hardcode_into_libs=yes
12690 ;;
12691
12692 newsos6)
12693 version_type=linux
12694 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12695 shlibpath_var=LD_LIBRARY_PATH
12696 shlibpath_overrides_runpath=yes
12697 ;;
12698
12699 nto-qnx*)
12700 version_type=linux
12701 need_lib_prefix=no
12702 need_version=no
12703 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12704 soname_spec='${libname}${release}${shared_ext}$major'
12705 shlibpath_var=LD_LIBRARY_PATH
12706 shlibpath_overrides_runpath=yes
12707 ;;
12708
12709 openbsd*)
12710 version_type=sunos
12711 sys_lib_dlsearch_path_spec="/usr/lib"
12712 need_lib_prefix=no
12713 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
12714 case $host_os in
12715 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
12716 *) need_version=no ;;
12717 esac
12718 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
12719 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12720 shlibpath_var=LD_LIBRARY_PATH
12721 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
12722 case $host_os in
12723 openbsd2.[89] | openbsd2.[89].*)
12724 shlibpath_overrides_runpath=no
12725 ;;
12726 *)
12727 shlibpath_overrides_runpath=yes
12728 ;;
12729 esac
12730 else
12731 shlibpath_overrides_runpath=yes
12732 fi
12733 ;;
12734
12735 os2*)
12736 libname_spec='$name'
12737 shrext_cmds=".dll"
12738 need_lib_prefix=no
12739 library_names_spec='$libname${shared_ext} $libname.a'
12740 dynamic_linker='OS/2 ld.exe'
12741 shlibpath_var=LIBPATH
12742 ;;
12743
12744 osf3* | osf4* | osf5*)
12745 version_type=osf
12746 need_lib_prefix=no
12747 need_version=no
12748 soname_spec='${libname}${release}${shared_ext}$major'
12749 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12750 shlibpath_var=LD_LIBRARY_PATH
12751 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
12752 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
12753 ;;
12754
12755 solaris*)
12756 version_type=linux
12757 need_lib_prefix=no
12758 need_version=no
12759 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12760 soname_spec='${libname}${release}${shared_ext}$major'
12761 shlibpath_var=LD_LIBRARY_PATH
12762 shlibpath_overrides_runpath=yes
12763 hardcode_into_libs=yes
12764 # ldd complains unless libraries are executable
12765 postinstall_cmds='chmod +x $lib'
12766 ;;
12767
12768 sunos4*)
12769 version_type=sunos
12770 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
12771 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
12772 shlibpath_var=LD_LIBRARY_PATH
12773 shlibpath_overrides_runpath=yes
12774 if test "$with_gnu_ld" = yes; then
12775 need_lib_prefix=no
12776 fi
12777 need_version=yes
12778 ;;
12779
12780 sysv4 | sysv4.3*)
12781 version_type=linux
12782 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12783 soname_spec='${libname}${release}${shared_ext}$major'
12784 shlibpath_var=LD_LIBRARY_PATH
12785 case $host_vendor in
12786 sni)
12787 shlibpath_overrides_runpath=no
12788 need_lib_prefix=no
12789 export_dynamic_flag_spec='${wl}-Blargedynsym'
12790 runpath_var=LD_RUN_PATH
12791 ;;
12792 siemens)
12793 need_lib_prefix=no
12794 ;;
12795 motorola)
12796 need_lib_prefix=no
12797 need_version=no
12798 shlibpath_overrides_runpath=no
12799 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
12800 ;;
12801 esac
12802 ;;
12803
12804 sysv4*MP*)
12805 if test -d /usr/nec ;then
12806 version_type=linux
12807 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
12808 soname_spec='$libname${shared_ext}.$major'
12809 shlibpath_var=LD_LIBRARY_PATH
12810 fi
12811 ;;
12812
12813 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
12814 version_type=freebsd-elf
12815 need_lib_prefix=no
12816 need_version=no
12817 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
12818 soname_spec='${libname}${release}${shared_ext}$major'
12819 shlibpath_var=LD_LIBRARY_PATH
12820 hardcode_into_libs=yes
12821 if test "$with_gnu_ld" = yes; then
12822 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
12823 shlibpath_overrides_runpath=no
12824 else
12825 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
12826 shlibpath_overrides_runpath=yes
12827 case $host_os in
12828 sco3.2v5*)
12829 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
12830 ;;
12831 esac
12832 fi
12833 sys_lib_dlsearch_path_spec='/usr/lib'
12834 ;;
12835
12836 uts4*)
12837 version_type=linux
12838 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12839 soname_spec='${libname}${release}${shared_ext}$major'
12840 shlibpath_var=LD_LIBRARY_PATH
12841 ;;
12842
12843 *)
12844 dynamic_linker=no
12845 ;;
12846 esac
12847 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
12848 echo "${ECHO_T}$dynamic_linker" >&6
12849 test "$dynamic_linker" = no && can_build_shared=no
12850
12851 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
12852 if test "$GCC" = yes; then
12853 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
12854 fi
12855
12856 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
12857 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
12858 hardcode_action_CXX=
12859 if test -n "$hardcode_libdir_flag_spec_CXX" || \
12860 test -n "$runpath_var_CXX" || \
12861 test "X$hardcode_automatic_CXX" = "Xyes" ; then
12862
12863 # We can hardcode non-existant directories.
12864 if test "$hardcode_direct_CXX" != no &&
12865 # If the only mechanism to avoid hardcoding is shlibpath_var, we
12866 # have to relink, otherwise we might link with an installed library
12867 # when we should be linking with a yet-to-be-installed one
12868 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
12869 test "$hardcode_minus_L_CXX" != no; then
12870 # Linking always hardcodes the temporary library directory.
12871 hardcode_action_CXX=relink
12872 else
12873 # We can link without hardcoding, and we can hardcode nonexisting dirs.
12874 hardcode_action_CXX=immediate
12875 fi
12876 else
12877 # We cannot hardcode anything, or else we can only hardcode existing
12878 # directories.
12879 hardcode_action_CXX=unsupported
12880 fi
12881 echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
12882 echo "${ECHO_T}$hardcode_action_CXX" >&6
12883
12884 if test "$hardcode_action_CXX" = relink; then
12885 # Fast installation is not supported
12886 enable_fast_install=no
12887 elif test "$shlibpath_overrides_runpath" = yes ||
12888 test "$enable_shared" = no; then
12889 # Fast installation is not necessary
12890 enable_fast_install=needless
12891 fi
12892
12893
12894 # The else clause should only fire when bootstrapping the
12895 # libtool distribution, otherwise you forgot to ship ltmain.sh
12896 # with your package, and you will get complaints that there are
12897 # no rules to generate ltmain.sh.
12898 if test -f "$ltmain"; then
12899 # See if we are running on zsh, and set the options which allow our commands through
12900 # without removal of \ escapes.
12901 if test -n "${ZSH_VERSION+set}" ; then
12902 setopt NO_GLOB_SUBST
12903 fi
12904 # Now quote all the things that may contain metacharacters while being
12905 # careful not to overquote the AC_SUBSTed values. We take copies of the
12906 # variables and quote the copies for generation of the libtool script.
12907 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
12908 SED SHELL STRIP \
12909 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
12910 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
12911 deplibs_check_method reload_flag reload_cmds need_locks \
12912 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
12913 lt_cv_sys_global_symbol_to_c_name_address \
12914 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
12915 old_postinstall_cmds old_postuninstall_cmds \
12916 compiler_CXX \
12917 CC_CXX \
12918 LD_CXX \
12919 lt_prog_compiler_wl_CXX \
12920 lt_prog_compiler_pic_CXX \
12921 lt_prog_compiler_static_CXX \
12922 lt_prog_compiler_no_builtin_flag_CXX \
12923 export_dynamic_flag_spec_CXX \
12924 thread_safe_flag_spec_CXX \
12925 whole_archive_flag_spec_CXX \
12926 enable_shared_with_static_runtimes_CXX \
12927 old_archive_cmds_CXX \
12928 old_archive_from_new_cmds_CXX \
12929 predep_objects_CXX \
12930 postdep_objects_CXX \
12931 predeps_CXX \
12932 postdeps_CXX \
12933 compiler_lib_search_path_CXX \
12934 archive_cmds_CXX \
12935 archive_expsym_cmds_CXX \
12936 postinstall_cmds_CXX \
12937 postuninstall_cmds_CXX \
12938 old_archive_from_expsyms_cmds_CXX \
12939 allow_undefined_flag_CXX \
12940 no_undefined_flag_CXX \
12941 export_symbols_cmds_CXX \
12942 hardcode_libdir_flag_spec_CXX \
12943 hardcode_libdir_flag_spec_ld_CXX \
12944 hardcode_libdir_separator_CXX \
12945 hardcode_automatic_CXX \
12946 module_cmds_CXX \
12947 module_expsym_cmds_CXX \
12948 lt_cv_prog_compiler_c_o_CXX \
12949 exclude_expsyms_CXX \
12950 include_expsyms_CXX; do
12951
12952 case $var in
12953 old_archive_cmds_CXX | \
12954 old_archive_from_new_cmds_CXX | \
12955 archive_cmds_CXX | \
12956 archive_expsym_cmds_CXX | \
12957 module_cmds_CXX | \
12958 module_expsym_cmds_CXX | \
12959 old_archive_from_expsyms_cmds_CXX | \
12960 export_symbols_cmds_CXX | \
12961 extract_expsyms_cmds | reload_cmds | finish_cmds | \
12962 postinstall_cmds | postuninstall_cmds | \
12963 old_postinstall_cmds | old_postuninstall_cmds | \
12964 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
12965 # Double-quote double-evaled strings.
12966 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
12967 ;;
12968 *)
12969 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
12970 ;;
12971 esac
12972 done
12973
12974 case $lt_echo in
12975 *'\$0 --fallback-echo"')
12976 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
12977 ;;
12978 esac
12979
12980 cfgfile="$ofile"
12981
12982 cat <<__EOF__ >> "$cfgfile"
12983 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
12984
12985 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12986
12987 # Shell to use when invoking shell scripts.
12988 SHELL=$lt_SHELL
12989
12990 # Whether or not to build shared libraries.
12991 build_libtool_libs=$enable_shared
12992
12993 # Whether or not to build static libraries.
12994 build_old_libs=$enable_static
12995
12996 # Whether or not to add -lc for building shared libraries.
12997 build_libtool_need_lc=$archive_cmds_need_lc_CXX
12998
12999 # Whether or not to disallow shared libs when runtime libs are static
13000 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
13001
13002 # Whether or not to optimize for fast installation.
13003 fast_install=$enable_fast_install
13004
13005 # The host system.
13006 host_alias=$host_alias
13007 host=$host
13008 host_os=$host_os
13009
13010 # The build system.
13011 build_alias=$build_alias
13012 build=$build
13013 build_os=$build_os
13014
13015 # An echo program that does not interpret backslashes.
13016 echo=$lt_echo
13017
13018 # The archiver.
13019 AR=$lt_AR
13020 AR_FLAGS=$lt_AR_FLAGS
13021
13022 # A C compiler.
13023 LTCC=$lt_LTCC
13024
13025 # LTCC compiler flags.
13026 LTCFLAGS=$lt_LTCFLAGS
13027
13028 # A language-specific compiler.
13029 CC=$lt_compiler_CXX
13030
13031 # Is the compiler the GNU C compiler?
13032 with_gcc=$GCC_CXX
13033
13034 # An ERE matcher.
13035 EGREP=$lt_EGREP
13036
13037 # The linker used to build libraries.
13038 LD=$lt_LD_CXX
13039
13040 # Whether we need hard or soft links.
13041 LN_S=$lt_LN_S
13042
13043 # A BSD-compatible nm program.
13044 NM=$lt_NM
13045
13046 # A symbol stripping program
13047 STRIP=$lt_STRIP
13048
13049 # Used to examine libraries when file_magic_cmd begins "file"
13050 MAGIC_CMD=$MAGIC_CMD
13051
13052 # Used on cygwin: DLL creation program.
13053 DLLTOOL="$DLLTOOL"
13054
13055 # Used on cygwin: object dumper.
13056 OBJDUMP="$OBJDUMP"
13057
13058 # Used on cygwin: assembler.
13059 AS="$AS"
13060
13061 # The name of the directory that contains temporary libtool files.
13062 objdir=$objdir
13063
13064 # How to create reloadable object files.
13065 reload_flag=$lt_reload_flag
13066 reload_cmds=$lt_reload_cmds
13067
13068 # How to pass a linker flag through the compiler.
13069 wl=$lt_lt_prog_compiler_wl_CXX
13070
13071 # Object file suffix (normally "o").
13072 objext="$ac_objext"
13073
13074 # Old archive suffix (normally "a").
13075 libext="$libext"
13076
13077 # Shared library suffix (normally ".so").
13078 shrext_cmds='$shrext_cmds'
13079
13080 # Executable file suffix (normally "").
13081 exeext="$exeext"
13082
13083 # Additional compiler flags for building library objects.
13084 pic_flag=$lt_lt_prog_compiler_pic_CXX
13085 pic_mode=$pic_mode
13086
13087 # What is the maximum length of a command?
13088 max_cmd_len=$lt_cv_sys_max_cmd_len
13089
13090 # Does compiler simultaneously support -c and -o options?
13091 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
13092
13093 # Must we lock files when doing compilation?
13094 need_locks=$lt_need_locks
13095
13096 # Do we need the lib prefix for modules?
13097 need_lib_prefix=$need_lib_prefix
13098
13099 # Do we need a version for libraries?
13100 need_version=$need_version
13101
13102 # Whether dlopen is supported.
13103 dlopen_support=$enable_dlopen
13104
13105 # Whether dlopen of programs is supported.
13106 dlopen_self=$enable_dlopen_self
13107
13108 # Whether dlopen of statically linked programs is supported.
13109 dlopen_self_static=$enable_dlopen_self_static
13110
13111 # Compiler flag to prevent dynamic linking.
13112 link_static_flag=$lt_lt_prog_compiler_static_CXX
13113
13114 # Compiler flag to turn off builtin functions.
13115 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
13116
13117 # Compiler flag to allow reflexive dlopens.
13118 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
13119
13120 # Compiler flag to generate shared objects directly from archives.
13121 whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
13122
13123 # Compiler flag to generate thread-safe objects.
13124 thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
13125
13126 # Library versioning type.
13127 version_type=$version_type
13128
13129 # Format of library name prefix.
13130 libname_spec=$lt_libname_spec
13131
13132 # List of archive names. First name is the real one, the rest are links.
13133 # The last name is the one that the linker finds with -lNAME.
13134 library_names_spec=$lt_library_names_spec
13135
13136 # The coded name of the library, if different from the real name.
13137 soname_spec=$lt_soname_spec
13138
13139 # Commands used to build and install an old-style archive.
13140 RANLIB=$lt_RANLIB
13141 old_archive_cmds=$lt_old_archive_cmds_CXX
13142 old_postinstall_cmds=$lt_old_postinstall_cmds
13143 old_postuninstall_cmds=$lt_old_postuninstall_cmds
13144
13145 # Create an old-style archive from a shared archive.
13146 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
13147
13148 # Create a temporary old-style archive to link instead of a shared archive.
13149 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
13150
13151 # Commands used to build and install a shared archive.
13152 archive_cmds=$lt_archive_cmds_CXX
13153 archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
13154 postinstall_cmds=$lt_postinstall_cmds
13155 postuninstall_cmds=$lt_postuninstall_cmds
13156
13157 # Commands used to build a loadable module (assumed same as above if empty)
13158 module_cmds=$lt_module_cmds_CXX
13159 module_expsym_cmds=$lt_module_expsym_cmds_CXX
13160
13161 # Commands to strip libraries.
13162 old_striplib=$lt_old_striplib
13163 striplib=$lt_striplib
13164
13165 # Dependencies to place before the objects being linked to create a
13166 # shared library.
13167 predep_objects=$lt_predep_objects_CXX
13168
13169 # Dependencies to place after the objects being linked to create a
13170 # shared library.
13171 postdep_objects=$lt_postdep_objects_CXX
13172
13173 # Dependencies to place before the objects being linked to create a
13174 # shared library.
13175 predeps=$lt_predeps_CXX
13176
13177 # Dependencies to place after the objects being linked to create a
13178 # shared library.
13179 postdeps=$lt_postdeps_CXX
13180
13181 # The library search path used internally by the compiler when linking
13182 # a shared library.
13183 compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
13184
13185 # Method to check whether dependent libraries are shared objects.
13186 deplibs_check_method=$lt_deplibs_check_method
13187
13188 # Command to use when deplibs_check_method == file_magic.
13189 file_magic_cmd=$lt_file_magic_cmd
13190
13191 # Flag that allows shared libraries with undefined symbols to be built.
13192 allow_undefined_flag=$lt_allow_undefined_flag_CXX
13193
13194 # Flag that forces no undefined symbols.
13195 no_undefined_flag=$lt_no_undefined_flag_CXX
13196
13197 # Commands used to finish a libtool library installation in a directory.
13198 finish_cmds=$lt_finish_cmds
13199
13200 # Same as above, but a single script fragment to be evaled but not shown.
13201 finish_eval=$lt_finish_eval
13202
13203 # Take the output of nm and produce a listing of raw symbols and C names.
13204 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
13205
13206 # Transform the output of nm in a proper C declaration
13207 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
13208
13209 # Transform the output of nm in a C name address pair
13210 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
13211
13212 # This is the shared library runtime path variable.
13213 runpath_var=$runpath_var
13214
13215 # This is the shared library path variable.
13216 shlibpath_var=$shlibpath_var
13217
13218 # Is shlibpath searched before the hard-coded library search path?
13219 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
13220
13221 # How to hardcode a shared library path into an executable.
13222 hardcode_action=$hardcode_action_CXX
13223
13224 # Whether we should hardcode library paths into libraries.
13225 hardcode_into_libs=$hardcode_into_libs
13226
13227 # Flag to hardcode \$libdir into a binary during linking.
13228 # This must work even if \$libdir does not exist.
13229 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
13230
13231 # If ld is used when linking, flag to hardcode \$libdir into
13232 # a binary during linking. This must work even if \$libdir does
13233 # not exist.
13234 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
13235
13236 # Whether we need a single -rpath flag with a separated argument.
13237 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
13238
13239 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
13240 # resulting binary.
13241 hardcode_direct=$hardcode_direct_CXX
13242
13243 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
13244 # resulting binary.
13245 hardcode_minus_L=$hardcode_minus_L_CXX
13246
13247 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
13248 # the resulting binary.
13249 hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
13250
13251 # Set to yes if building a shared library automatically hardcodes DIR into the library
13252 # and all subsequent libraries and executables linked against it.
13253 hardcode_automatic=$hardcode_automatic_CXX
13254
13255 # Variables whose values should be saved in libtool wrapper scripts and
13256 # restored at relink time.
13257 variables_saved_for_relink="$variables_saved_for_relink"
13258
13259 # Whether libtool must link a program against all its dependency libraries.
13260 link_all_deplibs=$link_all_deplibs_CXX
13261
13262 # Compile-time system search path for libraries
13263 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
13264
13265 # Run-time system search path for libraries
13266 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
13267
13268 # Fix the shell variable \$srcfile for the compiler.
13269 fix_srcfile_path="$fix_srcfile_path_CXX"
13270
13271 # Set to yes if exported symbols are required.
13272 always_export_symbols=$always_export_symbols_CXX
13273
13274 # The commands to list exported symbols.
13275 export_symbols_cmds=$lt_export_symbols_cmds_CXX
13276
13277 # The commands to extract the exported symbol list from a shared archive.
13278 extract_expsyms_cmds=$lt_extract_expsyms_cmds
13279
13280 # Symbols that should not be listed in the preloaded symbols.
13281 exclude_expsyms=$lt_exclude_expsyms_CXX
13282
13283 # Symbols that must always be exported.
13284 include_expsyms=$lt_include_expsyms_CXX
13285
13286 # ### END LIBTOOL TAG CONFIG: $tagname
13287
13288 __EOF__
13289
13290
13291 else
13292 # If there is no Makefile yet, we rely on a make rule to execute
13293 # `config.status --recheck' to rerun these tests and create the
13294 # libtool script then.
13295 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
13296 if test -f "$ltmain_in"; then
13297 test -f Makefile && make "$ltmain"
13298 fi
13299 fi
13300
13301
13302 ac_ext=c
13303 ac_cpp='$CPP $CPPFLAGS'
13304 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13305 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13306 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13307
13308 CC=$lt_save_CC
13309 LDCXX=$LD
13310 LD=$lt_save_LD
13311 GCC=$lt_save_GCC
13312 with_gnu_ldcxx=$with_gnu_ld
13313 with_gnu_ld=$lt_save_with_gnu_ld
13314 lt_cv_path_LDCXX=$lt_cv_path_LD
13315 lt_cv_path_LD=$lt_save_path_LD
13316 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
13317 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
13318
13319 else
13320 tagname=""
13321 fi
13322 ;;
13323
13324 F77)
13325 if test -n "$F77" && test "X$F77" != "Xno"; then
13326
13327 ac_ext=f
13328 ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
13329 ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13330 ac_compiler_gnu=$ac_cv_f77_compiler_gnu
13331
13332
13333 archive_cmds_need_lc_F77=no
13334 allow_undefined_flag_F77=
13335 always_export_symbols_F77=no
13336 archive_expsym_cmds_F77=
13337 export_dynamic_flag_spec_F77=
13338 hardcode_direct_F77=no
13339 hardcode_libdir_flag_spec_F77=
13340 hardcode_libdir_flag_spec_ld_F77=
13341 hardcode_libdir_separator_F77=
13342 hardcode_minus_L_F77=no
13343 hardcode_automatic_F77=no
13344 module_cmds_F77=
13345 module_expsym_cmds_F77=
13346 link_all_deplibs_F77=unknown
13347 old_archive_cmds_F77=$old_archive_cmds
13348 no_undefined_flag_F77=
13349 whole_archive_flag_spec_F77=
13350 enable_shared_with_static_runtimes_F77=no
13351
13352 # Source file extension for f77 test sources.
13353 ac_ext=f
13354
13355 # Object file extension for compiled f77 test sources.
13356 objext=o
13357 objext_F77=$objext
13358
13359 # Code to be used in simple compile tests
13360 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
13361
13362 # Code to be used in simple link tests
13363 lt_simple_link_test_code=" program t\n end\n"
13364
13365 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
13366
13367 # If no C compiler was specified, use CC.
13368 LTCC=${LTCC-"$CC"}
13369
13370 # If no C compiler flags were specified, use CFLAGS.
13371 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
13372
13373 # Allow CC to be a program name with arguments.
13374 compiler=$CC
13375
13376
13377 # save warnings/boilerplate of simple test code
13378 ac_outfile=conftest.$ac_objext
13379 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
13380 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
13381 _lt_compiler_boilerplate=`cat conftest.err`
13382 $rm conftest*
13383
13384 ac_outfile=conftest.$ac_objext
13385 printf "$lt_simple_link_test_code" >conftest.$ac_ext
13386 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
13387 _lt_linker_boilerplate=`cat conftest.err`
13388 $rm conftest*
13389
13390
13391 # Allow CC to be a program name with arguments.
13392 lt_save_CC="$CC"
13393 CC=${F77-"f77"}
13394 compiler=$CC
13395 compiler_F77=$CC
13396 for cc_temp in $compiler""; do
13397 case $cc_temp in
13398 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
13399 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
13400 \-*) ;;
13401 *) break;;
13402 esac
13403 done
13404 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
13405
13406
13407 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
13408 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
13409 echo "$as_me:$LINENO: result: $can_build_shared" >&5
13410 echo "${ECHO_T}$can_build_shared" >&6
13411
13412 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
13413 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
13414 test "$can_build_shared" = "no" && enable_shared=no
13415
13416 # On AIX, shared libraries and static libraries use the same namespace, and
13417 # are all built from PIC.
13418 case $host_os in
13419 aix3*)
13420 test "$enable_shared" = yes && enable_static=no
13421 if test -n "$RANLIB"; then
13422 archive_cmds="$archive_cmds~\$RANLIB \$lib"
13423 postinstall_cmds='$RANLIB $lib'
13424 fi
13425 ;;
13426 aix4* | aix5*)
13427 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
13428 test "$enable_shared" = yes && enable_static=no
13429 fi
13430 ;;
13431 esac
13432 echo "$as_me:$LINENO: result: $enable_shared" >&5
13433 echo "${ECHO_T}$enable_shared" >&6
13434
13435 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
13436 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
13437 # Make sure either enable_shared or enable_static is yes.
13438 test "$enable_shared" = yes || enable_static=yes
13439 echo "$as_me:$LINENO: result: $enable_static" >&5
13440 echo "${ECHO_T}$enable_static" >&6
13441
13442 GCC_F77="$G77"
13443 LD_F77="$LD"
13444
13445 lt_prog_compiler_wl_F77=
13446 lt_prog_compiler_pic_F77=
13447 lt_prog_compiler_static_F77=
13448
13449 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
13450 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
13451
13452 if test "$GCC" = yes; then
13453 lt_prog_compiler_wl_F77='-Wl,'
13454 lt_prog_compiler_static_F77='-static'
13455
13456 case $host_os in
13457 aix*)
13458 # All AIX code is PIC.
13459 if test "$host_cpu" = ia64; then
13460 # AIX 5 now supports IA64 processor
13461 lt_prog_compiler_static_F77='-Bstatic'
13462 fi
13463 ;;
13464
13465 amigaos*)
13466 # FIXME: we need at least 68020 code to build shared libraries, but
13467 # adding the `-m68020' flag to GCC prevents building anything better,
13468 # like `-m68040'.
13469 lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
13470 ;;
13471
13472 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
13473 # PIC is the default for these OSes.
13474 ;;
13475
13476 mingw* | pw32* | os2*)
13477 # This hack is so that the source file can tell whether it is being
13478 # built for inclusion in a dll (and should export symbols for example).
13479 lt_prog_compiler_pic_F77='-DDLL_EXPORT'
13480 ;;
13481
13482 darwin* | rhapsody*)
13483 # PIC is the default on this platform
13484 # Common symbols not allowed in MH_DYLIB files
13485 lt_prog_compiler_pic_F77='-fno-common'
13486 ;;
13487
13488 interix3*)
13489 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
13490 # Instead, we relocate shared libraries at runtime.
13491 ;;
13492
13493 msdosdjgpp*)
13494 # Just because we use GCC doesn't mean we suddenly get shared libraries
13495 # on systems that don't support them.
13496 lt_prog_compiler_can_build_shared_F77=no
13497 enable_shared=no
13498 ;;
13499
13500 sysv4*MP*)
13501 if test -d /usr/nec; then
13502 lt_prog_compiler_pic_F77=-Kconform_pic
13503 fi
13504 ;;
13505
13506 hpux*)
13507 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
13508 # not for PA HP-UX.
13509 case $host_cpu in
13510 hppa*64*|ia64*)
13511 # +Z the default
13512 ;;
13513 *)
13514 lt_prog_compiler_pic_F77='-fPIC'
13515 ;;
13516 esac
13517 ;;
13518
13519 *)
13520 lt_prog_compiler_pic_F77='-fPIC'
13521 ;;
13522 esac
13523 else
13524 # PORTME Check for flag to pass linker flags through the system compiler.
13525 case $host_os in
13526 aix*)
13527 lt_prog_compiler_wl_F77='-Wl,'
13528 if test "$host_cpu" = ia64; then
13529 # AIX 5 now supports IA64 processor
13530 lt_prog_compiler_static_F77='-Bstatic'
13531 else
13532 lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
13533 fi
13534 ;;
13535 darwin*)
13536 # PIC is the default on this platform
13537 # Common symbols not allowed in MH_DYLIB files
13538 case $cc_basename in
13539 xlc*)
13540 lt_prog_compiler_pic_F77='-qnocommon'
13541 lt_prog_compiler_wl_F77='-Wl,'
13542 ;;
13543 esac
13544 ;;
13545
13546 mingw* | pw32* | os2*)
13547 # This hack is so that the source file can tell whether it is being
13548 # built for inclusion in a dll (and should export symbols for example).
13549 lt_prog_compiler_pic_F77='-DDLL_EXPORT'
13550 ;;
13551
13552 hpux9* | hpux10* | hpux11*)
13553 lt_prog_compiler_wl_F77='-Wl,'
13554 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
13555 # not for PA HP-UX.
13556 case $host_cpu in
13557 hppa*64*|ia64*)
13558 # +Z the default
13559 ;;
13560 *)
13561 lt_prog_compiler_pic_F77='+Z'
13562 ;;
13563 esac
13564 # Is there a better lt_prog_compiler_static that works with the bundled CC?
13565 lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
13566 ;;
13567
13568 irix5* | irix6* | nonstopux*)
13569 lt_prog_compiler_wl_F77='-Wl,'
13570 # PIC (with -KPIC) is the default.
13571 lt_prog_compiler_static_F77='-non_shared'
13572 ;;
13573
13574 newsos6)
13575 lt_prog_compiler_pic_F77='-KPIC'
13576 lt_prog_compiler_static_F77='-Bstatic'
13577 ;;
13578
13579 linux*)
13580 case $cc_basename in
13581 icc* | ecc*)
13582 lt_prog_compiler_wl_F77='-Wl,'
13583 lt_prog_compiler_pic_F77='-KPIC'
13584 lt_prog_compiler_static_F77='-static'
13585 ;;
13586 pgcc* | pgf77* | pgf90* | pgf95*)
13587 # Portland Group compilers (*not* the Pentium gcc compiler,
13588 # which looks to be a dead project)
13589 lt_prog_compiler_wl_F77='-Wl,'
13590 lt_prog_compiler_pic_F77='-fpic'
13591 lt_prog_compiler_static_F77='-Bstatic'
13592 ;;
13593 ccc*)
13594 lt_prog_compiler_wl_F77='-Wl,'
13595 # All Alpha code is PIC.
13596 lt_prog_compiler_static_F77='-non_shared'
13597 ;;
13598 esac
13599 ;;
13600
13601 osf3* | osf4* | osf5*)
13602 lt_prog_compiler_wl_F77='-Wl,'
13603 # All OSF/1 code is PIC.
13604 lt_prog_compiler_static_F77='-non_shared'
13605 ;;
13606
13607 solaris*)
13608 lt_prog_compiler_pic_F77='-KPIC'
13609 lt_prog_compiler_static_F77='-Bstatic'
13610 case $cc_basename in
13611 f77* | f90* | f95*)
13612 lt_prog_compiler_wl_F77='-Qoption ld ';;
13613 *)
13614 lt_prog_compiler_wl_F77='-Wl,';;
13615 esac
13616 ;;
13617
13618 sunos4*)
13619 lt_prog_compiler_wl_F77='-Qoption ld '
13620 lt_prog_compiler_pic_F77='-PIC'
13621 lt_prog_compiler_static_F77='-Bstatic'
13622 ;;
13623
13624 sysv4 | sysv4.2uw2* | sysv4.3*)
13625 lt_prog_compiler_wl_F77='-Wl,'
13626 lt_prog_compiler_pic_F77='-KPIC'
13627 lt_prog_compiler_static_F77='-Bstatic'
13628 ;;
13629
13630 sysv4*MP*)
13631 if test -d /usr/nec ;then
13632 lt_prog_compiler_pic_F77='-Kconform_pic'
13633 lt_prog_compiler_static_F77='-Bstatic'
13634 fi
13635 ;;
13636
13637 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
13638 lt_prog_compiler_wl_F77='-Wl,'
13639 lt_prog_compiler_pic_F77='-KPIC'
13640 lt_prog_compiler_static_F77='-Bstatic'
13641 ;;
13642
13643 unicos*)
13644 lt_prog_compiler_wl_F77='-Wl,'
13645 lt_prog_compiler_can_build_shared_F77=no
13646 ;;
13647
13648 uts4*)
13649 lt_prog_compiler_pic_F77='-pic'
13650 lt_prog_compiler_static_F77='-Bstatic'
13651 ;;
13652
13653 *)
13654 lt_prog_compiler_can_build_shared_F77=no
13655 ;;
13656 esac
13657 fi
13658
13659 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
13660 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6
13661
13662 #
13663 # Check to make sure the PIC flag actually works.
13664 #
13665 if test -n "$lt_prog_compiler_pic_F77"; then
13666
13667 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
13668 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6
13669 if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
13670 echo $ECHO_N "(cached) $ECHO_C" >&6
13671 else
13672 lt_prog_compiler_pic_works_F77=no
13673 ac_outfile=conftest.$ac_objext
13674 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
13675 lt_compiler_flag="$lt_prog_compiler_pic_F77"
13676 # Insert the option either (1) after the last *FLAGS variable, or
13677 # (2) before a word containing "conftest.", or (3) at the end.
13678 # Note that $ac_compile itself does not contain backslashes and begins
13679 # with a dollar sign (not a hyphen), so the echo should work correctly.
13680 # The option is referenced via a variable to avoid confusing sed.
13681 lt_compile=`echo "$ac_compile" | $SED \
13682 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13683 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13684 -e 's:$: $lt_compiler_flag:'`
13685 (eval echo "\"\$as_me:13686: $lt_compile\"" >&5)
13686 (eval "$lt_compile" 2>conftest.err)
13687 ac_status=$?
13688 cat conftest.err >&5
13689 echo "$as_me:13690: \$? = $ac_status" >&5
13690 if (exit $ac_status) && test -s "$ac_outfile"; then
13691 # The compiler can only warn and ignore the option if not recognized
13692 # So say no if there are warnings other than the usual output.
13693 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
13694 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13695 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
13696 lt_prog_compiler_pic_works_F77=yes
13697 fi
13698 fi
13699 $rm conftest*
13700
13701 fi
13702 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
13703 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6
13704
13705 if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
13706 case $lt_prog_compiler_pic_F77 in
13707 "" | " "*) ;;
13708 *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
13709 esac
13710 else
13711 lt_prog_compiler_pic_F77=
13712 lt_prog_compiler_can_build_shared_F77=no
13713 fi
13714
13715 fi
13716 case $host_os in
13717 # For platforms which do not support PIC, -DPIC is meaningless:
13718 *djgpp*)
13719 lt_prog_compiler_pic_F77=
13720 ;;
13721 *)
13722 lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
13723 ;;
13724 esac
13725
13726 #
13727 # Check to make sure the static flag actually works.
13728 #
13729 wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
13730 echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
13731 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
13732 if test "${lt_prog_compiler_static_works_F77+set}" = set; then
13733 echo $ECHO_N "(cached) $ECHO_C" >&6
13734 else
13735 lt_prog_compiler_static_works_F77=no
13736 save_LDFLAGS="$LDFLAGS"
13737 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
13738 printf "$lt_simple_link_test_code" > conftest.$ac_ext
13739 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
13740 # The linker can only warn and ignore the option if not recognized
13741 # So say no if there are warnings
13742 if test -s conftest.err; then
13743 # Append any errors to the config.log.
13744 cat conftest.err 1>&5
13745 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
13746 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13747 if diff conftest.exp conftest.er2 >/dev/null; then
13748 lt_prog_compiler_static_works_F77=yes
13749 fi
13750 else
13751 lt_prog_compiler_static_works_F77=yes
13752 fi
13753 fi
13754 $rm conftest*
13755 LDFLAGS="$save_LDFLAGS"
13756
13757 fi
13758 echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5
13759 echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6
13760
13761 if test x"$lt_prog_compiler_static_works_F77" = xyes; then
13762 :
13763 else
13764 lt_prog_compiler_static_F77=
13765 fi
13766
13767
13768 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
13769 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
13770 if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
13771 echo $ECHO_N "(cached) $ECHO_C" >&6
13772 else
13773 lt_cv_prog_compiler_c_o_F77=no
13774 $rm -r conftest 2>/dev/null
13775 mkdir conftest
13776 cd conftest
13777 mkdir out
13778 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
13779
13780 lt_compiler_flag="-o out/conftest2.$ac_objext"
13781 # Insert the option either (1) after the last *FLAGS variable, or
13782 # (2) before a word containing "conftest.", or (3) at the end.
13783 # Note that $ac_compile itself does not contain backslashes and begins
13784 # with a dollar sign (not a hyphen), so the echo should work correctly.
13785 lt_compile=`echo "$ac_compile" | $SED \
13786 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13787 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13788 -e 's:$: $lt_compiler_flag:'`
13789 (eval echo "\"\$as_me:13790: $lt_compile\"" >&5)
13790 (eval "$lt_compile" 2>out/conftest.err)
13791 ac_status=$?
13792 cat out/conftest.err >&5
13793 echo "$as_me:13794: \$? = $ac_status" >&5
13794 if (exit $ac_status) && test -s out/conftest2.$ac_objext
13795 then
13796 # The compiler can only warn and ignore the option if not recognized
13797 # So say no if there are warnings
13798 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
13799 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
13800 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
13801 lt_cv_prog_compiler_c_o_F77=yes
13802 fi
13803 fi
13804 chmod u+w . 2>&5
13805 $rm conftest*
13806 # SGI C++ compiler will create directory out/ii_files/ for
13807 # template instantiation
13808 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
13809 $rm out/* && rmdir out
13810 cd ..
13811 rmdir conftest
13812 $rm conftest*
13813
13814 fi
13815 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
13816 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6
13817
13818
13819 hard_links="nottested"
13820 if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
13821 # do not overwrite the value of need_locks provided by the user
13822 echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
13823 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
13824 hard_links=yes
13825 $rm conftest*
13826 ln conftest.a conftest.b 2>/dev/null && hard_links=no
13827 touch conftest.a
13828 ln conftest.a conftest.b 2>&5 || hard_links=no
13829 ln conftest.a conftest.b 2>/dev/null && hard_links=no
13830 echo "$as_me:$LINENO: result: $hard_links" >&5
13831 echo "${ECHO_T}$hard_links" >&6
13832 if test "$hard_links" = no; then
13833 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
13834 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
13835 need_locks=warn
13836 fi
13837 else
13838 need_locks=no
13839 fi
13840
13841 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
13842 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
13843
13844 runpath_var=
13845 allow_undefined_flag_F77=
13846 enable_shared_with_static_runtimes_F77=no
13847 archive_cmds_F77=
13848 archive_expsym_cmds_F77=
13849 old_archive_From_new_cmds_F77=
13850 old_archive_from_expsyms_cmds_F77=
13851 export_dynamic_flag_spec_F77=
13852 whole_archive_flag_spec_F77=
13853 thread_safe_flag_spec_F77=
13854 hardcode_libdir_flag_spec_F77=
13855 hardcode_libdir_flag_spec_ld_F77=
13856 hardcode_libdir_separator_F77=
13857 hardcode_direct_F77=no
13858 hardcode_minus_L_F77=no
13859 hardcode_shlibpath_var_F77=unsupported
13860 link_all_deplibs_F77=unknown
13861 hardcode_automatic_F77=no
13862 module_cmds_F77=
13863 module_expsym_cmds_F77=
13864 always_export_symbols_F77=no
13865 export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
13866 # include_expsyms should be a list of space-separated symbols to be *always*
13867 # included in the symbol list
13868 include_expsyms_F77=
13869 # exclude_expsyms can be an extended regexp of symbols to exclude
13870 # it will be wrapped by ` (' and `)$', so one must not match beginning or
13871 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
13872 # as well as any symbol that contains `d'.
13873 exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
13874 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
13875 # platforms (ab)use it in PIC code, but their linkers get confused if
13876 # the symbol is explicitly referenced. Since portable code cannot
13877 # rely on this symbol name, it's probably fine to never include it in
13878 # preloaded symbol tables.
13879 extract_expsyms_cmds=
13880 # Just being paranoid about ensuring that cc_basename is set.
13881 for cc_temp in $compiler""; do
13882 case $cc_temp in
13883 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
13884 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
13885 \-*) ;;
13886 *) break;;
13887 esac
13888 done
13889 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
13890
13891 case $host_os in
13892 cygwin* | mingw* | pw32*)
13893 # FIXME: the MSVC++ port hasn't been tested in a loooong time
13894 # When not using gcc, we currently assume that we are using
13895 # Microsoft Visual C++.
13896 if test "$GCC" != yes; then
13897 with_gnu_ld=no
13898 fi
13899 ;;
13900 interix*)
13901 # we just hope/assume this is gcc and not c89 (= MSVC++)
13902 with_gnu_ld=yes
13903 ;;
13904 openbsd*)
13905 with_gnu_ld=no
13906 ;;
13907 esac
13908
13909 ld_shlibs_F77=yes
13910 if test "$with_gnu_ld" = yes; then
13911 # If archive_cmds runs LD, not CC, wlarc should be empty
13912 wlarc='${wl}'
13913
13914 # Set some defaults for GNU ld with shared library support. These
13915 # are reset later if shared libraries are not supported. Putting them
13916 # here allows them to be overridden if necessary.
13917 runpath_var=LD_RUN_PATH
13918 hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
13919 export_dynamic_flag_spec_F77='${wl}--export-dynamic'
13920 # ancient GNU ld didn't support --whole-archive et. al.
13921 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
13922 whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
13923 else
13924 whole_archive_flag_spec_F77=
13925 fi
13926 supports_anon_versioning=no
13927 case `$LD -v 2>/dev/null` in
13928 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
13929 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
13930 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
13931 *\ 2.11.*) ;; # other 2.11 versions
13932 *) supports_anon_versioning=yes ;;
13933 esac
13934
13935 # See if GNU ld supports shared libraries.
13936 case $host_os in
13937 aix3* | aix4* | aix5*)
13938 # On AIX/PPC, the GNU linker is very broken
13939 if test "$host_cpu" != ia64; then
13940 ld_shlibs_F77=no
13941 cat <<EOF 1>&2
13942
13943 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
13944 *** to be unable to reliably create shared libraries on AIX.
13945 *** Therefore, libtool is disabling shared libraries support. If you
13946 *** really care for shared libraries, you may want to modify your PATH
13947 *** so that a non-GNU linker is found, and then restart.
13948
13949 EOF
13950 fi
13951 ;;
13952
13953 amigaos*)
13954 archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
13955 hardcode_libdir_flag_spec_F77='-L$libdir'
13956 hardcode_minus_L_F77=yes
13957
13958 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
13959 # that the semantics of dynamic libraries on AmigaOS, at least up
13960 # to version 4, is to share data among multiple programs linked
13961 # with the same dynamic library. Since this doesn't match the
13962 # behavior of shared libraries on other platforms, we can't use
13963 # them.
13964 ld_shlibs_F77=no
13965 ;;
13966
13967 beos*)
13968 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
13969 allow_undefined_flag_F77=unsupported
13970 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
13971 # support --undefined. This deserves some investigation. FIXME
13972 archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
13973 else
13974 ld_shlibs_F77=no
13975 fi
13976 ;;
13977
13978 cygwin* | mingw* | pw32*)
13979 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
13980 # as there is no search path for DLLs.
13981 hardcode_libdir_flag_spec_F77='-L$libdir'
13982 allow_undefined_flag_F77=unsupported
13983 always_export_symbols_F77=no
13984 enable_shared_with_static_runtimes_F77=yes
13985 export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
13986
13987 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
13988 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
13989 # If the export-symbols file already is a .def file (1st line
13990 # is EXPORTS), use it as is; otherwise, prepend...
13991 archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
13992 cp $export_symbols $output_objdir/$soname.def;
13993 else
13994 echo EXPORTS > $output_objdir/$soname.def;
13995 cat $export_symbols >> $output_objdir/$soname.def;
13996 fi~
13997 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
13998 else
13999 ld_shlibs_F77=no
14000 fi
14001 ;;
14002
14003 interix3*)
14004 hardcode_direct_F77=no
14005 hardcode_shlibpath_var_F77=no
14006 hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
14007 export_dynamic_flag_spec_F77='${wl}-E'
14008 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
14009 # Instead, shared libraries are loaded at an image base (0x10000000 by
14010 # default) and relocated if they conflict, which is a slow very memory
14011 # consuming and fragmenting process. To avoid this, we pick a random,
14012 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
14013 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
14014 archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
14015 archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
14016 ;;
14017
14018 linux*)
14019 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14020 tmp_addflag=
14021 case $cc_basename,$host_cpu in
14022 pgcc*) # Portland Group C compiler
14023 whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
14024 tmp_addflag=' $pic_flag'
14025 ;;
14026 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
14027 whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
14028 tmp_addflag=' $pic_flag -Mnomain' ;;
14029 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
14030 tmp_addflag=' -i_dynamic' ;;
14031 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
14032 tmp_addflag=' -i_dynamic -nofor_main' ;;
14033 ifc* | ifort*) # Intel Fortran compiler
14034 tmp_addflag=' -nofor_main' ;;
14035 esac
14036 archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14037
14038 if test $supports_anon_versioning = yes; then
14039 archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
14040 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
14041 $echo "local: *; };" >> $output_objdir/$libname.ver~
14042 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
14043 fi
14044 link_all_deplibs_F77=no
14045 else
14046 ld_shlibs_F77=no
14047 fi
14048 ;;
14049
14050 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
14051 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
14052 archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
14053 wlarc=
14054 else
14055 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14056 archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14057 fi
14058 ;;
14059
14060 solaris*)
14061 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
14062 ld_shlibs_F77=no
14063 cat <<EOF 1>&2
14064
14065 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
14066 *** create shared libraries on Solaris systems. Therefore, libtool
14067 *** is disabling shared libraries support. We urge you to upgrade GNU
14068 *** binutils to release 2.9.1 or newer. Another option is to modify
14069 *** your PATH or compiler configuration so that the native linker is
14070 *** used, and then restart.
14071
14072 EOF
14073 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14074 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14075 archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14076 else
14077 ld_shlibs_F77=no
14078 fi
14079 ;;
14080
14081 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
14082 case `$LD -v 2>&1` in
14083 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
14084 ld_shlibs_F77=no
14085 cat <<_LT_EOF 1>&2
14086
14087 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
14088 *** reliably create shared libraries on SCO systems. Therefore, libtool
14089 *** is disabling shared libraries support. We urge you to upgrade GNU
14090 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
14091 *** your PATH or compiler configuration so that the native linker is
14092 *** used, and then restart.
14093
14094 _LT_EOF
14095 ;;
14096 *)
14097 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14098 hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
14099 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
14100 archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
14101 else
14102 ld_shlibs_F77=no
14103 fi
14104 ;;
14105 esac
14106 ;;
14107
14108 sunos4*)
14109 archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
14110 wlarc=
14111 hardcode_direct_F77=yes
14112 hardcode_shlibpath_var_F77=no
14113 ;;
14114
14115 *)
14116 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14117 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14118 archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14119 else
14120 ld_shlibs_F77=no
14121 fi
14122 ;;
14123 esac
14124
14125 if test "$ld_shlibs_F77" = no; then
14126 runpath_var=
14127 hardcode_libdir_flag_spec_F77=
14128 export_dynamic_flag_spec_F77=
14129 whole_archive_flag_spec_F77=
14130 fi
14131 else
14132 # PORTME fill in a description of your system's linker (not GNU ld)
14133 case $host_os in
14134 aix3*)
14135 allow_undefined_flag_F77=unsupported
14136 always_export_symbols_F77=yes
14137 archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
14138 # Note: this linker hardcodes the directories in LIBPATH if there
14139 # are no directories specified by -L.
14140 hardcode_minus_L_F77=yes
14141 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
14142 # Neither direct hardcoding nor static linking is supported with a
14143 # broken collect2.
14144 hardcode_direct_F77=unsupported
14145 fi
14146 ;;
14147
14148 aix4* | aix5*)
14149 if test "$host_cpu" = ia64; then
14150 # On IA64, the linker does run time linking by default, so we don't
14151 # have to do anything special.
14152 aix_use_runtimelinking=no
14153 exp_sym_flag='-Bexport'
14154 no_entry_flag=""
14155 else
14156 # If we're using GNU nm, then we don't want the "-C" option.
14157 # -C means demangle to AIX nm, but means don't demangle with GNU nm
14158 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
14159 export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
14160 else
14161 export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
14162 fi
14163 aix_use_runtimelinking=no
14164
14165 # Test if we are trying to use run time linking or normal
14166 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
14167 # need to do runtime linking.
14168 case $host_os in aix4.[23]|aix4.[23].*|aix5*)
14169 for ld_flag in $LDFLAGS; do
14170 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
14171 aix_use_runtimelinking=yes
14172 break
14173 fi
14174 done
14175 ;;
14176 esac
14177
14178 exp_sym_flag='-bexport'
14179 no_entry_flag='-bnoentry'
14180 fi
14181
14182 # When large executables or shared objects are built, AIX ld can
14183 # have problems creating the table of contents. If linking a library
14184 # or program results in "error TOC overflow" add -mminimal-toc to
14185 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
14186 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
14187
14188 archive_cmds_F77=''
14189 hardcode_direct_F77=yes
14190 hardcode_libdir_separator_F77=':'
14191 link_all_deplibs_F77=yes
14192
14193 if test "$GCC" = yes; then
14194 case $host_os in aix4.[012]|aix4.[012].*)
14195 # We only want to do this on AIX 4.2 and lower, the check
14196 # below for broken collect2 doesn't work under 4.3+
14197 collect2name=`${CC} -print-prog-name=collect2`
14198 if test -f "$collect2name" && \
14199 strings "$collect2name" | grep resolve_lib_name >/dev/null
14200 then
14201 # We have reworked collect2
14202 hardcode_direct_F77=yes
14203 else
14204 # We have old collect2
14205 hardcode_direct_F77=unsupported
14206 # It fails to find uninstalled libraries when the uninstalled
14207 # path is not listed in the libpath. Setting hardcode_minus_L
14208 # to unsupported forces relinking
14209 hardcode_minus_L_F77=yes
14210 hardcode_libdir_flag_spec_F77='-L$libdir'
14211 hardcode_libdir_separator_F77=
14212 fi
14213 ;;
14214 esac
14215 shared_flag='-shared'
14216 if test "$aix_use_runtimelinking" = yes; then
14217 shared_flag="$shared_flag "'${wl}-G'
14218 fi
14219 else
14220 # not using gcc
14221 if test "$host_cpu" = ia64; then
14222 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
14223 # chokes on -Wl,-G. The following line is correct:
14224 shared_flag='-G'
14225 else
14226 if test "$aix_use_runtimelinking" = yes; then
14227 shared_flag='${wl}-G'
14228 else
14229 shared_flag='${wl}-bM:SRE'
14230 fi
14231 fi
14232 fi
14233
14234 # It seems that -bexpall does not export symbols beginning with
14235 # underscore (_), so it is better to generate a list of symbols to export.
14236 always_export_symbols_F77=yes
14237 if test "$aix_use_runtimelinking" = yes; then
14238 # Warning - without using the other runtime loading flags (-brtl),
14239 # -berok will link without error, but may produce a broken library.
14240 allow_undefined_flag_F77='-berok'
14241 # Determine the default libpath from the value encoded in an empty executable.
14242 cat >conftest.$ac_ext <<_ACEOF
14243 program main
14244
14245 end
14246 _ACEOF
14247 rm -f conftest.$ac_objext conftest$ac_exeext
14248 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14249 (eval $ac_link) 2>conftest.er1
14250 ac_status=$?
14251 grep -v '^ *+' conftest.er1 >conftest.err
14252 rm -f conftest.er1
14253 cat conftest.err >&5
14254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14255 (exit $ac_status); } &&
14256 { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
14257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14258 (eval $ac_try) 2>&5
14259 ac_status=$?
14260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14261 (exit $ac_status); }; } &&
14262 { ac_try='test -s conftest$ac_exeext'
14263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14264 (eval $ac_try) 2>&5
14265 ac_status=$?
14266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14267 (exit $ac_status); }; }; then
14268
14269 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
14270 }'`
14271 # Check for a 64-bit object if we didn't find anything.
14272 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
14273 }'`; fi
14274 else
14275 echo "$as_me: failed program was:" >&5
14276 sed 's/^/| /' conftest.$ac_ext >&5
14277
14278 fi
14279 rm -f conftest.err conftest.$ac_objext \
14280 conftest$ac_exeext conftest.$ac_ext
14281 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
14282
14283 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
14284 archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
14285 else
14286 if test "$host_cpu" = ia64; then
14287 hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
14288 allow_undefined_flag_F77="-z nodefs"
14289 archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
14290 else
14291 # Determine the default libpath from the value encoded in an empty executable.
14292 cat >conftest.$ac_ext <<_ACEOF
14293 program main
14294
14295 end
14296 _ACEOF
14297 rm -f conftest.$ac_objext conftest$ac_exeext
14298 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14299 (eval $ac_link) 2>conftest.er1
14300 ac_status=$?
14301 grep -v '^ *+' conftest.er1 >conftest.err
14302 rm -f conftest.er1
14303 cat conftest.err >&5
14304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14305 (exit $ac_status); } &&
14306 { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
14307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14308 (eval $ac_try) 2>&5
14309 ac_status=$?
14310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14311 (exit $ac_status); }; } &&
14312 { ac_try='test -s conftest$ac_exeext'
14313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14314 (eval $ac_try) 2>&5
14315 ac_status=$?
14316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14317 (exit $ac_status); }; }; then
14318
14319 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
14320 }'`
14321 # Check for a 64-bit object if we didn't find anything.
14322 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
14323 }'`; fi
14324 else
14325 echo "$as_me: failed program was:" >&5
14326 sed 's/^/| /' conftest.$ac_ext >&5
14327
14328 fi
14329 rm -f conftest.err conftest.$ac_objext \
14330 conftest$ac_exeext conftest.$ac_ext
14331 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
14332
14333 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
14334 # Warning - without using the other run time loading flags,
14335 # -berok will link without error, but may produce a broken library.
14336 no_undefined_flag_F77=' ${wl}-bernotok'
14337 allow_undefined_flag_F77=' ${wl}-berok'
14338 # Exported symbols can be pulled into shared objects from archives
14339 whole_archive_flag_spec_F77='$convenience'
14340 archive_cmds_need_lc_F77=yes
14341 # This is similar to how AIX traditionally builds its shared libraries.
14342 archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
14343 fi
14344 fi
14345 ;;
14346
14347 amigaos*)
14348 archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
14349 hardcode_libdir_flag_spec_F77='-L$libdir'
14350 hardcode_minus_L_F77=yes
14351 # see comment about different semantics on the GNU ld section
14352 ld_shlibs_F77=no
14353 ;;
14354
14355 bsdi[45]*)
14356 export_dynamic_flag_spec_F77=-rdynamic
14357 ;;
14358
14359 cygwin* | mingw* | pw32*)
14360 # When not using gcc, we currently assume that we are using
14361 # Microsoft Visual C++.
14362 # hardcode_libdir_flag_spec is actually meaningless, as there is
14363 # no search path for DLLs.
14364 hardcode_libdir_flag_spec_F77=' '
14365 allow_undefined_flag_F77=unsupported
14366 # Tell ltmain to make .lib files, not .a files.
14367 libext=lib
14368 # Tell ltmain to make .dll files, not .so files.
14369 shrext_cmds=".dll"
14370 # FIXME: Setting linknames here is a bad hack.
14371 archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
14372 # The linker will automatically build a .lib file if we build a DLL.
14373 old_archive_From_new_cmds_F77='true'
14374 # FIXME: Should let the user specify the lib program.
14375 old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
14376 fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
14377 enable_shared_with_static_runtimes_F77=yes
14378 ;;
14379
14380 darwin* | rhapsody*)
14381 case $host_os in
14382 rhapsody* | darwin1.[012])
14383 allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
14384 ;;
14385 *) # Darwin 1.3 on
14386 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
14387 allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
14388 else
14389 case ${MACOSX_DEPLOYMENT_TARGET} in
14390 10.[012])
14391 allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
14392 ;;
14393 10.*)
14394 allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
14395 ;;
14396 esac
14397 fi
14398 ;;
14399 esac
14400 archive_cmds_need_lc_F77=no
14401 hardcode_direct_F77=no
14402 hardcode_automatic_F77=yes
14403 hardcode_shlibpath_var_F77=unsupported
14404 whole_archive_flag_spec_F77=''
14405 link_all_deplibs_F77=yes
14406 if test "$GCC" = yes ; then
14407 output_verbose_link_cmd='echo'
14408 archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
14409 module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
14410 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
14411 archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
14412 module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
14413 else
14414 case $cc_basename in
14415 xlc*)
14416 output_verbose_link_cmd='echo'
14417 archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
14418 module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
14419 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
14420 archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
14421 module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
14422 ;;
14423 *)
14424 ld_shlibs_F77=no
14425 ;;
14426 esac
14427 fi
14428 ;;
14429
14430 dgux*)
14431 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14432 hardcode_libdir_flag_spec_F77='-L$libdir'
14433 hardcode_shlibpath_var_F77=no
14434 ;;
14435
14436 freebsd1*)
14437 ld_shlibs_F77=no
14438 ;;
14439
14440 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14441 # support. Future versions do this automatically, but an explicit c++rt0.o
14442 # does not break anything, and helps significantly (at the cost of a little
14443 # extra space).
14444 freebsd2.2*)
14445 archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
14446 hardcode_libdir_flag_spec_F77='-R$libdir'
14447 hardcode_direct_F77=yes
14448 hardcode_shlibpath_var_F77=no
14449 ;;
14450
14451 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
14452 freebsd2*)
14453 archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
14454 hardcode_direct_F77=yes
14455 hardcode_minus_L_F77=yes
14456 hardcode_shlibpath_var_F77=no
14457 ;;
14458
14459 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
14460 freebsd* | dragonfly*)
14461 archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
14462 hardcode_libdir_flag_spec_F77='-R$libdir'
14463 hardcode_direct_F77=yes
14464 hardcode_shlibpath_var_F77=no
14465 ;;
14466
14467 # GNU/kFreeBSD uses gcc -shared to do shared libraries.
14468 kfreebsd*-gnu)
14469 archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
14470 hardcode_libdir_flag_spec_F77='-R$libdir'
14471 hardcode_direct_F77=yes
14472 hardcode_shlibpath_var_F77=no
14473 link_all_deplibs_F77=no
14474 ;;
14475
14476 hpux9*)
14477 if test "$GCC" = yes; then
14478 archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
14479 else
14480 archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
14481 fi
14482 hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
14483 hardcode_libdir_separator_F77=:
14484 hardcode_direct_F77=yes
14485
14486 # hardcode_minus_L: Not really in the search PATH,
14487 # but as the default location of the library.
14488 hardcode_minus_L_F77=yes
14489 export_dynamic_flag_spec_F77='${wl}-E'
14490 ;;
14491
14492 hpux10*)
14493 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
14494 archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
14495 else
14496 archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
14497 fi
14498 if test "$with_gnu_ld" = no; then
14499 hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
14500 hardcode_libdir_separator_F77=:
14501
14502 hardcode_direct_F77=yes
14503 export_dynamic_flag_spec_F77='${wl}-E'
14504
14505 # hardcode_minus_L: Not really in the search PATH,
14506 # but as the default location of the library.
14507 hardcode_minus_L_F77=yes
14508 fi
14509 ;;
14510
14511 hpux11*)
14512 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
14513 case $host_cpu in
14514 hppa*64*)
14515 archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
14516 ;;
14517 ia64*)
14518 archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
14519 ;;
14520 *)
14521 archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
14522 ;;
14523 esac
14524 else
14525 case $host_cpu in
14526 hppa*64*)
14527 archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
14528 ;;
14529 ia64*)
14530 archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
14531 ;;
14532 *)
14533 archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
14534 ;;
14535 esac
14536 fi
14537 if test "$with_gnu_ld" = no; then
14538 hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
14539 hardcode_libdir_separator_F77=:
14540
14541 case $host_cpu in
14542 hppa*64*|ia64*)
14543 hardcode_libdir_flag_spec_ld_F77='+b $libdir'
14544 hardcode_direct_F77=no
14545 hardcode_shlibpath_var_F77=no
14546 ;;
14547 *)
14548 hardcode_direct_F77=yes
14549 export_dynamic_flag_spec_F77='${wl}-E'
14550
14551 # hardcode_minus_L: Not really in the search PATH,
14552 # but as the default location of the library.
14553 hardcode_minus_L_F77=yes
14554 ;;
14555 esac
14556 fi
14557 ;;
14558
14559 irix5* | irix6* | nonstopux*)
14560 if test "$GCC" = yes; then
14561 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
14562 else
14563 archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
14564 hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
14565 fi
14566 hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
14567 hardcode_libdir_separator_F77=:
14568 link_all_deplibs_F77=yes
14569 ;;
14570
14571 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
14572 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
14573 archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
14574 else
14575 archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
14576 fi
14577 hardcode_libdir_flag_spec_F77='-R$libdir'
14578 hardcode_direct_F77=yes
14579 hardcode_shlibpath_var_F77=no
14580 ;;
14581
14582 newsos6)
14583 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14584 hardcode_direct_F77=yes
14585 hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
14586 hardcode_libdir_separator_F77=:
14587 hardcode_shlibpath_var_F77=no
14588 ;;
14589
14590 openbsd*)
14591 hardcode_direct_F77=yes
14592 hardcode_shlibpath_var_F77=no
14593 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
14594 archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
14595 archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
14596 hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
14597 export_dynamic_flag_spec_F77='${wl}-E'
14598 else
14599 case $host_os in
14600 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
14601 archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
14602 hardcode_libdir_flag_spec_F77='-R$libdir'
14603 ;;
14604 *)
14605 archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
14606 hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
14607 ;;
14608 esac
14609 fi
14610 ;;
14611
14612 os2*)
14613 hardcode_libdir_flag_spec_F77='-L$libdir'
14614 hardcode_minus_L_F77=yes
14615 allow_undefined_flag_F77=unsupported
14616 archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
14617 old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
14618 ;;
14619
14620 osf3*)
14621 if test "$GCC" = yes; then
14622 allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
14623 archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
14624 else
14625 allow_undefined_flag_F77=' -expect_unresolved \*'
14626 archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
14627 fi
14628 hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
14629 hardcode_libdir_separator_F77=:
14630 ;;
14631
14632 osf4* | osf5*) # as osf3* with the addition of -msym flag
14633 if test "$GCC" = yes; then
14634 allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
14635 archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
14636 hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
14637 else
14638 allow_undefined_flag_F77=' -expect_unresolved \*'
14639 archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
14640 archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
14641 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
14642
14643 # Both c and cxx compiler support -rpath directly
14644 hardcode_libdir_flag_spec_F77='-rpath $libdir'
14645 fi
14646 hardcode_libdir_separator_F77=:
14647 ;;
14648
14649 solaris*)
14650 no_undefined_flag_F77=' -z text'
14651 if test "$GCC" = yes; then
14652 wlarc='${wl}'
14653 archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
14654 archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
14655 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
14656 else
14657 wlarc=''
14658 archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
14659 archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
14660 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
14661 fi
14662 hardcode_libdir_flag_spec_F77='-R$libdir'
14663 hardcode_shlibpath_var_F77=no
14664 case $host_os in
14665 solaris2.[0-5] | solaris2.[0-5].*) ;;
14666 *)
14667 # The compiler driver will combine linker options so we
14668 # cannot just pass the convience library names through
14669 # without $wl, iff we do not link with $LD.
14670 # Luckily, gcc supports the same syntax we need for Sun Studio.
14671 # Supported since Solaris 2.6 (maybe 2.5.1?)
14672 case $wlarc in
14673 '')
14674 whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
14675 *)
14676 whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
14677 esac ;;
14678 esac
14679 link_all_deplibs_F77=yes
14680 ;;
14681
14682 sunos4*)
14683 if test "x$host_vendor" = xsequent; then
14684 # Use $CC to link under sequent, because it throws in some extra .o
14685 # files that make .init and .fini sections work.
14686 archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
14687 else
14688 archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
14689 fi
14690 hardcode_libdir_flag_spec_F77='-L$libdir'
14691 hardcode_direct_F77=yes
14692 hardcode_minus_L_F77=yes
14693 hardcode_shlibpath_var_F77=no
14694 ;;
14695
14696 sysv4)
14697 case $host_vendor in
14698 sni)
14699 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14700 hardcode_direct_F77=yes # is this really true???
14701 ;;
14702 siemens)
14703 ## LD is ld it makes a PLAMLIB
14704 ## CC just makes a GrossModule.
14705 archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
14706 reload_cmds_F77='$CC -r -o $output$reload_objs'
14707 hardcode_direct_F77=no
14708 ;;
14709 motorola)
14710 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14711 hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
14712 ;;
14713 esac
14714 runpath_var='LD_RUN_PATH'
14715 hardcode_shlibpath_var_F77=no
14716 ;;
14717
14718 sysv4.3*)
14719 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14720 hardcode_shlibpath_var_F77=no
14721 export_dynamic_flag_spec_F77='-Bexport'
14722 ;;
14723
14724 sysv4*MP*)
14725 if test -d /usr/nec; then
14726 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14727 hardcode_shlibpath_var_F77=no
14728 runpath_var=LD_RUN_PATH
14729 hardcode_runpath_var=yes
14730 ld_shlibs_F77=yes
14731 fi
14732 ;;
14733
14734 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
14735 no_undefined_flag_F77='${wl}-z,text'
14736 archive_cmds_need_lc_F77=no
14737 hardcode_shlibpath_var_F77=no
14738 runpath_var='LD_RUN_PATH'
14739
14740 if test "$GCC" = yes; then
14741 archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14742 archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14743 else
14744 archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14745 archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14746 fi
14747 ;;
14748
14749 sysv5* | sco3.2v5* | sco5v6*)
14750 # Note: We can NOT use -z defs as we might desire, because we do not
14751 # link with -lc, and that would cause any symbols used from libc to
14752 # always be unresolved, which means just about no library would
14753 # ever link correctly. If we're not using GNU ld we use -z text
14754 # though, which does catch some bad symbols but isn't as heavy-handed
14755 # as -z defs.
14756 no_undefined_flag_F77='${wl}-z,text'
14757 allow_undefined_flag_F77='${wl}-z,nodefs'
14758 archive_cmds_need_lc_F77=no
14759 hardcode_shlibpath_var_F77=no
14760 hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
14761 hardcode_libdir_separator_F77=':'
14762 link_all_deplibs_F77=yes
14763 export_dynamic_flag_spec_F77='${wl}-Bexport'
14764 runpath_var='LD_RUN_PATH'
14765
14766 if test "$GCC" = yes; then
14767 archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
14768 archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
14769 else
14770 archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
14771 archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
14772 fi
14773 ;;
14774
14775 uts4*)
14776 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14777 hardcode_libdir_flag_spec_F77='-L$libdir'
14778 hardcode_shlibpath_var_F77=no
14779 ;;
14780
14781 *)
14782 ld_shlibs_F77=no
14783 ;;
14784 esac
14785 fi
14786
14787 echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
14788 echo "${ECHO_T}$ld_shlibs_F77" >&6
14789 test "$ld_shlibs_F77" = no && can_build_shared=no
14790
14791 #
14792 # Do we need to explicitly link libc?
14793 #
14794 case "x$archive_cmds_need_lc_F77" in
14795 x|xyes)
14796 # Assume -lc should be added
14797 archive_cmds_need_lc_F77=yes
14798
14799 if test "$enable_shared" = yes && test "$GCC" = yes; then
14800 case $archive_cmds_F77 in
14801 *'~'*)
14802 # FIXME: we may have to deal with multi-command sequences.
14803 ;;
14804 '$CC '*)
14805 # Test whether the compiler implicitly links with -lc since on some
14806 # systems, -lgcc has to come before -lc. If gcc already passes -lc
14807 # to ld, don't add -lc before -lgcc.
14808 echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
14809 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
14810 $rm conftest*
14811 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
14812
14813 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14814 (eval $ac_compile) 2>&5
14815 ac_status=$?
14816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14817 (exit $ac_status); } 2>conftest.err; then
14818 soname=conftest
14819 lib=conftest
14820 libobjs=conftest.$ac_objext
14821 deplibs=
14822 wl=$lt_prog_compiler_wl_F77
14823 pic_flag=$lt_prog_compiler_pic_F77
14824 compiler_flags=-v
14825 linker_flags=-v
14826 verstring=
14827 output_objdir=.
14828 libname=conftest
14829 lt_save_allow_undefined_flag=$allow_undefined_flag_F77
14830 allow_undefined_flag_F77=
14831 if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
14832 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
14833 ac_status=$?
14834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14835 (exit $ac_status); }
14836 then
14837 archive_cmds_need_lc_F77=no
14838 else
14839 archive_cmds_need_lc_F77=yes
14840 fi
14841 allow_undefined_flag_F77=$lt_save_allow_undefined_flag
14842 else
14843 cat conftest.err 1>&5
14844 fi
14845 $rm conftest*
14846 echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
14847 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6
14848 ;;
14849 esac
14850 fi
14851 ;;
14852 esac
14853
14854 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
14855 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
14856 library_names_spec=
14857 libname_spec='lib$name'
14858 soname_spec=
14859 shrext_cmds=".so"
14860 postinstall_cmds=
14861 postuninstall_cmds=
14862 finish_cmds=
14863 finish_eval=
14864 shlibpath_var=
14865 shlibpath_overrides_runpath=unknown
14866 version_type=none
14867 dynamic_linker="$host_os ld.so"
14868 sys_lib_dlsearch_path_spec="/lib /usr/lib"
14869 if test "$GCC" = yes; then
14870 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
14871 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
14872 # if the path contains ";" then we assume it to be the separator
14873 # otherwise default to the standard path separator (i.e. ":") - it is
14874 # assumed that no part of a normal pathname contains ";" but that should
14875 # okay in the real world where ";" in dirpaths is itself problematic.
14876 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
14877 else
14878 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
14879 fi
14880 else
14881 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14882 fi
14883 need_lib_prefix=unknown
14884 hardcode_into_libs=no
14885
14886 # when you set need_version to no, make sure it does not cause -set_version
14887 # flags to be left without arguments
14888 need_version=unknown
14889
14890 case $host_os in
14891 aix3*)
14892 version_type=linux
14893 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
14894 shlibpath_var=LIBPATH
14895
14896 # AIX 3 has no versioning support, so we append a major version to the name.
14897 soname_spec='${libname}${release}${shared_ext}$major'
14898 ;;
14899
14900 aix4* | aix5*)
14901 version_type=linux
14902 need_lib_prefix=no
14903 need_version=no
14904 hardcode_into_libs=yes
14905 if test "$host_cpu" = ia64; then
14906 # AIX 5 supports IA64
14907 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
14908 shlibpath_var=LD_LIBRARY_PATH
14909 else
14910 # With GCC up to 2.95.x, collect2 would create an import file
14911 # for dependence libraries. The import file would start with
14912 # the line `#! .'. This would cause the generated library to
14913 # depend on `.', always an invalid library. This was fixed in
14914 # development snapshots of GCC prior to 3.0.
14915 case $host_os in
14916 aix4 | aix4.[01] | aix4.[01].*)
14917 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
14918 echo ' yes '
14919 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
14920 :
14921 else
14922 can_build_shared=no
14923 fi
14924 ;;
14925 esac
14926 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
14927 # soname into executable. Probably we can add versioning support to
14928 # collect2, so additional links can be useful in future.
14929 if test "$aix_use_runtimelinking" = yes; then
14930 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
14931 # instead of lib<name>.a to let people know that these are not
14932 # typical AIX shared libraries.
14933 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14934 else
14935 # We preserve .a as extension for shared libraries through AIX4.2
14936 # and later when we are not doing run time linking.
14937 library_names_spec='${libname}${release}.a $libname.a'
14938 soname_spec='${libname}${release}${shared_ext}$major'
14939 fi
14940 shlibpath_var=LIBPATH
14941 fi
14942 ;;
14943
14944 amigaos*)
14945 library_names_spec='$libname.ixlibrary $libname.a'
14946 # Create ${libname}_ixlibrary.a entries in /sys/libs.
14947 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
14948 ;;
14949
14950 beos*)
14951 library_names_spec='${libname}${shared_ext}'
14952 dynamic_linker="$host_os ld.so"
14953 shlibpath_var=LIBRARY_PATH
14954 ;;
14955
14956 bsdi[45]*)
14957 version_type=linux
14958 need_version=no
14959 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
14960 soname_spec='${libname}${release}${shared_ext}$major'
14961 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
14962 shlibpath_var=LD_LIBRARY_PATH
14963 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
14964 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
14965 # the default ld.so.conf also contains /usr/contrib/lib and
14966 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
14967 # libtool to hard-code these into programs
14968 ;;
14969
14970 cygwin* | mingw* | pw32*)
14971 version_type=windows
14972 shrext_cmds=".dll"
14973 need_version=no
14974 need_lib_prefix=no
14975
14976 case $GCC,$host_os in
14977 yes,cygwin* | yes,mingw* | yes,pw32*)
14978 library_names_spec='$libname.dll.a'
14979 # DLL is installed to $(libdir)/../bin by postinstall_cmds
14980 postinstall_cmds='base_file=`basename \${file}`~
14981 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
14982 dldir=$destdir/`dirname \$dlpath`~
14983 test -d \$dldir || mkdir -p \$dldir~
14984 $install_prog $dir/$dlname \$dldir/$dlname~
14985 chmod a+x \$dldir/$dlname'
14986 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
14987 dlpath=$dir/\$dldll~
14988 $rm \$dlpath'
14989 shlibpath_overrides_runpath=yes
14990
14991 case $host_os in
14992 cygwin*)
14993 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
14994 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
14995 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
14996 ;;
14997 mingw*)
14998 # MinGW DLLs use traditional 'lib' prefix
14999 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15000 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
15001 if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
15002 # It is most probably a Windows format PATH printed by
15003 # mingw gcc, but we are running on Cygwin. Gcc prints its search
15004 # path with ; separators, and with drive letters. We can handle the
15005 # drive letters (cygwin fileutils understands them), so leave them,
15006 # especially as we might pass files found there to a mingw objdump,
15007 # which wouldn't understand a cygwinified path. Ahh.
15008 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
15009 else
15010 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
15011 fi
15012 ;;
15013 pw32*)
15014 # pw32 DLLs use 'pw' prefix rather than 'lib'
15015 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15016 ;;
15017 esac
15018 ;;
15019
15020 *)
15021 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
15022 ;;
15023 esac
15024 dynamic_linker='Win32 ld.exe'
15025 # FIXME: first we should search . and the directory the executable is in
15026 shlibpath_var=PATH
15027 ;;
15028
15029 darwin* | rhapsody*)
15030 dynamic_linker="$host_os dyld"
15031 version_type=darwin
15032 need_lib_prefix=no
15033 need_version=no
15034 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
15035 soname_spec='${libname}${release}${major}$shared_ext'
15036 shlibpath_overrides_runpath=yes
15037 shlibpath_var=DYLD_LIBRARY_PATH
15038 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
15039 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
15040 if test "$GCC" = yes; then
15041 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
15042 else
15043 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
15044 fi
15045 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
15046 ;;
15047
15048 dgux*)
15049 version_type=linux
15050 need_lib_prefix=no
15051 need_version=no
15052 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
15053 soname_spec='${libname}${release}${shared_ext}$major'
15054 shlibpath_var=LD_LIBRARY_PATH
15055 ;;
15056
15057 freebsd1*)
15058 dynamic_linker=no
15059 ;;
15060
15061 kfreebsd*-gnu)
15062 version_type=linux
15063 need_lib_prefix=no
15064 need_version=no
15065 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15066 soname_spec='${libname}${release}${shared_ext}$major'
15067 shlibpath_var=LD_LIBRARY_PATH
15068 shlibpath_overrides_runpath=no
15069 hardcode_into_libs=yes
15070 dynamic_linker='GNU ld.so'
15071 ;;
15072
15073 freebsd* | dragonfly*)
15074 # DragonFly does not have aout. When/if they implement a new
15075 # versioning mechanism, adjust this.
15076 if test -x /usr/bin/objformat; then
15077 objformat=`/usr/bin/objformat`
15078 else
15079 case $host_os in
15080 freebsd[123]*) objformat=aout ;;
15081 *) objformat=elf ;;
15082 esac
15083 fi
15084 version_type=freebsd-$objformat
15085 case $version_type in
15086 freebsd-elf*)
15087 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
15088 need_version=no
15089 need_lib_prefix=no
15090 ;;
15091 freebsd-*)
15092 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
15093 need_version=yes
15094 ;;
15095 esac
15096 shlibpath_var=LD_LIBRARY_PATH
15097 case $host_os in
15098 freebsd2*)
15099 shlibpath_overrides_runpath=yes
15100 ;;
15101 freebsd3.[01]* | freebsdelf3.[01]*)
15102 shlibpath_overrides_runpath=yes
15103 hardcode_into_libs=yes
15104 ;;
15105 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
15106 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
15107 shlibpath_overrides_runpath=no
15108 hardcode_into_libs=yes
15109 ;;
15110 freebsd*) # from 4.6 on
15111 shlibpath_overrides_runpath=yes
15112 hardcode_into_libs=yes
15113 ;;
15114 esac
15115 ;;
15116
15117 gnu*)
15118 version_type=linux
15119 need_lib_prefix=no
15120 need_version=no
15121 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
15122 soname_spec='${libname}${release}${shared_ext}$major'
15123 shlibpath_var=LD_LIBRARY_PATH
15124 hardcode_into_libs=yes
15125 ;;
15126
15127 hpux9* | hpux10* | hpux11*)
15128 # Give a soname corresponding to the major version so that dld.sl refuses to
15129 # link against other versions.
15130 version_type=sunos
15131 need_lib_prefix=no
15132 need_version=no
15133 case $host_cpu in
15134 ia64*)
15135 shrext_cmds='.so'
15136 hardcode_into_libs=yes
15137 dynamic_linker="$host_os dld.so"
15138 shlibpath_var=LD_LIBRARY_PATH
15139 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15140 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15141 soname_spec='${libname}${release}${shared_ext}$major'
15142 if test "X$HPUX_IA64_MODE" = X32; then
15143 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
15144 else
15145 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
15146 fi
15147 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15148 ;;
15149 hppa*64*)
15150 shrext_cmds='.sl'
15151 hardcode_into_libs=yes
15152 dynamic_linker="$host_os dld.sl"
15153 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
15154 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15155 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15156 soname_spec='${libname}${release}${shared_ext}$major'
15157 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
15158 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15159 ;;
15160 *)
15161 shrext_cmds='.sl'
15162 dynamic_linker="$host_os dld.sl"
15163 shlibpath_var=SHLIB_PATH
15164 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
15165 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15166 soname_spec='${libname}${release}${shared_ext}$major'
15167 ;;
15168 esac
15169 # HP-UX runs *really* slowly unless shared libraries are mode 555.
15170 postinstall_cmds='chmod 555 $lib'
15171 ;;
15172
15173 interix3*)
15174 version_type=linux
15175 need_lib_prefix=no
15176 need_version=no
15177 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15178 soname_spec='${libname}${release}${shared_ext}$major'
15179 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
15180 shlibpath_var=LD_LIBRARY_PATH
15181 shlibpath_overrides_runpath=no
15182 hardcode_into_libs=yes
15183 ;;
15184
15185 irix5* | irix6* | nonstopux*)
15186 case $host_os in
15187 nonstopux*) version_type=nonstopux ;;
15188 *)
15189 if test "$lt_cv_prog_gnu_ld" = yes; then
15190 version_type=linux
15191 else
15192 version_type=irix
15193 fi ;;
15194 esac
15195 need_lib_prefix=no
15196 need_version=no
15197 soname_spec='${libname}${release}${shared_ext}$major'
15198 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
15199 case $host_os in
15200 irix5* | nonstopux*)
15201 libsuff= shlibsuff=
15202 ;;
15203 *)
15204 case $LD in # libtool.m4 will add one of these switches to LD
15205 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
15206 libsuff= shlibsuff= libmagic=32-bit;;
15207 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
15208 libsuff=32 shlibsuff=N32 libmagic=N32;;
15209 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
15210 libsuff=64 shlibsuff=64 libmagic=64-bit;;
15211 *) libsuff= shlibsuff= libmagic=never-match;;
15212 esac
15213 ;;
15214 esac
15215 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
15216 shlibpath_overrides_runpath=no
15217 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
15218 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
15219 hardcode_into_libs=yes
15220 ;;
15221
15222 # No shared lib support for Linux oldld, aout, or coff.
15223 linux*oldld* | linux*aout* | linux*coff*)
15224 dynamic_linker=no
15225 ;;
15226
15227 # This must be Linux ELF.
15228 linux*)
15229 version_type=linux
15230 need_lib_prefix=no
15231 need_version=no
15232 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15233 soname_spec='${libname}${release}${shared_ext}$major'
15234 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
15235 shlibpath_var=LD_LIBRARY_PATH
15236 shlibpath_overrides_runpath=no
15237 # This implies no fast_install, which is unacceptable.
15238 # Some rework will be needed to allow for fast_install
15239 # before this can be enabled.
15240 hardcode_into_libs=yes
15241
15242 # Append ld.so.conf contents to the search path
15243 if test -f /etc/ld.so.conf; then
15244 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
15245 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
15246 fi
15247
15248 # We used to test for /lib/ld.so.1 and disable shared libraries on
15249 # powerpc, because MkLinux only supported shared libraries with the
15250 # GNU dynamic linker. Since this was broken with cross compilers,
15251 # most powerpc-linux boxes support dynamic linking these days and
15252 # people can always --disable-shared, the test was removed, and we
15253 # assume the GNU/Linux dynamic linker is in use.
15254 dynamic_linker='GNU/Linux ld.so'
15255 ;;
15256
15257 netbsdelf*-gnu)
15258 version_type=linux
15259 need_lib_prefix=no
15260 need_version=no
15261 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15262 soname_spec='${libname}${release}${shared_ext}$major'
15263 shlibpath_var=LD_LIBRARY_PATH
15264 shlibpath_overrides_runpath=no
15265 hardcode_into_libs=yes
15266 dynamic_linker='NetBSD ld.elf_so'
15267 ;;
15268
15269 knetbsd*-gnu)
15270 version_type=linux
15271 need_lib_prefix=no
15272 need_version=no
15273 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15274 soname_spec='${libname}${release}${shared_ext}$major'
15275 shlibpath_var=LD_LIBRARY_PATH
15276 shlibpath_overrides_runpath=no
15277 hardcode_into_libs=yes
15278 dynamic_linker='GNU ld.so'
15279 ;;
15280
15281 netbsd*)
15282 version_type=sunos
15283 need_lib_prefix=no
15284 need_version=no
15285 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
15286 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
15287 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
15288 dynamic_linker='NetBSD (a.out) ld.so'
15289 else
15290 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15291 soname_spec='${libname}${release}${shared_ext}$major'
15292 dynamic_linker='NetBSD ld.elf_so'
15293 fi
15294 shlibpath_var=LD_LIBRARY_PATH
15295 shlibpath_overrides_runpath=yes
15296 hardcode_into_libs=yes
15297 ;;
15298
15299 newsos6)
15300 version_type=linux
15301 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15302 shlibpath_var=LD_LIBRARY_PATH
15303 shlibpath_overrides_runpath=yes
15304 ;;
15305
15306 nto-qnx*)
15307 version_type=linux
15308 need_lib_prefix=no
15309 need_version=no
15310 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15311 soname_spec='${libname}${release}${shared_ext}$major'
15312 shlibpath_var=LD_LIBRARY_PATH
15313 shlibpath_overrides_runpath=yes
15314 ;;
15315
15316 openbsd*)
15317 version_type=sunos
15318 sys_lib_dlsearch_path_spec="/usr/lib"
15319 need_lib_prefix=no
15320 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
15321 case $host_os in
15322 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
15323 *) need_version=no ;;
15324 esac
15325 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
15326 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
15327 shlibpath_var=LD_LIBRARY_PATH
15328 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
15329 case $host_os in
15330 openbsd2.[89] | openbsd2.[89].*)
15331 shlibpath_overrides_runpath=no
15332 ;;
15333 *)
15334 shlibpath_overrides_runpath=yes
15335 ;;
15336 esac
15337 else
15338 shlibpath_overrides_runpath=yes
15339 fi
15340 ;;
15341
15342 os2*)
15343 libname_spec='$name'
15344 shrext_cmds=".dll"
15345 need_lib_prefix=no
15346 library_names_spec='$libname${shared_ext} $libname.a'
15347 dynamic_linker='OS/2 ld.exe'
15348 shlibpath_var=LIBPATH
15349 ;;
15350
15351 osf3* | osf4* | osf5*)
15352 version_type=osf
15353 need_lib_prefix=no
15354 need_version=no
15355 soname_spec='${libname}${release}${shared_ext}$major'
15356 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15357 shlibpath_var=LD_LIBRARY_PATH
15358 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
15359 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
15360 ;;
15361
15362 solaris*)
15363 version_type=linux
15364 need_lib_prefix=no
15365 need_version=no
15366 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15367 soname_spec='${libname}${release}${shared_ext}$major'
15368 shlibpath_var=LD_LIBRARY_PATH
15369 shlibpath_overrides_runpath=yes
15370 hardcode_into_libs=yes
15371 # ldd complains unless libraries are executable
15372 postinstall_cmds='chmod +x $lib'
15373 ;;
15374
15375 sunos4*)
15376 version_type=sunos
15377 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
15378 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
15379 shlibpath_var=LD_LIBRARY_PATH
15380 shlibpath_overrides_runpath=yes
15381 if test "$with_gnu_ld" = yes; then
15382 need_lib_prefix=no
15383 fi
15384 need_version=yes
15385 ;;
15386
15387 sysv4 | sysv4.3*)
15388 version_type=linux
15389 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15390 soname_spec='${libname}${release}${shared_ext}$major'
15391 shlibpath_var=LD_LIBRARY_PATH
15392 case $host_vendor in
15393 sni)
15394 shlibpath_overrides_runpath=no
15395 need_lib_prefix=no
15396 export_dynamic_flag_spec='${wl}-Blargedynsym'
15397 runpath_var=LD_RUN_PATH
15398 ;;
15399 siemens)
15400 need_lib_prefix=no
15401 ;;
15402 motorola)
15403 need_lib_prefix=no
15404 need_version=no
15405 shlibpath_overrides_runpath=no
15406 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
15407 ;;
15408 esac
15409 ;;
15410
15411 sysv4*MP*)
15412 if test -d /usr/nec ;then
15413 version_type=linux
15414 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
15415 soname_spec='$libname${shared_ext}.$major'
15416 shlibpath_var=LD_LIBRARY_PATH
15417 fi
15418 ;;
15419
15420 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
15421 version_type=freebsd-elf
15422 need_lib_prefix=no
15423 need_version=no
15424 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
15425 soname_spec='${libname}${release}${shared_ext}$major'
15426 shlibpath_var=LD_LIBRARY_PATH
15427 hardcode_into_libs=yes
15428 if test "$with_gnu_ld" = yes; then
15429 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
15430 shlibpath_overrides_runpath=no
15431 else
15432 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
15433 shlibpath_overrides_runpath=yes
15434 case $host_os in
15435 sco3.2v5*)
15436 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
15437 ;;
15438 esac
15439 fi
15440 sys_lib_dlsearch_path_spec='/usr/lib'
15441 ;;
15442
15443 uts4*)
15444 version_type=linux
15445 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15446 soname_spec='${libname}${release}${shared_ext}$major'
15447 shlibpath_var=LD_LIBRARY_PATH
15448 ;;
15449
15450 *)
15451 dynamic_linker=no
15452 ;;
15453 esac
15454 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
15455 echo "${ECHO_T}$dynamic_linker" >&6
15456 test "$dynamic_linker" = no && can_build_shared=no
15457
15458 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
15459 if test "$GCC" = yes; then
15460 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
15461 fi
15462
15463 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
15464 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
15465 hardcode_action_F77=
15466 if test -n "$hardcode_libdir_flag_spec_F77" || \
15467 test -n "$runpath_var_F77" || \
15468 test "X$hardcode_automatic_F77" = "Xyes" ; then
15469
15470 # We can hardcode non-existant directories.
15471 if test "$hardcode_direct_F77" != no &&
15472 # If the only mechanism to avoid hardcoding is shlibpath_var, we
15473 # have to relink, otherwise we might link with an installed library
15474 # when we should be linking with a yet-to-be-installed one
15475 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
15476 test "$hardcode_minus_L_F77" != no; then
15477 # Linking always hardcodes the temporary library directory.
15478 hardcode_action_F77=relink
15479 else
15480 # We can link without hardcoding, and we can hardcode nonexisting dirs.
15481 hardcode_action_F77=immediate
15482 fi
15483 else
15484 # We cannot hardcode anything, or else we can only hardcode existing
15485 # directories.
15486 hardcode_action_F77=unsupported
15487 fi
15488 echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
15489 echo "${ECHO_T}$hardcode_action_F77" >&6
15490
15491 if test "$hardcode_action_F77" = relink; then
15492 # Fast installation is not supported
15493 enable_fast_install=no
15494 elif test "$shlibpath_overrides_runpath" = yes ||
15495 test "$enable_shared" = no; then
15496 # Fast installation is not necessary
15497 enable_fast_install=needless
15498 fi
15499
15500
15501 # The else clause should only fire when bootstrapping the
15502 # libtool distribution, otherwise you forgot to ship ltmain.sh
15503 # with your package, and you will get complaints that there are
15504 # no rules to generate ltmain.sh.
15505 if test -f "$ltmain"; then
15506 # See if we are running on zsh, and set the options which allow our commands through
15507 # without removal of \ escapes.
15508 if test -n "${ZSH_VERSION+set}" ; then
15509 setopt NO_GLOB_SUBST
15510 fi
15511 # Now quote all the things that may contain metacharacters while being
15512 # careful not to overquote the AC_SUBSTed values. We take copies of the
15513 # variables and quote the copies for generation of the libtool script.
15514 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
15515 SED SHELL STRIP \
15516 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
15517 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
15518 deplibs_check_method reload_flag reload_cmds need_locks \
15519 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
15520 lt_cv_sys_global_symbol_to_c_name_address \
15521 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
15522 old_postinstall_cmds old_postuninstall_cmds \
15523 compiler_F77 \
15524 CC_F77 \
15525 LD_F77 \
15526 lt_prog_compiler_wl_F77 \
15527 lt_prog_compiler_pic_F77 \
15528 lt_prog_compiler_static_F77 \
15529 lt_prog_compiler_no_builtin_flag_F77 \
15530 export_dynamic_flag_spec_F77 \
15531 thread_safe_flag_spec_F77 \
15532 whole_archive_flag_spec_F77 \
15533 enable_shared_with_static_runtimes_F77 \
15534 old_archive_cmds_F77 \
15535 old_archive_from_new_cmds_F77 \
15536 predep_objects_F77 \
15537 postdep_objects_F77 \
15538 predeps_F77 \
15539 postdeps_F77 \
15540 compiler_lib_search_path_F77 \
15541 archive_cmds_F77 \
15542 archive_expsym_cmds_F77 \
15543 postinstall_cmds_F77 \
15544 postuninstall_cmds_F77 \
15545 old_archive_from_expsyms_cmds_F77 \
15546 allow_undefined_flag_F77 \
15547 no_undefined_flag_F77 \
15548 export_symbols_cmds_F77 \
15549 hardcode_libdir_flag_spec_F77 \
15550 hardcode_libdir_flag_spec_ld_F77 \
15551 hardcode_libdir_separator_F77 \
15552 hardcode_automatic_F77 \
15553 module_cmds_F77 \
15554 module_expsym_cmds_F77 \
15555 lt_cv_prog_compiler_c_o_F77 \
15556 exclude_expsyms_F77 \
15557 include_expsyms_F77; do
15558
15559 case $var in
15560 old_archive_cmds_F77 | \
15561 old_archive_from_new_cmds_F77 | \
15562 archive_cmds_F77 | \
15563 archive_expsym_cmds_F77 | \
15564 module_cmds_F77 | \
15565 module_expsym_cmds_F77 | \
15566 old_archive_from_expsyms_cmds_F77 | \
15567 export_symbols_cmds_F77 | \
15568 extract_expsyms_cmds | reload_cmds | finish_cmds | \
15569 postinstall_cmds | postuninstall_cmds | \
15570 old_postinstall_cmds | old_postuninstall_cmds | \
15571 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
15572 # Double-quote double-evaled strings.
15573 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
15574 ;;
15575 *)
15576 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
15577 ;;
15578 esac
15579 done
15580
15581 case $lt_echo in
15582 *'\$0 --fallback-echo"')
15583 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
15584 ;;
15585 esac
15586
15587 cfgfile="$ofile"
15588
15589 cat <<__EOF__ >> "$cfgfile"
15590 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
15591
15592 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15593
15594 # Shell to use when invoking shell scripts.
15595 SHELL=$lt_SHELL
15596
15597 # Whether or not to build shared libraries.
15598 build_libtool_libs=$enable_shared
15599
15600 # Whether or not to build static libraries.
15601 build_old_libs=$enable_static
15602
15603 # Whether or not to add -lc for building shared libraries.
15604 build_libtool_need_lc=$archive_cmds_need_lc_F77
15605
15606 # Whether or not to disallow shared libs when runtime libs are static
15607 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
15608
15609 # Whether or not to optimize for fast installation.
15610 fast_install=$enable_fast_install
15611
15612 # The host system.
15613 host_alias=$host_alias
15614 host=$host
15615 host_os=$host_os
15616
15617 # The build system.
15618 build_alias=$build_alias
15619 build=$build
15620 build_os=$build_os
15621
15622 # An echo program that does not interpret backslashes.
15623 echo=$lt_echo
15624
15625 # The archiver.
15626 AR=$lt_AR
15627 AR_FLAGS=$lt_AR_FLAGS
15628
15629 # A C compiler.
15630 LTCC=$lt_LTCC
15631
15632 # LTCC compiler flags.
15633 LTCFLAGS=$lt_LTCFLAGS
15634
15635 # A language-specific compiler.
15636 CC=$lt_compiler_F77
15637
15638 # Is the compiler the GNU C compiler?
15639 with_gcc=$GCC_F77
15640
15641 # An ERE matcher.
15642 EGREP=$lt_EGREP
15643
15644 # The linker used to build libraries.
15645 LD=$lt_LD_F77
15646
15647 # Whether we need hard or soft links.
15648 LN_S=$lt_LN_S
15649
15650 # A BSD-compatible nm program.
15651 NM=$lt_NM
15652
15653 # A symbol stripping program
15654 STRIP=$lt_STRIP
15655
15656 # Used to examine libraries when file_magic_cmd begins "file"
15657 MAGIC_CMD=$MAGIC_CMD
15658
15659 # Used on cygwin: DLL creation program.
15660 DLLTOOL="$DLLTOOL"
15661
15662 # Used on cygwin: object dumper.
15663 OBJDUMP="$OBJDUMP"
15664
15665 # Used on cygwin: assembler.
15666 AS="$AS"
15667
15668 # The name of the directory that contains temporary libtool files.
15669 objdir=$objdir
15670
15671 # How to create reloadable object files.
15672 reload_flag=$lt_reload_flag
15673 reload_cmds=$lt_reload_cmds
15674
15675 # How to pass a linker flag through the compiler.
15676 wl=$lt_lt_prog_compiler_wl_F77
15677
15678 # Object file suffix (normally "o").
15679 objext="$ac_objext"
15680
15681 # Old archive suffix (normally "a").
15682 libext="$libext"
15683
15684 # Shared library suffix (normally ".so").
15685 shrext_cmds='$shrext_cmds'
15686
15687 # Executable file suffix (normally "").
15688 exeext="$exeext"
15689
15690 # Additional compiler flags for building library objects.
15691 pic_flag=$lt_lt_prog_compiler_pic_F77
15692 pic_mode=$pic_mode
15693
15694 # What is the maximum length of a command?
15695 max_cmd_len=$lt_cv_sys_max_cmd_len
15696
15697 # Does compiler simultaneously support -c and -o options?
15698 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
15699
15700 # Must we lock files when doing compilation?
15701 need_locks=$lt_need_locks
15702
15703 # Do we need the lib prefix for modules?
15704 need_lib_prefix=$need_lib_prefix
15705
15706 # Do we need a version for libraries?
15707 need_version=$need_version
15708
15709 # Whether dlopen is supported.
15710 dlopen_support=$enable_dlopen
15711
15712 # Whether dlopen of programs is supported.
15713 dlopen_self=$enable_dlopen_self
15714
15715 # Whether dlopen of statically linked programs is supported.
15716 dlopen_self_static=$enable_dlopen_self_static
15717
15718 # Compiler flag to prevent dynamic linking.
15719 link_static_flag=$lt_lt_prog_compiler_static_F77
15720
15721 # Compiler flag to turn off builtin functions.
15722 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
15723
15724 # Compiler flag to allow reflexive dlopens.
15725 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
15726
15727 # Compiler flag to generate shared objects directly from archives.
15728 whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
15729
15730 # Compiler flag to generate thread-safe objects.
15731 thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
15732
15733 # Library versioning type.
15734 version_type=$version_type
15735
15736 # Format of library name prefix.
15737 libname_spec=$lt_libname_spec
15738
15739 # List of archive names. First name is the real one, the rest are links.
15740 # The last name is the one that the linker finds with -lNAME.
15741 library_names_spec=$lt_library_names_spec
15742
15743 # The coded name of the library, if different from the real name.
15744 soname_spec=$lt_soname_spec
15745
15746 # Commands used to build and install an old-style archive.
15747 RANLIB=$lt_RANLIB
15748 old_archive_cmds=$lt_old_archive_cmds_F77
15749 old_postinstall_cmds=$lt_old_postinstall_cmds
15750 old_postuninstall_cmds=$lt_old_postuninstall_cmds
15751
15752 # Create an old-style archive from a shared archive.
15753 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
15754
15755 # Create a temporary old-style archive to link instead of a shared archive.
15756 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
15757
15758 # Commands used to build and install a shared archive.
15759 archive_cmds=$lt_archive_cmds_F77
15760 archive_expsym_cmds=$lt_archive_expsym_cmds_F77
15761 postinstall_cmds=$lt_postinstall_cmds
15762 postuninstall_cmds=$lt_postuninstall_cmds
15763
15764 # Commands used to build a loadable module (assumed same as above if empty)
15765 module_cmds=$lt_module_cmds_F77
15766 module_expsym_cmds=$lt_module_expsym_cmds_F77
15767
15768 # Commands to strip libraries.
15769 old_striplib=$lt_old_striplib
15770 striplib=$lt_striplib
15771
15772 # Dependencies to place before the objects being linked to create a
15773 # shared library.
15774 predep_objects=$lt_predep_objects_F77
15775
15776 # Dependencies to place after the objects being linked to create a
15777 # shared library.
15778 postdep_objects=$lt_postdep_objects_F77
15779
15780 # Dependencies to place before the objects being linked to create a
15781 # shared library.
15782 predeps=$lt_predeps_F77
15783
15784 # Dependencies to place after the objects being linked to create a
15785 # shared library.
15786 postdeps=$lt_postdeps_F77
15787
15788 # The library search path used internally by the compiler when linking
15789 # a shared library.
15790 compiler_lib_search_path=$lt_compiler_lib_search_path_F77
15791
15792 # Method to check whether dependent libraries are shared objects.
15793 deplibs_check_method=$lt_deplibs_check_method
15794
15795 # Command to use when deplibs_check_method == file_magic.
15796 file_magic_cmd=$lt_file_magic_cmd
15797
15798 # Flag that allows shared libraries with undefined symbols to be built.
15799 allow_undefined_flag=$lt_allow_undefined_flag_F77
15800
15801 # Flag that forces no undefined symbols.
15802 no_undefined_flag=$lt_no_undefined_flag_F77
15803
15804 # Commands used to finish a libtool library installation in a directory.
15805 finish_cmds=$lt_finish_cmds
15806
15807 # Same as above, but a single script fragment to be evaled but not shown.
15808 finish_eval=$lt_finish_eval
15809
15810 # Take the output of nm and produce a listing of raw symbols and C names.
15811 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
15812
15813 # Transform the output of nm in a proper C declaration
15814 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
15815
15816 # Transform the output of nm in a C name address pair
15817 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
15818
15819 # This is the shared library runtime path variable.
15820 runpath_var=$runpath_var
15821
15822 # This is the shared library path variable.
15823 shlibpath_var=$shlibpath_var
15824
15825 # Is shlibpath searched before the hard-coded library search path?
15826 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
15827
15828 # How to hardcode a shared library path into an executable.
15829 hardcode_action=$hardcode_action_F77
15830
15831 # Whether we should hardcode library paths into libraries.
15832 hardcode_into_libs=$hardcode_into_libs
15833
15834 # Flag to hardcode \$libdir into a binary during linking.
15835 # This must work even if \$libdir does not exist.
15836 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
15837
15838 # If ld is used when linking, flag to hardcode \$libdir into
15839 # a binary during linking. This must work even if \$libdir does
15840 # not exist.
15841 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
15842
15843 # Whether we need a single -rpath flag with a separated argument.
15844 hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
15845
15846 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
15847 # resulting binary.
15848 hardcode_direct=$hardcode_direct_F77
15849
15850 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
15851 # resulting binary.
15852 hardcode_minus_L=$hardcode_minus_L_F77
15853
15854 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
15855 # the resulting binary.
15856 hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
15857
15858 # Set to yes if building a shared library automatically hardcodes DIR into the library
15859 # and all subsequent libraries and executables linked against it.
15860 hardcode_automatic=$hardcode_automatic_F77
15861
15862 # Variables whose values should be saved in libtool wrapper scripts and
15863 # restored at relink time.
15864 variables_saved_for_relink="$variables_saved_for_relink"
15865
15866 # Whether libtool must link a program against all its dependency libraries.
15867 link_all_deplibs=$link_all_deplibs_F77
15868
15869 # Compile-time system search path for libraries
15870 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
15871
15872 # Run-time system search path for libraries
15873 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
15874
15875 # Fix the shell variable \$srcfile for the compiler.
15876 fix_srcfile_path="$fix_srcfile_path_F77"
15877
15878 # Set to yes if exported symbols are required.
15879 always_export_symbols=$always_export_symbols_F77
15880
15881 # The commands to list exported symbols.
15882 export_symbols_cmds=$lt_export_symbols_cmds_F77
15883
15884 # The commands to extract the exported symbol list from a shared archive.
15885 extract_expsyms_cmds=$lt_extract_expsyms_cmds
15886
15887 # Symbols that should not be listed in the preloaded symbols.
15888 exclude_expsyms=$lt_exclude_expsyms_F77
15889
15890 # Symbols that must always be exported.
15891 include_expsyms=$lt_include_expsyms_F77
15892
15893 # ### END LIBTOOL TAG CONFIG: $tagname
15894
15895 __EOF__
15896
15897
15898 else
15899 # If there is no Makefile yet, we rely on a make rule to execute
15900 # `config.status --recheck' to rerun these tests and create the
15901 # libtool script then.
15902 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
15903 if test -f "$ltmain_in"; then
15904 test -f Makefile && make "$ltmain"
15905 fi
15906 fi
15907
15908
15909 ac_ext=c
15910 ac_cpp='$CPP $CPPFLAGS'
15911 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15912 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15913 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15914
15915 CC="$lt_save_CC"
15916
15917 else
15918 tagname=""
15919 fi
15920 ;;
15921
15922 GCJ)
15923 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
15924
15925
15926
15927 # Source file extension for Java test sources.
15928 ac_ext=java
15929
15930 # Object file extension for compiled Java test sources.
15931 objext=o
15932 objext_GCJ=$objext
15933
15934 # Code to be used in simple compile tests
15935 lt_simple_compile_test_code="class foo {}\n"
15936
15937 # Code to be used in simple link tests
15938 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
15939
15940 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
15941
15942 # If no C compiler was specified, use CC.
15943 LTCC=${LTCC-"$CC"}
15944
15945 # If no C compiler flags were specified, use CFLAGS.
15946 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
15947
15948 # Allow CC to be a program name with arguments.
15949 compiler=$CC
15950
15951
15952 # save warnings/boilerplate of simple test code
15953 ac_outfile=conftest.$ac_objext
15954 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
15955 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
15956 _lt_compiler_boilerplate=`cat conftest.err`
15957 $rm conftest*
15958
15959 ac_outfile=conftest.$ac_objext
15960 printf "$lt_simple_link_test_code" >conftest.$ac_ext
15961 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
15962 _lt_linker_boilerplate=`cat conftest.err`
15963 $rm conftest*
15964
15965
15966 # Allow CC to be a program name with arguments.
15967 lt_save_CC="$CC"
15968 CC=${GCJ-"gcj"}
15969 compiler=$CC
15970 compiler_GCJ=$CC
15971 for cc_temp in $compiler""; do
15972 case $cc_temp in
15973 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
15974 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
15975 \-*) ;;
15976 *) break;;
15977 esac
15978 done
15979 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
15980
15981
15982 # GCJ did not exist at the time GCC didn't implicitly link libc in.
15983 archive_cmds_need_lc_GCJ=no
15984
15985 old_archive_cmds_GCJ=$old_archive_cmds
15986
15987
15988 lt_prog_compiler_no_builtin_flag_GCJ=
15989
15990 if test "$GCC" = yes; then
15991 lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
15992
15993
15994 echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
15995 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
15996 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
15997 echo $ECHO_N "(cached) $ECHO_C" >&6
15998 else
15999 lt_cv_prog_compiler_rtti_exceptions=no
16000 ac_outfile=conftest.$ac_objext
16001 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
16002 lt_compiler_flag="-fno-rtti -fno-exceptions"
16003 # Insert the option either (1) after the last *FLAGS variable, or
16004 # (2) before a word containing "conftest.", or (3) at the end.
16005 # Note that $ac_compile itself does not contain backslashes and begins
16006 # with a dollar sign (not a hyphen), so the echo should work correctly.
16007 # The option is referenced via a variable to avoid confusing sed.
16008 lt_compile=`echo "$ac_compile" | $SED \
16009 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16010 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16011 -e 's:$: $lt_compiler_flag:'`
16012 (eval echo "\"\$as_me:16013: $lt_compile\"" >&5)
16013 (eval "$lt_compile" 2>conftest.err)
16014 ac_status=$?
16015 cat conftest.err >&5
16016 echo "$as_me:16017: \$? = $ac_status" >&5
16017 if (exit $ac_status) && test -s "$ac_outfile"; then
16018 # The compiler can only warn and ignore the option if not recognized
16019 # So say no if there are warnings other than the usual output.
16020 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
16021 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16022 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16023 lt_cv_prog_compiler_rtti_exceptions=yes
16024 fi
16025 fi
16026 $rm conftest*
16027
16028 fi
16029 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
16030 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
16031
16032 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
16033 lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
16034 else
16035 :
16036 fi
16037
16038 fi
16039
16040 lt_prog_compiler_wl_GCJ=
16041 lt_prog_compiler_pic_GCJ=
16042 lt_prog_compiler_static_GCJ=
16043
16044 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
16045 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
16046
16047 if test "$GCC" = yes; then
16048 lt_prog_compiler_wl_GCJ='-Wl,'
16049 lt_prog_compiler_static_GCJ='-static'
16050
16051 case $host_os in
16052 aix*)
16053 # All AIX code is PIC.
16054 if test "$host_cpu" = ia64; then
16055 # AIX 5 now supports IA64 processor
16056 lt_prog_compiler_static_GCJ='-Bstatic'
16057 fi
16058 ;;
16059
16060 amigaos*)
16061 # FIXME: we need at least 68020 code to build shared libraries, but
16062 # adding the `-m68020' flag to GCC prevents building anything better,
16063 # like `-m68040'.
16064 lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
16065 ;;
16066
16067 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
16068 # PIC is the default for these OSes.
16069 ;;
16070
16071 mingw* | pw32* | os2*)
16072 # This hack is so that the source file can tell whether it is being
16073 # built for inclusion in a dll (and should export symbols for example).
16074 lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
16075 ;;
16076
16077 darwin* | rhapsody*)
16078 # PIC is the default on this platform
16079 # Common symbols not allowed in MH_DYLIB files
16080 lt_prog_compiler_pic_GCJ='-fno-common'
16081 ;;
16082
16083 interix3*)
16084 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
16085 # Instead, we relocate shared libraries at runtime.
16086 ;;
16087
16088 msdosdjgpp*)
16089 # Just because we use GCC doesn't mean we suddenly get shared libraries
16090 # on systems that don't support them.
16091 lt_prog_compiler_can_build_shared_GCJ=no
16092 enable_shared=no
16093 ;;
16094
16095 sysv4*MP*)
16096 if test -d /usr/nec; then
16097 lt_prog_compiler_pic_GCJ=-Kconform_pic
16098 fi
16099 ;;
16100
16101 hpux*)
16102 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
16103 # not for PA HP-UX.
16104 case $host_cpu in
16105 hppa*64*|ia64*)
16106 # +Z the default
16107 ;;
16108 *)
16109 lt_prog_compiler_pic_GCJ='-fPIC'
16110 ;;
16111 esac
16112 ;;
16113
16114 *)
16115 lt_prog_compiler_pic_GCJ='-fPIC'
16116 ;;
16117 esac
16118 else
16119 # PORTME Check for flag to pass linker flags through the system compiler.
16120 case $host_os in
16121 aix*)
16122 lt_prog_compiler_wl_GCJ='-Wl,'
16123 if test "$host_cpu" = ia64; then
16124 # AIX 5 now supports IA64 processor
16125 lt_prog_compiler_static_GCJ='-Bstatic'
16126 else
16127 lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
16128 fi
16129 ;;
16130 darwin*)
16131 # PIC is the default on this platform
16132 # Common symbols not allowed in MH_DYLIB files
16133 case $cc_basename in
16134 xlc*)
16135 lt_prog_compiler_pic_GCJ='-qnocommon'
16136 lt_prog_compiler_wl_GCJ='-Wl,'
16137 ;;
16138 esac
16139 ;;
16140
16141 mingw* | pw32* | os2*)
16142 # This hack is so that the source file can tell whether it is being
16143 # built for inclusion in a dll (and should export symbols for example).
16144 lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
16145 ;;
16146
16147 hpux9* | hpux10* | hpux11*)
16148 lt_prog_compiler_wl_GCJ='-Wl,'
16149 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
16150 # not for PA HP-UX.
16151 case $host_cpu in
16152 hppa*64*|ia64*)
16153 # +Z the default
16154 ;;
16155 *)
16156 lt_prog_compiler_pic_GCJ='+Z'
16157 ;;
16158 esac
16159 # Is there a better lt_prog_compiler_static that works with the bundled CC?
16160 lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
16161 ;;
16162
16163 irix5* | irix6* | nonstopux*)
16164 lt_prog_compiler_wl_GCJ='-Wl,'
16165 # PIC (with -KPIC) is the default.
16166 lt_prog_compiler_static_GCJ='-non_shared'
16167 ;;
16168
16169 newsos6)
16170 lt_prog_compiler_pic_GCJ='-KPIC'
16171 lt_prog_compiler_static_GCJ='-Bstatic'
16172 ;;
16173
16174 linux*)
16175 case $cc_basename in
16176 icc* | ecc*)
16177 lt_prog_compiler_wl_GCJ='-Wl,'
16178 lt_prog_compiler_pic_GCJ='-KPIC'
16179 lt_prog_compiler_static_GCJ='-static'
16180 ;;
16181 pgcc* | pgf77* | pgf90* | pgf95*)
16182 # Portland Group compilers (*not* the Pentium gcc compiler,
16183 # which looks to be a dead project)
16184 lt_prog_compiler_wl_GCJ='-Wl,'
16185 lt_prog_compiler_pic_GCJ='-fpic'
16186 lt_prog_compiler_static_GCJ='-Bstatic'
16187 ;;
16188 ccc*)
16189 lt_prog_compiler_wl_GCJ='-Wl,'
16190 # All Alpha code is PIC.
16191 lt_prog_compiler_static_GCJ='-non_shared'
16192 ;;
16193 esac
16194 ;;
16195
16196 osf3* | osf4* | osf5*)
16197 lt_prog_compiler_wl_GCJ='-Wl,'
16198 # All OSF/1 code is PIC.
16199 lt_prog_compiler_static_GCJ='-non_shared'
16200 ;;
16201
16202 solaris*)
16203 lt_prog_compiler_pic_GCJ='-KPIC'
16204 lt_prog_compiler_static_GCJ='-Bstatic'
16205 case $cc_basename in
16206 f77* | f90* | f95*)
16207 lt_prog_compiler_wl_GCJ='-Qoption ld ';;
16208 *)
16209 lt_prog_compiler_wl_GCJ='-Wl,';;
16210 esac
16211 ;;
16212
16213 sunos4*)
16214 lt_prog_compiler_wl_GCJ='-Qoption ld '
16215 lt_prog_compiler_pic_GCJ='-PIC'
16216 lt_prog_compiler_static_GCJ='-Bstatic'
16217 ;;
16218
16219 sysv4 | sysv4.2uw2* | sysv4.3*)
16220 lt_prog_compiler_wl_GCJ='-Wl,'
16221 lt_prog_compiler_pic_GCJ='-KPIC'
16222 lt_prog_compiler_static_GCJ='-Bstatic'
16223 ;;
16224
16225 sysv4*MP*)
16226 if test -d /usr/nec ;then
16227 lt_prog_compiler_pic_GCJ='-Kconform_pic'
16228 lt_prog_compiler_static_GCJ='-Bstatic'
16229 fi
16230 ;;
16231
16232 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
16233 lt_prog_compiler_wl_GCJ='-Wl,'
16234 lt_prog_compiler_pic_GCJ='-KPIC'
16235 lt_prog_compiler_static_GCJ='-Bstatic'
16236 ;;
16237
16238 unicos*)
16239 lt_prog_compiler_wl_GCJ='-Wl,'
16240 lt_prog_compiler_can_build_shared_GCJ=no
16241 ;;
16242
16243 uts4*)
16244 lt_prog_compiler_pic_GCJ='-pic'
16245 lt_prog_compiler_static_GCJ='-Bstatic'
16246 ;;
16247
16248 *)
16249 lt_prog_compiler_can_build_shared_GCJ=no
16250 ;;
16251 esac
16252 fi
16253
16254 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
16255 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6
16256
16257 #
16258 # Check to make sure the PIC flag actually works.
16259 #
16260 if test -n "$lt_prog_compiler_pic_GCJ"; then
16261
16262 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
16263 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6
16264 if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
16265 echo $ECHO_N "(cached) $ECHO_C" >&6
16266 else
16267 lt_prog_compiler_pic_works_GCJ=no
16268 ac_outfile=conftest.$ac_objext
16269 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
16270 lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
16271 # Insert the option either (1) after the last *FLAGS variable, or
16272 # (2) before a word containing "conftest.", or (3) at the end.
16273 # Note that $ac_compile itself does not contain backslashes and begins
16274 # with a dollar sign (not a hyphen), so the echo should work correctly.
16275 # The option is referenced via a variable to avoid confusing sed.
16276 lt_compile=`echo "$ac_compile" | $SED \
16277 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16278 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16279 -e 's:$: $lt_compiler_flag:'`
16280 (eval echo "\"\$as_me:16281: $lt_compile\"" >&5)
16281 (eval "$lt_compile" 2>conftest.err)
16282 ac_status=$?
16283 cat conftest.err >&5
16284 echo "$as_me:16285: \$? = $ac_status" >&5
16285 if (exit $ac_status) && test -s "$ac_outfile"; then
16286 # The compiler can only warn and ignore the option if not recognized
16287 # So say no if there are warnings other than the usual output.
16288 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
16289 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16290 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16291 lt_prog_compiler_pic_works_GCJ=yes
16292 fi
16293 fi
16294 $rm conftest*
16295
16296 fi
16297 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
16298 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6
16299
16300 if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
16301 case $lt_prog_compiler_pic_GCJ in
16302 "" | " "*) ;;
16303 *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
16304 esac
16305 else
16306 lt_prog_compiler_pic_GCJ=
16307 lt_prog_compiler_can_build_shared_GCJ=no
16308 fi
16309
16310 fi
16311 case $host_os in
16312 # For platforms which do not support PIC, -DPIC is meaningless:
16313 *djgpp*)
16314 lt_prog_compiler_pic_GCJ=
16315 ;;
16316 *)
16317 lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
16318 ;;
16319 esac
16320
16321 #
16322 # Check to make sure the static flag actually works.
16323 #
16324 wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
16325 echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
16326 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
16327 if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then
16328 echo $ECHO_N "(cached) $ECHO_C" >&6
16329 else
16330 lt_prog_compiler_static_works_GCJ=no
16331 save_LDFLAGS="$LDFLAGS"
16332 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
16333 printf "$lt_simple_link_test_code" > conftest.$ac_ext
16334 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
16335 # The linker can only warn and ignore the option if not recognized
16336 # So say no if there are warnings
16337 if test -s conftest.err; then
16338 # Append any errors to the config.log.
16339 cat conftest.err 1>&5
16340 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
16341 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16342 if diff conftest.exp conftest.er2 >/dev/null; then
16343 lt_prog_compiler_static_works_GCJ=yes
16344 fi
16345 else
16346 lt_prog_compiler_static_works_GCJ=yes
16347 fi
16348 fi
16349 $rm conftest*
16350 LDFLAGS="$save_LDFLAGS"
16351
16352 fi
16353 echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5
16354 echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6
16355
16356 if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then
16357 :
16358 else
16359 lt_prog_compiler_static_GCJ=
16360 fi
16361
16362
16363 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
16364 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
16365 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
16366 echo $ECHO_N "(cached) $ECHO_C" >&6
16367 else
16368 lt_cv_prog_compiler_c_o_GCJ=no
16369 $rm -r conftest 2>/dev/null
16370 mkdir conftest
16371 cd conftest
16372 mkdir out
16373 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
16374
16375 lt_compiler_flag="-o out/conftest2.$ac_objext"
16376 # Insert the option either (1) after the last *FLAGS variable, or
16377 # (2) before a word containing "conftest.", or (3) at the end.
16378 # Note that $ac_compile itself does not contain backslashes and begins
16379 # with a dollar sign (not a hyphen), so the echo should work correctly.
16380 lt_compile=`echo "$ac_compile" | $SED \
16381 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16382 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16383 -e 's:$: $lt_compiler_flag:'`
16384 (eval echo "\"\$as_me:16385: $lt_compile\"" >&5)
16385 (eval "$lt_compile" 2>out/conftest.err)
16386 ac_status=$?
16387 cat out/conftest.err >&5
16388 echo "$as_me:16389: \$? = $ac_status" >&5
16389 if (exit $ac_status) && test -s out/conftest2.$ac_objext
16390 then
16391 # The compiler can only warn and ignore the option if not recognized
16392 # So say no if there are warnings
16393 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
16394 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
16395 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
16396 lt_cv_prog_compiler_c_o_GCJ=yes
16397 fi
16398 fi
16399 chmod u+w . 2>&5
16400 $rm conftest*
16401 # SGI C++ compiler will create directory out/ii_files/ for
16402 # template instantiation
16403 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
16404 $rm out/* && rmdir out
16405 cd ..
16406 rmdir conftest
16407 $rm conftest*
16408
16409 fi
16410 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
16411 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6
16412
16413
16414 hard_links="nottested"
16415 if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
16416 # do not overwrite the value of need_locks provided by the user
16417 echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
16418 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
16419 hard_links=yes
16420 $rm conftest*
16421 ln conftest.a conftest.b 2>/dev/null && hard_links=no
16422 touch conftest.a
16423 ln conftest.a conftest.b 2>&5 || hard_links=no
16424 ln conftest.a conftest.b 2>/dev/null && hard_links=no
16425 echo "$as_me:$LINENO: result: $hard_links" >&5
16426 echo "${ECHO_T}$hard_links" >&6
16427 if test "$hard_links" = no; then
16428 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
16429 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
16430 need_locks=warn
16431 fi
16432 else
16433 need_locks=no
16434 fi
16435
16436 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
16437 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
16438
16439 runpath_var=
16440 allow_undefined_flag_GCJ=
16441 enable_shared_with_static_runtimes_GCJ=no
16442 archive_cmds_GCJ=
16443 archive_expsym_cmds_GCJ=
16444 old_archive_From_new_cmds_GCJ=
16445 old_archive_from_expsyms_cmds_GCJ=
16446 export_dynamic_flag_spec_GCJ=
16447 whole_archive_flag_spec_GCJ=
16448 thread_safe_flag_spec_GCJ=
16449 hardcode_libdir_flag_spec_GCJ=
16450 hardcode_libdir_flag_spec_ld_GCJ=
16451 hardcode_libdir_separator_GCJ=
16452 hardcode_direct_GCJ=no
16453 hardcode_minus_L_GCJ=no
16454 hardcode_shlibpath_var_GCJ=unsupported
16455 link_all_deplibs_GCJ=unknown
16456 hardcode_automatic_GCJ=no
16457 module_cmds_GCJ=
16458 module_expsym_cmds_GCJ=
16459 always_export_symbols_GCJ=no
16460 export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
16461 # include_expsyms should be a list of space-separated symbols to be *always*
16462 # included in the symbol list
16463 include_expsyms_GCJ=
16464 # exclude_expsyms can be an extended regexp of symbols to exclude
16465 # it will be wrapped by ` (' and `)$', so one must not match beginning or
16466 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
16467 # as well as any symbol that contains `d'.
16468 exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
16469 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
16470 # platforms (ab)use it in PIC code, but their linkers get confused if
16471 # the symbol is explicitly referenced. Since portable code cannot
16472 # rely on this symbol name, it's probably fine to never include it in
16473 # preloaded symbol tables.
16474 extract_expsyms_cmds=
16475 # Just being paranoid about ensuring that cc_basename is set.
16476 for cc_temp in $compiler""; do
16477 case $cc_temp in
16478 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
16479 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
16480 \-*) ;;
16481 *) break;;
16482 esac
16483 done
16484 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
16485
16486 case $host_os in
16487 cygwin* | mingw* | pw32*)
16488 # FIXME: the MSVC++ port hasn't been tested in a loooong time
16489 # When not using gcc, we currently assume that we are using
16490 # Microsoft Visual C++.
16491 if test "$GCC" != yes; then
16492 with_gnu_ld=no
16493 fi
16494 ;;
16495 interix*)
16496 # we just hope/assume this is gcc and not c89 (= MSVC++)
16497 with_gnu_ld=yes
16498 ;;
16499 openbsd*)
16500 with_gnu_ld=no
16501 ;;
16502 esac
16503
16504 ld_shlibs_GCJ=yes
16505 if test "$with_gnu_ld" = yes; then
16506 # If archive_cmds runs LD, not CC, wlarc should be empty
16507 wlarc='${wl}'
16508
16509 # Set some defaults for GNU ld with shared library support. These
16510 # are reset later if shared libraries are not supported. Putting them
16511 # here allows them to be overridden if necessary.
16512 runpath_var=LD_RUN_PATH
16513 hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
16514 export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
16515 # ancient GNU ld didn't support --whole-archive et. al.
16516 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
16517 whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
16518 else
16519 whole_archive_flag_spec_GCJ=
16520 fi
16521 supports_anon_versioning=no
16522 case `$LD -v 2>/dev/null` in
16523 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
16524 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
16525 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
16526 *\ 2.11.*) ;; # other 2.11 versions
16527 *) supports_anon_versioning=yes ;;
16528 esac
16529
16530 # See if GNU ld supports shared libraries.
16531 case $host_os in
16532 aix3* | aix4* | aix5*)
16533 # On AIX/PPC, the GNU linker is very broken
16534 if test "$host_cpu" != ia64; then
16535 ld_shlibs_GCJ=no
16536 cat <<EOF 1>&2
16537
16538 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
16539 *** to be unable to reliably create shared libraries on AIX.
16540 *** Therefore, libtool is disabling shared libraries support. If you
16541 *** really care for shared libraries, you may want to modify your PATH
16542 *** so that a non-GNU linker is found, and then restart.
16543
16544 EOF
16545 fi
16546 ;;
16547
16548 amigaos*)
16549 archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
16550 hardcode_libdir_flag_spec_GCJ='-L$libdir'
16551 hardcode_minus_L_GCJ=yes
16552
16553 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
16554 # that the semantics of dynamic libraries on AmigaOS, at least up
16555 # to version 4, is to share data among multiple programs linked
16556 # with the same dynamic library. Since this doesn't match the
16557 # behavior of shared libraries on other platforms, we can't use
16558 # them.
16559 ld_shlibs_GCJ=no
16560 ;;
16561
16562 beos*)
16563 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
16564 allow_undefined_flag_GCJ=unsupported
16565 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
16566 # support --undefined. This deserves some investigation. FIXME
16567 archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
16568 else
16569 ld_shlibs_GCJ=no
16570 fi
16571 ;;
16572
16573 cygwin* | mingw* | pw32*)
16574 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
16575 # as there is no search path for DLLs.
16576 hardcode_libdir_flag_spec_GCJ='-L$libdir'
16577 allow_undefined_flag_GCJ=unsupported
16578 always_export_symbols_GCJ=no
16579 enable_shared_with_static_runtimes_GCJ=yes
16580 export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
16581
16582 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
16583 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
16584 # If the export-symbols file already is a .def file (1st line
16585 # is EXPORTS), use it as is; otherwise, prepend...
16586 archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
16587 cp $export_symbols $output_objdir/$soname.def;
16588 else
16589 echo EXPORTS > $output_objdir/$soname.def;
16590 cat $export_symbols >> $output_objdir/$soname.def;
16591 fi~
16592 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
16593 else
16594 ld_shlibs_GCJ=no
16595 fi
16596 ;;
16597
16598 interix3*)
16599 hardcode_direct_GCJ=no
16600 hardcode_shlibpath_var_GCJ=no
16601 hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
16602 export_dynamic_flag_spec_GCJ='${wl}-E'
16603 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
16604 # Instead, shared libraries are loaded at an image base (0x10000000 by
16605 # default) and relocated if they conflict, which is a slow very memory
16606 # consuming and fragmenting process. To avoid this, we pick a random,
16607 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
16608 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
16609 archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
16610 archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
16611 ;;
16612
16613 linux*)
16614 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
16615 tmp_addflag=
16616 case $cc_basename,$host_cpu in
16617 pgcc*) # Portland Group C compiler
16618 whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
16619 tmp_addflag=' $pic_flag'
16620 ;;
16621 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
16622 whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
16623 tmp_addflag=' $pic_flag -Mnomain' ;;
16624 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
16625 tmp_addflag=' -i_dynamic' ;;
16626 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
16627 tmp_addflag=' -i_dynamic -nofor_main' ;;
16628 ifc* | ifort*) # Intel Fortran compiler
16629 tmp_addflag=' -nofor_main' ;;
16630 esac
16631 archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
16632
16633 if test $supports_anon_versioning = yes; then
16634 archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
16635 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
16636 $echo "local: *; };" >> $output_objdir/$libname.ver~
16637 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
16638 fi
16639 link_all_deplibs_GCJ=no
16640 else
16641 ld_shlibs_GCJ=no
16642 fi
16643 ;;
16644
16645 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
16646 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
16647 archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
16648 wlarc=
16649 else
16650 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
16651 archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
16652 fi
16653 ;;
16654
16655 solaris*)
16656 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
16657 ld_shlibs_GCJ=no
16658 cat <<EOF 1>&2
16659
16660 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
16661 *** create shared libraries on Solaris systems. Therefore, libtool
16662 *** is disabling shared libraries support. We urge you to upgrade GNU
16663 *** binutils to release 2.9.1 or newer. Another option is to modify
16664 *** your PATH or compiler configuration so that the native linker is
16665 *** used, and then restart.
16666
16667 EOF
16668 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
16669 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
16670 archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
16671 else
16672 ld_shlibs_GCJ=no
16673 fi
16674 ;;
16675
16676 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
16677 case `$LD -v 2>&1` in
16678 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
16679 ld_shlibs_GCJ=no
16680 cat <<_LT_EOF 1>&2
16681
16682 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
16683 *** reliably create shared libraries on SCO systems. Therefore, libtool
16684 *** is disabling shared libraries support. We urge you to upgrade GNU
16685 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
16686 *** your PATH or compiler configuration so that the native linker is
16687 *** used, and then restart.
16688
16689 _LT_EOF
16690 ;;
16691 *)
16692 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
16693 hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
16694 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
16695 archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
16696 else
16697 ld_shlibs_GCJ=no
16698 fi
16699 ;;
16700 esac
16701 ;;
16702
16703 sunos4*)
16704 archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
16705 wlarc=
16706 hardcode_direct_GCJ=yes
16707 hardcode_shlibpath_var_GCJ=no
16708 ;;
16709
16710 *)
16711 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
16712 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
16713 archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
16714 else
16715 ld_shlibs_GCJ=no
16716 fi
16717 ;;
16718 esac
16719
16720 if test "$ld_shlibs_GCJ" = no; then
16721 runpath_var=
16722 hardcode_libdir_flag_spec_GCJ=
16723 export_dynamic_flag_spec_GCJ=
16724 whole_archive_flag_spec_GCJ=
16725 fi
16726 else
16727 # PORTME fill in a description of your system's linker (not GNU ld)
16728 case $host_os in
16729 aix3*)
16730 allow_undefined_flag_GCJ=unsupported
16731 always_export_symbols_GCJ=yes
16732 archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
16733 # Note: this linker hardcodes the directories in LIBPATH if there
16734 # are no directories specified by -L.
16735 hardcode_minus_L_GCJ=yes
16736 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
16737 # Neither direct hardcoding nor static linking is supported with a
16738 # broken collect2.
16739 hardcode_direct_GCJ=unsupported
16740 fi
16741 ;;
16742
16743 aix4* | aix5*)
16744 if test "$host_cpu" = ia64; then
16745 # On IA64, the linker does run time linking by default, so we don't
16746 # have to do anything special.
16747 aix_use_runtimelinking=no
16748 exp_sym_flag='-Bexport'
16749 no_entry_flag=""
16750 else
16751 # If we're using GNU nm, then we don't want the "-C" option.
16752 # -C means demangle to AIX nm, but means don't demangle with GNU nm
16753 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
16754 export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
16755 else
16756 export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
16757 fi
16758 aix_use_runtimelinking=no
16759
16760 # Test if we are trying to use run time linking or normal
16761 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
16762 # need to do runtime linking.
16763 case $host_os in aix4.[23]|aix4.[23].*|aix5*)
16764 for ld_flag in $LDFLAGS; do
16765 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
16766 aix_use_runtimelinking=yes
16767 break
16768 fi
16769 done
16770 ;;
16771 esac
16772
16773 exp_sym_flag='-bexport'
16774 no_entry_flag='-bnoentry'
16775 fi
16776
16777 # When large executables or shared objects are built, AIX ld can
16778 # have problems creating the table of contents. If linking a library
16779 # or program results in "error TOC overflow" add -mminimal-toc to
16780 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
16781 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
16782
16783 archive_cmds_GCJ=''
16784 hardcode_direct_GCJ=yes
16785 hardcode_libdir_separator_GCJ=':'
16786 link_all_deplibs_GCJ=yes
16787
16788 if test "$GCC" = yes; then
16789 case $host_os in aix4.[012]|aix4.[012].*)
16790 # We only want to do this on AIX 4.2 and lower, the check
16791 # below for broken collect2 doesn't work under 4.3+
16792 collect2name=`${CC} -print-prog-name=collect2`
16793 if test -f "$collect2name" && \
16794 strings "$collect2name" | grep resolve_lib_name >/dev/null
16795 then
16796 # We have reworked collect2
16797 hardcode_direct_GCJ=yes
16798 else
16799 # We have old collect2
16800 hardcode_direct_GCJ=unsupported
16801 # It fails to find uninstalled libraries when the uninstalled
16802 # path is not listed in the libpath. Setting hardcode_minus_L
16803 # to unsupported forces relinking
16804 hardcode_minus_L_GCJ=yes
16805 hardcode_libdir_flag_spec_GCJ='-L$libdir'
16806 hardcode_libdir_separator_GCJ=
16807 fi
16808 ;;
16809 esac
16810 shared_flag='-shared'
16811 if test "$aix_use_runtimelinking" = yes; then
16812 shared_flag="$shared_flag "'${wl}-G'
16813 fi
16814 else
16815 # not using gcc
16816 if test "$host_cpu" = ia64; then
16817 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
16818 # chokes on -Wl,-G. The following line is correct:
16819 shared_flag='-G'
16820 else
16821 if test "$aix_use_runtimelinking" = yes; then
16822 shared_flag='${wl}-G'
16823 else
16824 shared_flag='${wl}-bM:SRE'
16825 fi
16826 fi
16827 fi
16828
16829 # It seems that -bexpall does not export symbols beginning with
16830 # underscore (_), so it is better to generate a list of symbols to export.
16831 always_export_symbols_GCJ=yes
16832 if test "$aix_use_runtimelinking" = yes; then
16833 # Warning - without using the other runtime loading flags (-brtl),
16834 # -berok will link without error, but may produce a broken library.
16835 allow_undefined_flag_GCJ='-berok'
16836 # Determine the default libpath from the value encoded in an empty executable.
16837 cat >conftest.$ac_ext <<_ACEOF
16838 /* confdefs.h. */
16839 _ACEOF
16840 cat confdefs.h >>conftest.$ac_ext
16841 cat >>conftest.$ac_ext <<_ACEOF
16842 /* end confdefs.h. */
16843
16844 int
16845 main ()
16846 {
16847
16848 ;
16849 return 0;
16850 }
16851 _ACEOF
16852 rm -f conftest.$ac_objext conftest$ac_exeext
16853 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16854 (eval $ac_link) 2>conftest.er1
16855 ac_status=$?
16856 grep -v '^ *+' conftest.er1 >conftest.err
16857 rm -f conftest.er1
16858 cat conftest.err >&5
16859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16860 (exit $ac_status); } &&
16861 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16863 (eval $ac_try) 2>&5
16864 ac_status=$?
16865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16866 (exit $ac_status); }; } &&
16867 { ac_try='test -s conftest$ac_exeext'
16868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16869 (eval $ac_try) 2>&5
16870 ac_status=$?
16871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16872 (exit $ac_status); }; }; then
16873
16874 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
16875 }'`
16876 # Check for a 64-bit object if we didn't find anything.
16877 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
16878 }'`; fi
16879 else
16880 echo "$as_me: failed program was:" >&5
16881 sed 's/^/| /' conftest.$ac_ext >&5
16882
16883 fi
16884 rm -f conftest.err conftest.$ac_objext \
16885 conftest$ac_exeext conftest.$ac_ext
16886 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
16887
16888 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
16889 archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
16890 else
16891 if test "$host_cpu" = ia64; then
16892 hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
16893 allow_undefined_flag_GCJ="-z nodefs"
16894 archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
16895 else
16896 # Determine the default libpath from the value encoded in an empty executable.
16897 cat >conftest.$ac_ext <<_ACEOF
16898 /* confdefs.h. */
16899 _ACEOF
16900 cat confdefs.h >>conftest.$ac_ext
16901 cat >>conftest.$ac_ext <<_ACEOF
16902 /* end confdefs.h. */
16903
16904 int
16905 main ()
16906 {
16907
16908 ;
16909 return 0;
16910 }
16911 _ACEOF
16912 rm -f conftest.$ac_objext conftest$ac_exeext
16913 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16914 (eval $ac_link) 2>conftest.er1
16915 ac_status=$?
16916 grep -v '^ *+' conftest.er1 >conftest.err
16917 rm -f conftest.er1
16918 cat conftest.err >&5
16919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16920 (exit $ac_status); } &&
16921 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16923 (eval $ac_try) 2>&5
16924 ac_status=$?
16925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16926 (exit $ac_status); }; } &&
16927 { ac_try='test -s conftest$ac_exeext'
16928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16929 (eval $ac_try) 2>&5
16930 ac_status=$?
16931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16932 (exit $ac_status); }; }; then
16933
16934 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
16935 }'`
16936 # Check for a 64-bit object if we didn't find anything.
16937 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
16938 }'`; fi
16939 else
16940 echo "$as_me: failed program was:" >&5
16941 sed 's/^/| /' conftest.$ac_ext >&5
16942
16943 fi
16944 rm -f conftest.err conftest.$ac_objext \
16945 conftest$ac_exeext conftest.$ac_ext
16946 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
16947
16948 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
16949 # Warning - without using the other run time loading flags,
16950 # -berok will link without error, but may produce a broken library.
16951 no_undefined_flag_GCJ=' ${wl}-bernotok'
16952 allow_undefined_flag_GCJ=' ${wl}-berok'
16953 # Exported symbols can be pulled into shared objects from archives
16954 whole_archive_flag_spec_GCJ='$convenience'
16955 archive_cmds_need_lc_GCJ=yes
16956 # This is similar to how AIX traditionally builds its shared libraries.
16957 archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
16958 fi
16959 fi
16960 ;;
16961
16962 amigaos*)
16963 archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
16964 hardcode_libdir_flag_spec_GCJ='-L$libdir'
16965 hardcode_minus_L_GCJ=yes
16966 # see comment about different semantics on the GNU ld section
16967 ld_shlibs_GCJ=no
16968 ;;
16969
16970 bsdi[45]*)
16971 export_dynamic_flag_spec_GCJ=-rdynamic
16972 ;;
16973
16974 cygwin* | mingw* | pw32*)
16975 # When not using gcc, we currently assume that we are using
16976 # Microsoft Visual C++.
16977 # hardcode_libdir_flag_spec is actually meaningless, as there is
16978 # no search path for DLLs.
16979 hardcode_libdir_flag_spec_GCJ=' '
16980 allow_undefined_flag_GCJ=unsupported
16981 # Tell ltmain to make .lib files, not .a files.
16982 libext=lib
16983 # Tell ltmain to make .dll files, not .so files.
16984 shrext_cmds=".dll"
16985 # FIXME: Setting linknames here is a bad hack.
16986 archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
16987 # The linker will automatically build a .lib file if we build a DLL.
16988 old_archive_From_new_cmds_GCJ='true'
16989 # FIXME: Should let the user specify the lib program.
16990 old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
16991 fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
16992 enable_shared_with_static_runtimes_GCJ=yes
16993 ;;
16994
16995 darwin* | rhapsody*)
16996 case $host_os in
16997 rhapsody* | darwin1.[012])
16998 allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
16999 ;;
17000 *) # Darwin 1.3 on
17001 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
17002 allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
17003 else
17004 case ${MACOSX_DEPLOYMENT_TARGET} in
17005 10.[012])
17006 allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
17007 ;;
17008 10.*)
17009 allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
17010 ;;
17011 esac
17012 fi
17013 ;;
17014 esac
17015 archive_cmds_need_lc_GCJ=no
17016 hardcode_direct_GCJ=no
17017 hardcode_automatic_GCJ=yes
17018 hardcode_shlibpath_var_GCJ=unsupported
17019 whole_archive_flag_spec_GCJ=''
17020 link_all_deplibs_GCJ=yes
17021 if test "$GCC" = yes ; then
17022 output_verbose_link_cmd='echo'
17023 archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
17024 module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
17025 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
17026 archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
17027 module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
17028 else
17029 case $cc_basename in
17030 xlc*)
17031 output_verbose_link_cmd='echo'
17032 archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
17033 module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
17034 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
17035 archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
17036 module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
17037 ;;
17038 *)
17039 ld_shlibs_GCJ=no
17040 ;;
17041 esac
17042 fi
17043 ;;
17044
17045 dgux*)
17046 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17047 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17048 hardcode_shlibpath_var_GCJ=no
17049 ;;
17050
17051 freebsd1*)
17052 ld_shlibs_GCJ=no
17053 ;;
17054
17055 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
17056 # support. Future versions do this automatically, but an explicit c++rt0.o
17057 # does not break anything, and helps significantly (at the cost of a little
17058 # extra space).
17059 freebsd2.2*)
17060 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
17061 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17062 hardcode_direct_GCJ=yes
17063 hardcode_shlibpath_var_GCJ=no
17064 ;;
17065
17066 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
17067 freebsd2*)
17068 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17069 hardcode_direct_GCJ=yes
17070 hardcode_minus_L_GCJ=yes
17071 hardcode_shlibpath_var_GCJ=no
17072 ;;
17073
17074 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
17075 freebsd* | dragonfly*)
17076 archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
17077 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17078 hardcode_direct_GCJ=yes
17079 hardcode_shlibpath_var_GCJ=no
17080 ;;
17081
17082 # GNU/kFreeBSD uses gcc -shared to do shared libraries.
17083 kfreebsd*-gnu)
17084 archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
17085 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17086 hardcode_direct_GCJ=yes
17087 hardcode_shlibpath_var_GCJ=no
17088 link_all_deplibs_GCJ=no
17089 ;;
17090
17091 hpux9*)
17092 if test "$GCC" = yes; then
17093 archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
17094 else
17095 archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
17096 fi
17097 hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
17098 hardcode_libdir_separator_GCJ=:
17099 hardcode_direct_GCJ=yes
17100
17101 # hardcode_minus_L: Not really in the search PATH,
17102 # but as the default location of the library.
17103 hardcode_minus_L_GCJ=yes
17104 export_dynamic_flag_spec_GCJ='${wl}-E'
17105 ;;
17106
17107 hpux10*)
17108 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
17109 archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17110 else
17111 archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
17112 fi
17113 if test "$with_gnu_ld" = no; then
17114 hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
17115 hardcode_libdir_separator_GCJ=:
17116
17117 hardcode_direct_GCJ=yes
17118 export_dynamic_flag_spec_GCJ='${wl}-E'
17119
17120 # hardcode_minus_L: Not really in the search PATH,
17121 # but as the default location of the library.
17122 hardcode_minus_L_GCJ=yes
17123 fi
17124 ;;
17125
17126 hpux11*)
17127 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
17128 case $host_cpu in
17129 hppa*64*)
17130 archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17131 ;;
17132 ia64*)
17133 archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17134 ;;
17135 *)
17136 archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17137 ;;
17138 esac
17139 else
17140 case $host_cpu in
17141 hppa*64*)
17142 archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17143 ;;
17144 ia64*)
17145 archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17146 ;;
17147 *)
17148 archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17149 ;;
17150 esac
17151 fi
17152 if test "$with_gnu_ld" = no; then
17153 hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
17154 hardcode_libdir_separator_GCJ=:
17155
17156 case $host_cpu in
17157 hppa*64*|ia64*)
17158 hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
17159 hardcode_direct_GCJ=no
17160 hardcode_shlibpath_var_GCJ=no
17161 ;;
17162 *)
17163 hardcode_direct_GCJ=yes
17164 export_dynamic_flag_spec_GCJ='${wl}-E'
17165
17166 # hardcode_minus_L: Not really in the search PATH,
17167 # but as the default location of the library.
17168 hardcode_minus_L_GCJ=yes
17169 ;;
17170 esac
17171 fi
17172 ;;
17173
17174 irix5* | irix6* | nonstopux*)
17175 if test "$GCC" = yes; then
17176 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
17177 else
17178 archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
17179 hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
17180 fi
17181 hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
17182 hardcode_libdir_separator_GCJ=:
17183 link_all_deplibs_GCJ=yes
17184 ;;
17185
17186 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
17187 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
17188 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
17189 else
17190 archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
17191 fi
17192 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17193 hardcode_direct_GCJ=yes
17194 hardcode_shlibpath_var_GCJ=no
17195 ;;
17196
17197 newsos6)
17198 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17199 hardcode_direct_GCJ=yes
17200 hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
17201 hardcode_libdir_separator_GCJ=:
17202 hardcode_shlibpath_var_GCJ=no
17203 ;;
17204
17205 openbsd*)
17206 hardcode_direct_GCJ=yes
17207 hardcode_shlibpath_var_GCJ=no
17208 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
17209 archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17210 archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
17211 hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
17212 export_dynamic_flag_spec_GCJ='${wl}-E'
17213 else
17214 case $host_os in
17215 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
17216 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17217 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17218 ;;
17219 *)
17220 archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17221 hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
17222 ;;
17223 esac
17224 fi
17225 ;;
17226
17227 os2*)
17228 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17229 hardcode_minus_L_GCJ=yes
17230 allow_undefined_flag_GCJ=unsupported
17231 archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
17232 old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
17233 ;;
17234
17235 osf3*)
17236 if test "$GCC" = yes; then
17237 allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
17238 archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
17239 else
17240 allow_undefined_flag_GCJ=' -expect_unresolved \*'
17241 archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
17242 fi
17243 hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
17244 hardcode_libdir_separator_GCJ=:
17245 ;;
17246
17247 osf4* | osf5*) # as osf3* with the addition of -msym flag
17248 if test "$GCC" = yes; then
17249 allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
17250 archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
17251 hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
17252 else
17253 allow_undefined_flag_GCJ=' -expect_unresolved \*'
17254 archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
17255 archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
17256 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
17257
17258 # Both c and cxx compiler support -rpath directly
17259 hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
17260 fi
17261 hardcode_libdir_separator_GCJ=:
17262 ;;
17263
17264 solaris*)
17265 no_undefined_flag_GCJ=' -z text'
17266 if test "$GCC" = yes; then
17267 wlarc='${wl}'
17268 archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17269 archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
17270 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
17271 else
17272 wlarc=''
17273 archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
17274 archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
17275 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
17276 fi
17277 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17278 hardcode_shlibpath_var_GCJ=no
17279 case $host_os in
17280 solaris2.[0-5] | solaris2.[0-5].*) ;;
17281 *)
17282 # The compiler driver will combine linker options so we
17283 # cannot just pass the convience library names through
17284 # without $wl, iff we do not link with $LD.
17285 # Luckily, gcc supports the same syntax we need for Sun Studio.
17286 # Supported since Solaris 2.6 (maybe 2.5.1?)
17287 case $wlarc in
17288 '')
17289 whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
17290 *)
17291 whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
17292 esac ;;
17293 esac
17294 link_all_deplibs_GCJ=yes
17295 ;;
17296
17297 sunos4*)
17298 if test "x$host_vendor" = xsequent; then
17299 # Use $CC to link under sequent, because it throws in some extra .o
17300 # files that make .init and .fini sections work.
17301 archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
17302 else
17303 archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
17304 fi
17305 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17306 hardcode_direct_GCJ=yes
17307 hardcode_minus_L_GCJ=yes
17308 hardcode_shlibpath_var_GCJ=no
17309 ;;
17310
17311 sysv4)
17312 case $host_vendor in
17313 sni)
17314 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17315 hardcode_direct_GCJ=yes # is this really true???
17316 ;;
17317 siemens)
17318 ## LD is ld it makes a PLAMLIB
17319 ## CC just makes a GrossModule.
17320 archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
17321 reload_cmds_GCJ='$CC -r -o $output$reload_objs'
17322 hardcode_direct_GCJ=no
17323 ;;
17324 motorola)
17325 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17326 hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
17327 ;;
17328 esac
17329 runpath_var='LD_RUN_PATH'
17330 hardcode_shlibpath_var_GCJ=no
17331 ;;
17332
17333 sysv4.3*)
17334 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17335 hardcode_shlibpath_var_GCJ=no
17336 export_dynamic_flag_spec_GCJ='-Bexport'
17337 ;;
17338
17339 sysv4*MP*)
17340 if test -d /usr/nec; then
17341 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17342 hardcode_shlibpath_var_GCJ=no
17343 runpath_var=LD_RUN_PATH
17344 hardcode_runpath_var=yes
17345 ld_shlibs_GCJ=yes
17346 fi
17347 ;;
17348
17349 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
17350 no_undefined_flag_GCJ='${wl}-z,text'
17351 archive_cmds_need_lc_GCJ=no
17352 hardcode_shlibpath_var_GCJ=no
17353 runpath_var='LD_RUN_PATH'
17354
17355 if test "$GCC" = yes; then
17356 archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17357 archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17358 else
17359 archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17360 archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17361 fi
17362 ;;
17363
17364 sysv5* | sco3.2v5* | sco5v6*)
17365 # Note: We can NOT use -z defs as we might desire, because we do not
17366 # link with -lc, and that would cause any symbols used from libc to
17367 # always be unresolved, which means just about no library would
17368 # ever link correctly. If we're not using GNU ld we use -z text
17369 # though, which does catch some bad symbols but isn't as heavy-handed
17370 # as -z defs.
17371 no_undefined_flag_GCJ='${wl}-z,text'
17372 allow_undefined_flag_GCJ='${wl}-z,nodefs'
17373 archive_cmds_need_lc_GCJ=no
17374 hardcode_shlibpath_var_GCJ=no
17375 hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
17376 hardcode_libdir_separator_GCJ=':'
17377 link_all_deplibs_GCJ=yes
17378 export_dynamic_flag_spec_GCJ='${wl}-Bexport'
17379 runpath_var='LD_RUN_PATH'
17380
17381 if test "$GCC" = yes; then
17382 archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
17383 archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
17384 else
17385 archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
17386 archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
17387 fi
17388 ;;
17389
17390 uts4*)
17391 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17392 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17393 hardcode_shlibpath_var_GCJ=no
17394 ;;
17395
17396 *)
17397 ld_shlibs_GCJ=no
17398 ;;
17399 esac
17400 fi
17401
17402 echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
17403 echo "${ECHO_T}$ld_shlibs_GCJ" >&6
17404 test "$ld_shlibs_GCJ" = no && can_build_shared=no
17405
17406 #
17407 # Do we need to explicitly link libc?
17408 #
17409 case "x$archive_cmds_need_lc_GCJ" in
17410 x|xyes)
17411 # Assume -lc should be added
17412 archive_cmds_need_lc_GCJ=yes
17413
17414 if test "$enable_shared" = yes && test "$GCC" = yes; then
17415 case $archive_cmds_GCJ in
17416 *'~'*)
17417 # FIXME: we may have to deal with multi-command sequences.
17418 ;;
17419 '$CC '*)
17420 # Test whether the compiler implicitly links with -lc since on some
17421 # systems, -lgcc has to come before -lc. If gcc already passes -lc
17422 # to ld, don't add -lc before -lgcc.
17423 echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
17424 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
17425 $rm conftest*
17426 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
17427
17428 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17429 (eval $ac_compile) 2>&5
17430 ac_status=$?
17431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17432 (exit $ac_status); } 2>conftest.err; then
17433 soname=conftest
17434 lib=conftest
17435 libobjs=conftest.$ac_objext
17436 deplibs=
17437 wl=$lt_prog_compiler_wl_GCJ
17438 pic_flag=$lt_prog_compiler_pic_GCJ
17439 compiler_flags=-v
17440 linker_flags=-v
17441 verstring=
17442 output_objdir=.
17443 libname=conftest
17444 lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
17445 allow_undefined_flag_GCJ=
17446 if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
17447 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
17448 ac_status=$?
17449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17450 (exit $ac_status); }
17451 then
17452 archive_cmds_need_lc_GCJ=no
17453 else
17454 archive_cmds_need_lc_GCJ=yes
17455 fi
17456 allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
17457 else
17458 cat conftest.err 1>&5
17459 fi
17460 $rm conftest*
17461 echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
17462 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6
17463 ;;
17464 esac
17465 fi
17466 ;;
17467 esac
17468
17469 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
17470 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
17471 library_names_spec=
17472 libname_spec='lib$name'
17473 soname_spec=
17474 shrext_cmds=".so"
17475 postinstall_cmds=
17476 postuninstall_cmds=
17477 finish_cmds=
17478 finish_eval=
17479 shlibpath_var=
17480 shlibpath_overrides_runpath=unknown
17481 version_type=none
17482 dynamic_linker="$host_os ld.so"
17483 sys_lib_dlsearch_path_spec="/lib /usr/lib"
17484 if test "$GCC" = yes; then
17485 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
17486 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
17487 # if the path contains ";" then we assume it to be the separator
17488 # otherwise default to the standard path separator (i.e. ":") - it is
17489 # assumed that no part of a normal pathname contains ";" but that should
17490 # okay in the real world where ";" in dirpaths is itself problematic.
17491 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
17492 else
17493 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
17494 fi
17495 else
17496 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
17497 fi
17498 need_lib_prefix=unknown
17499 hardcode_into_libs=no
17500
17501 # when you set need_version to no, make sure it does not cause -set_version
17502 # flags to be left without arguments
17503 need_version=unknown
17504
17505 case $host_os in
17506 aix3*)
17507 version_type=linux
17508 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
17509 shlibpath_var=LIBPATH
17510
17511 # AIX 3 has no versioning support, so we append a major version to the name.
17512 soname_spec='${libname}${release}${shared_ext}$major'
17513 ;;
17514
17515 aix4* | aix5*)
17516 version_type=linux
17517 need_lib_prefix=no
17518 need_version=no
17519 hardcode_into_libs=yes
17520 if test "$host_cpu" = ia64; then
17521 # AIX 5 supports IA64
17522 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
17523 shlibpath_var=LD_LIBRARY_PATH
17524 else
17525 # With GCC up to 2.95.x, collect2 would create an import file
17526 # for dependence libraries. The import file would start with
17527 # the line `#! .'. This would cause the generated library to
17528 # depend on `.', always an invalid library. This was fixed in
17529 # development snapshots of GCC prior to 3.0.
17530 case $host_os in
17531 aix4 | aix4.[01] | aix4.[01].*)
17532 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
17533 echo ' yes '
17534 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
17535 :
17536 else
17537 can_build_shared=no
17538 fi
17539 ;;
17540 esac
17541 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
17542 # soname into executable. Probably we can add versioning support to
17543 # collect2, so additional links can be useful in future.
17544 if test "$aix_use_runtimelinking" = yes; then
17545 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
17546 # instead of lib<name>.a to let people know that these are not
17547 # typical AIX shared libraries.
17548 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17549 else
17550 # We preserve .a as extension for shared libraries through AIX4.2
17551 # and later when we are not doing run time linking.
17552 library_names_spec='${libname}${release}.a $libname.a'
17553 soname_spec='${libname}${release}${shared_ext}$major'
17554 fi
17555 shlibpath_var=LIBPATH
17556 fi
17557 ;;
17558
17559 amigaos*)
17560 library_names_spec='$libname.ixlibrary $libname.a'
17561 # Create ${libname}_ixlibrary.a entries in /sys/libs.
17562 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
17563 ;;
17564
17565 beos*)
17566 library_names_spec='${libname}${shared_ext}'
17567 dynamic_linker="$host_os ld.so"
17568 shlibpath_var=LIBRARY_PATH
17569 ;;
17570
17571 bsdi[45]*)
17572 version_type=linux
17573 need_version=no
17574 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17575 soname_spec='${libname}${release}${shared_ext}$major'
17576 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
17577 shlibpath_var=LD_LIBRARY_PATH
17578 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
17579 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
17580 # the default ld.so.conf also contains /usr/contrib/lib and
17581 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
17582 # libtool to hard-code these into programs
17583 ;;
17584
17585 cygwin* | mingw* | pw32*)
17586 version_type=windows
17587 shrext_cmds=".dll"
17588 need_version=no
17589 need_lib_prefix=no
17590
17591 case $GCC,$host_os in
17592 yes,cygwin* | yes,mingw* | yes,pw32*)
17593 library_names_spec='$libname.dll.a'
17594 # DLL is installed to $(libdir)/../bin by postinstall_cmds
17595 postinstall_cmds='base_file=`basename \${file}`~
17596 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
17597 dldir=$destdir/`dirname \$dlpath`~
17598 test -d \$dldir || mkdir -p \$dldir~
17599 $install_prog $dir/$dlname \$dldir/$dlname~
17600 chmod a+x \$dldir/$dlname'
17601 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
17602 dlpath=$dir/\$dldll~
17603 $rm \$dlpath'
17604 shlibpath_overrides_runpath=yes
17605
17606 case $host_os in
17607 cygwin*)
17608 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
17609 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
17610 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
17611 ;;
17612 mingw*)
17613 # MinGW DLLs use traditional 'lib' prefix
17614 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
17615 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
17616 if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
17617 # It is most probably a Windows format PATH printed by
17618 # mingw gcc, but we are running on Cygwin. Gcc prints its search
17619 # path with ; separators, and with drive letters. We can handle the
17620 # drive letters (cygwin fileutils understands them), so leave them,
17621 # especially as we might pass files found there to a mingw objdump,
17622 # which wouldn't understand a cygwinified path. Ahh.
17623 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
17624 else
17625 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
17626 fi
17627 ;;
17628 pw32*)
17629 # pw32 DLLs use 'pw' prefix rather than 'lib'
17630 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
17631 ;;
17632 esac
17633 ;;
17634
17635 *)
17636 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
17637 ;;
17638 esac
17639 dynamic_linker='Win32 ld.exe'
17640 # FIXME: first we should search . and the directory the executable is in
17641 shlibpath_var=PATH
17642 ;;
17643
17644 darwin* | rhapsody*)
17645 dynamic_linker="$host_os dyld"
17646 version_type=darwin
17647 need_lib_prefix=no
17648 need_version=no
17649 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
17650 soname_spec='${libname}${release}${major}$shared_ext'
17651 shlibpath_overrides_runpath=yes
17652 shlibpath_var=DYLD_LIBRARY_PATH
17653 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
17654 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
17655 if test "$GCC" = yes; then
17656 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
17657 else
17658 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
17659 fi
17660 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
17661 ;;
17662
17663 dgux*)
17664 version_type=linux
17665 need_lib_prefix=no
17666 need_version=no
17667 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
17668 soname_spec='${libname}${release}${shared_ext}$major'
17669 shlibpath_var=LD_LIBRARY_PATH
17670 ;;
17671
17672 freebsd1*)
17673 dynamic_linker=no
17674 ;;
17675
17676 kfreebsd*-gnu)
17677 version_type=linux
17678 need_lib_prefix=no
17679 need_version=no
17680 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
17681 soname_spec='${libname}${release}${shared_ext}$major'
17682 shlibpath_var=LD_LIBRARY_PATH
17683 shlibpath_overrides_runpath=no
17684 hardcode_into_libs=yes
17685 dynamic_linker='GNU ld.so'
17686 ;;
17687
17688 freebsd* | dragonfly*)
17689 # DragonFly does not have aout. When/if they implement a new
17690 # versioning mechanism, adjust this.
17691 if test -x /usr/bin/objformat; then
17692 objformat=`/usr/bin/objformat`
17693 else
17694 case $host_os in
17695 freebsd[123]*) objformat=aout ;;
17696 *) objformat=elf ;;
17697 esac
17698 fi
17699 version_type=freebsd-$objformat
17700 case $version_type in
17701 freebsd-elf*)
17702 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
17703 need_version=no
17704 need_lib_prefix=no
17705 ;;
17706 freebsd-*)
17707 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
17708 need_version=yes
17709 ;;
17710 esac
17711 shlibpath_var=LD_LIBRARY_PATH
17712 case $host_os in
17713 freebsd2*)
17714 shlibpath_overrides_runpath=yes
17715 ;;
17716 freebsd3.[01]* | freebsdelf3.[01]*)
17717 shlibpath_overrides_runpath=yes
17718 hardcode_into_libs=yes
17719 ;;
17720 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
17721 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
17722 shlibpath_overrides_runpath=no
17723 hardcode_into_libs=yes
17724 ;;
17725 freebsd*) # from 4.6 on
17726 shlibpath_overrides_runpath=yes
17727 hardcode_into_libs=yes
17728 ;;
17729 esac
17730 ;;
17731
17732 gnu*)
17733 version_type=linux
17734 need_lib_prefix=no
17735 need_version=no
17736 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
17737 soname_spec='${libname}${release}${shared_ext}$major'
17738 shlibpath_var=LD_LIBRARY_PATH
17739 hardcode_into_libs=yes
17740 ;;
17741
17742 hpux9* | hpux10* | hpux11*)
17743 # Give a soname corresponding to the major version so that dld.sl refuses to
17744 # link against other versions.
17745 version_type=sunos
17746 need_lib_prefix=no
17747 need_version=no
17748 case $host_cpu in
17749 ia64*)
17750 shrext_cmds='.so'
17751 hardcode_into_libs=yes
17752 dynamic_linker="$host_os dld.so"
17753 shlibpath_var=LD_LIBRARY_PATH
17754 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
17755 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17756 soname_spec='${libname}${release}${shared_ext}$major'
17757 if test "X$HPUX_IA64_MODE" = X32; then
17758 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
17759 else
17760 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
17761 fi
17762 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
17763 ;;
17764 hppa*64*)
17765 shrext_cmds='.sl'
17766 hardcode_into_libs=yes
17767 dynamic_linker="$host_os dld.sl"
17768 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
17769 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
17770 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17771 soname_spec='${libname}${release}${shared_ext}$major'
17772 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
17773 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
17774 ;;
17775 *)
17776 shrext_cmds='.sl'
17777 dynamic_linker="$host_os dld.sl"
17778 shlibpath_var=SHLIB_PATH
17779 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
17780 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17781 soname_spec='${libname}${release}${shared_ext}$major'
17782 ;;
17783 esac
17784 # HP-UX runs *really* slowly unless shared libraries are mode 555.
17785 postinstall_cmds='chmod 555 $lib'
17786 ;;
17787
17788 interix3*)
17789 version_type=linux
17790 need_lib_prefix=no
17791 need_version=no
17792 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
17793 soname_spec='${libname}${release}${shared_ext}$major'
17794 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
17795 shlibpath_var=LD_LIBRARY_PATH
17796 shlibpath_overrides_runpath=no
17797 hardcode_into_libs=yes
17798 ;;
17799
17800 irix5* | irix6* | nonstopux*)
17801 case $host_os in
17802 nonstopux*) version_type=nonstopux ;;
17803 *)
17804 if test "$lt_cv_prog_gnu_ld" = yes; then
17805 version_type=linux
17806 else
17807 version_type=irix
17808 fi ;;
17809 esac
17810 need_lib_prefix=no
17811 need_version=no
17812 soname_spec='${libname}${release}${shared_ext}$major'
17813 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
17814 case $host_os in
17815 irix5* | nonstopux*)
17816 libsuff= shlibsuff=
17817 ;;
17818 *)
17819 case $LD in # libtool.m4 will add one of these switches to LD
17820 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
17821 libsuff= shlibsuff= libmagic=32-bit;;
17822 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
17823 libsuff=32 shlibsuff=N32 libmagic=N32;;
17824 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
17825 libsuff=64 shlibsuff=64 libmagic=64-bit;;
17826 *) libsuff= shlibsuff= libmagic=never-match;;
17827 esac
17828 ;;
17829 esac
17830 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
17831 shlibpath_overrides_runpath=no
17832 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
17833 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
17834 hardcode_into_libs=yes
17835 ;;
17836
17837 # No shared lib support for Linux oldld, aout, or coff.
17838 linux*oldld* | linux*aout* | linux*coff*)
17839 dynamic_linker=no
17840 ;;
17841
17842 # This must be Linux ELF.
17843 linux*)
17844 version_type=linux
17845 need_lib_prefix=no
17846 need_version=no
17847 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17848 soname_spec='${libname}${release}${shared_ext}$major'
17849 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
17850 shlibpath_var=LD_LIBRARY_PATH
17851 shlibpath_overrides_runpath=no
17852 # This implies no fast_install, which is unacceptable.
17853 # Some rework will be needed to allow for fast_install
17854 # before this can be enabled.
17855 hardcode_into_libs=yes
17856
17857 # Append ld.so.conf contents to the search path
17858 if test -f /etc/ld.so.conf; then
17859 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
17860 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
17861 fi
17862
17863 # We used to test for /lib/ld.so.1 and disable shared libraries on
17864 # powerpc, because MkLinux only supported shared libraries with the
17865 # GNU dynamic linker. Since this was broken with cross compilers,
17866 # most powerpc-linux boxes support dynamic linking these days and
17867 # people can always --disable-shared, the test was removed, and we
17868 # assume the GNU/Linux dynamic linker is in use.
17869 dynamic_linker='GNU/Linux ld.so'
17870 ;;
17871
17872 netbsdelf*-gnu)
17873 version_type=linux
17874 need_lib_prefix=no
17875 need_version=no
17876 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
17877 soname_spec='${libname}${release}${shared_ext}$major'
17878 shlibpath_var=LD_LIBRARY_PATH
17879 shlibpath_overrides_runpath=no
17880 hardcode_into_libs=yes
17881 dynamic_linker='NetBSD ld.elf_so'
17882 ;;
17883
17884 knetbsd*-gnu)
17885 version_type=linux
17886 need_lib_prefix=no
17887 need_version=no
17888 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
17889 soname_spec='${libname}${release}${shared_ext}$major'
17890 shlibpath_var=LD_LIBRARY_PATH
17891 shlibpath_overrides_runpath=no
17892 hardcode_into_libs=yes
17893 dynamic_linker='GNU ld.so'
17894 ;;
17895
17896 netbsd*)
17897 version_type=sunos
17898 need_lib_prefix=no
17899 need_version=no
17900 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
17901 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
17902 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
17903 dynamic_linker='NetBSD (a.out) ld.so'
17904 else
17905 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
17906 soname_spec='${libname}${release}${shared_ext}$major'
17907 dynamic_linker='NetBSD ld.elf_so'
17908 fi
17909 shlibpath_var=LD_LIBRARY_PATH
17910 shlibpath_overrides_runpath=yes
17911 hardcode_into_libs=yes
17912 ;;
17913
17914 newsos6)
17915 version_type=linux
17916 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17917 shlibpath_var=LD_LIBRARY_PATH
17918 shlibpath_overrides_runpath=yes
17919 ;;
17920
17921 nto-qnx*)
17922 version_type=linux
17923 need_lib_prefix=no
17924 need_version=no
17925 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17926 soname_spec='${libname}${release}${shared_ext}$major'
17927 shlibpath_var=LD_LIBRARY_PATH
17928 shlibpath_overrides_runpath=yes
17929 ;;
17930
17931 openbsd*)
17932 version_type=sunos
17933 sys_lib_dlsearch_path_spec="/usr/lib"
17934 need_lib_prefix=no
17935 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
17936 case $host_os in
17937 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
17938 *) need_version=no ;;
17939 esac
17940 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
17941 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
17942 shlibpath_var=LD_LIBRARY_PATH
17943 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
17944 case $host_os in
17945 openbsd2.[89] | openbsd2.[89].*)
17946 shlibpath_overrides_runpath=no
17947 ;;
17948 *)
17949 shlibpath_overrides_runpath=yes
17950 ;;
17951 esac
17952 else
17953 shlibpath_overrides_runpath=yes
17954 fi
17955 ;;
17956
17957 os2*)
17958 libname_spec='$name'
17959 shrext_cmds=".dll"
17960 need_lib_prefix=no
17961 library_names_spec='$libname${shared_ext} $libname.a'
17962 dynamic_linker='OS/2 ld.exe'
17963 shlibpath_var=LIBPATH
17964 ;;
17965
17966 osf3* | osf4* | osf5*)
17967 version_type=osf
17968 need_lib_prefix=no
17969 need_version=no
17970 soname_spec='${libname}${release}${shared_ext}$major'
17971 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17972 shlibpath_var=LD_LIBRARY_PATH
17973 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
17974 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
17975 ;;
17976
17977 solaris*)
17978 version_type=linux
17979 need_lib_prefix=no
17980 need_version=no
17981 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17982 soname_spec='${libname}${release}${shared_ext}$major'
17983 shlibpath_var=LD_LIBRARY_PATH
17984 shlibpath_overrides_runpath=yes
17985 hardcode_into_libs=yes
17986 # ldd complains unless libraries are executable
17987 postinstall_cmds='chmod +x $lib'
17988 ;;
17989
17990 sunos4*)
17991 version_type=sunos
17992 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
17993 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
17994 shlibpath_var=LD_LIBRARY_PATH
17995 shlibpath_overrides_runpath=yes
17996 if test "$with_gnu_ld" = yes; then
17997 need_lib_prefix=no
17998 fi
17999 need_version=yes
18000 ;;
18001
18002 sysv4 | sysv4.3*)
18003 version_type=linux
18004 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18005 soname_spec='${libname}${release}${shared_ext}$major'
18006 shlibpath_var=LD_LIBRARY_PATH
18007 case $host_vendor in
18008 sni)
18009 shlibpath_overrides_runpath=no
18010 need_lib_prefix=no
18011 export_dynamic_flag_spec='${wl}-Blargedynsym'
18012 runpath_var=LD_RUN_PATH
18013 ;;
18014 siemens)
18015 need_lib_prefix=no
18016 ;;
18017 motorola)
18018 need_lib_prefix=no
18019 need_version=no
18020 shlibpath_overrides_runpath=no
18021 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
18022 ;;
18023 esac
18024 ;;
18025
18026 sysv4*MP*)
18027 if test -d /usr/nec ;then
18028 version_type=linux
18029 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
18030 soname_spec='$libname${shared_ext}.$major'
18031 shlibpath_var=LD_LIBRARY_PATH
18032 fi
18033 ;;
18034
18035 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
18036 version_type=freebsd-elf
18037 need_lib_prefix=no
18038 need_version=no
18039 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
18040 soname_spec='${libname}${release}${shared_ext}$major'
18041 shlibpath_var=LD_LIBRARY_PATH
18042 hardcode_into_libs=yes
18043 if test "$with_gnu_ld" = yes; then
18044 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
18045 shlibpath_overrides_runpath=no
18046 else
18047 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
18048 shlibpath_overrides_runpath=yes
18049 case $host_os in
18050 sco3.2v5*)
18051 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
18052 ;;
18053 esac
18054 fi
18055 sys_lib_dlsearch_path_spec='/usr/lib'
18056 ;;
18057
18058 uts4*)
18059 version_type=linux
18060 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18061 soname_spec='${libname}${release}${shared_ext}$major'
18062 shlibpath_var=LD_LIBRARY_PATH
18063 ;;
18064
18065 *)
18066 dynamic_linker=no
18067 ;;
18068 esac
18069 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
18070 echo "${ECHO_T}$dynamic_linker" >&6
18071 test "$dynamic_linker" = no && can_build_shared=no
18072
18073 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
18074 if test "$GCC" = yes; then
18075 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
18076 fi
18077
18078 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
18079 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
18080 hardcode_action_GCJ=
18081 if test -n "$hardcode_libdir_flag_spec_GCJ" || \
18082 test -n "$runpath_var_GCJ" || \
18083 test "X$hardcode_automatic_GCJ" = "Xyes" ; then
18084
18085 # We can hardcode non-existant directories.
18086 if test "$hardcode_direct_GCJ" != no &&
18087 # If the only mechanism to avoid hardcoding is shlibpath_var, we
18088 # have to relink, otherwise we might link with an installed library
18089 # when we should be linking with a yet-to-be-installed one
18090 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
18091 test "$hardcode_minus_L_GCJ" != no; then
18092 # Linking always hardcodes the temporary library directory.
18093 hardcode_action_GCJ=relink
18094 else
18095 # We can link without hardcoding, and we can hardcode nonexisting dirs.
18096 hardcode_action_GCJ=immediate
18097 fi
18098 else
18099 # We cannot hardcode anything, or else we can only hardcode existing
18100 # directories.
18101 hardcode_action_GCJ=unsupported
18102 fi
18103 echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
18104 echo "${ECHO_T}$hardcode_action_GCJ" >&6
18105
18106 if test "$hardcode_action_GCJ" = relink; then
18107 # Fast installation is not supported
18108 enable_fast_install=no
18109 elif test "$shlibpath_overrides_runpath" = yes ||
18110 test "$enable_shared" = no; then
18111 # Fast installation is not necessary
18112 enable_fast_install=needless
18113 fi
18114
18115
18116 # The else clause should only fire when bootstrapping the
18117 # libtool distribution, otherwise you forgot to ship ltmain.sh
18118 # with your package, and you will get complaints that there are
18119 # no rules to generate ltmain.sh.
18120 if test -f "$ltmain"; then
18121 # See if we are running on zsh, and set the options which allow our commands through
18122 # without removal of \ escapes.
18123 if test -n "${ZSH_VERSION+set}" ; then
18124 setopt NO_GLOB_SUBST
18125 fi
18126 # Now quote all the things that may contain metacharacters while being
18127 # careful not to overquote the AC_SUBSTed values. We take copies of the
18128 # variables and quote the copies for generation of the libtool script.
18129 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
18130 SED SHELL STRIP \
18131 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
18132 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
18133 deplibs_check_method reload_flag reload_cmds need_locks \
18134 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
18135 lt_cv_sys_global_symbol_to_c_name_address \
18136 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
18137 old_postinstall_cmds old_postuninstall_cmds \
18138 compiler_GCJ \
18139 CC_GCJ \
18140 LD_GCJ \
18141 lt_prog_compiler_wl_GCJ \
18142 lt_prog_compiler_pic_GCJ \
18143 lt_prog_compiler_static_GCJ \
18144 lt_prog_compiler_no_builtin_flag_GCJ \
18145 export_dynamic_flag_spec_GCJ \
18146 thread_safe_flag_spec_GCJ \
18147 whole_archive_flag_spec_GCJ \
18148 enable_shared_with_static_runtimes_GCJ \
18149 old_archive_cmds_GCJ \
18150 old_archive_from_new_cmds_GCJ \
18151 predep_objects_GCJ \
18152 postdep_objects_GCJ \
18153 predeps_GCJ \
18154 postdeps_GCJ \
18155 compiler_lib_search_path_GCJ \
18156 archive_cmds_GCJ \
18157 archive_expsym_cmds_GCJ \
18158 postinstall_cmds_GCJ \
18159 postuninstall_cmds_GCJ \
18160 old_archive_from_expsyms_cmds_GCJ \
18161 allow_undefined_flag_GCJ \
18162 no_undefined_flag_GCJ \
18163 export_symbols_cmds_GCJ \
18164 hardcode_libdir_flag_spec_GCJ \
18165 hardcode_libdir_flag_spec_ld_GCJ \
18166 hardcode_libdir_separator_GCJ \
18167 hardcode_automatic_GCJ \
18168 module_cmds_GCJ \
18169 module_expsym_cmds_GCJ \
18170 lt_cv_prog_compiler_c_o_GCJ \
18171 exclude_expsyms_GCJ \
18172 include_expsyms_GCJ; do
18173
18174 case $var in
18175 old_archive_cmds_GCJ | \
18176 old_archive_from_new_cmds_GCJ | \
18177 archive_cmds_GCJ | \
18178 archive_expsym_cmds_GCJ | \
18179 module_cmds_GCJ | \
18180 module_expsym_cmds_GCJ | \
18181 old_archive_from_expsyms_cmds_GCJ | \
18182 export_symbols_cmds_GCJ | \
18183 extract_expsyms_cmds | reload_cmds | finish_cmds | \
18184 postinstall_cmds | postuninstall_cmds | \
18185 old_postinstall_cmds | old_postuninstall_cmds | \
18186 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
18187 # Double-quote double-evaled strings.
18188 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
18189 ;;
18190 *)
18191 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
18192 ;;
18193 esac
18194 done
18195
18196 case $lt_echo in
18197 *'\$0 --fallback-echo"')
18198 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
18199 ;;
18200 esac
18201
18202 cfgfile="$ofile"
18203
18204 cat <<__EOF__ >> "$cfgfile"
18205 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
18206
18207 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
18208
18209 # Shell to use when invoking shell scripts.
18210 SHELL=$lt_SHELL
18211
18212 # Whether or not to build shared libraries.
18213 build_libtool_libs=$enable_shared
18214
18215 # Whether or not to build static libraries.
18216 build_old_libs=$enable_static
18217
18218 # Whether or not to add -lc for building shared libraries.
18219 build_libtool_need_lc=$archive_cmds_need_lc_GCJ
18220
18221 # Whether or not to disallow shared libs when runtime libs are static
18222 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
18223
18224 # Whether or not to optimize for fast installation.
18225 fast_install=$enable_fast_install
18226
18227 # The host system.
18228 host_alias=$host_alias
18229 host=$host
18230 host_os=$host_os
18231
18232 # The build system.
18233 build_alias=$build_alias
18234 build=$build
18235 build_os=$build_os
18236
18237 # An echo program that does not interpret backslashes.
18238 echo=$lt_echo
18239
18240 # The archiver.
18241 AR=$lt_AR
18242 AR_FLAGS=$lt_AR_FLAGS
18243
18244 # A C compiler.
18245 LTCC=$lt_LTCC
18246
18247 # LTCC compiler flags.
18248 LTCFLAGS=$lt_LTCFLAGS
18249
18250 # A language-specific compiler.
18251 CC=$lt_compiler_GCJ
18252
18253 # Is the compiler the GNU C compiler?
18254 with_gcc=$GCC_GCJ
18255
18256 # An ERE matcher.
18257 EGREP=$lt_EGREP
18258
18259 # The linker used to build libraries.
18260 LD=$lt_LD_GCJ
18261
18262 # Whether we need hard or soft links.
18263 LN_S=$lt_LN_S
18264
18265 # A BSD-compatible nm program.
18266 NM=$lt_NM
18267
18268 # A symbol stripping program
18269 STRIP=$lt_STRIP
18270
18271 # Used to examine libraries when file_magic_cmd begins "file"
18272 MAGIC_CMD=$MAGIC_CMD
18273
18274 # Used on cygwin: DLL creation program.
18275 DLLTOOL="$DLLTOOL"
18276
18277 # Used on cygwin: object dumper.
18278 OBJDUMP="$OBJDUMP"
18279
18280 # Used on cygwin: assembler.
18281 AS="$AS"
18282
18283 # The name of the directory that contains temporary libtool files.
18284 objdir=$objdir
18285
18286 # How to create reloadable object files.
18287 reload_flag=$lt_reload_flag
18288 reload_cmds=$lt_reload_cmds
18289
18290 # How to pass a linker flag through the compiler.
18291 wl=$lt_lt_prog_compiler_wl_GCJ
18292
18293 # Object file suffix (normally "o").
18294 objext="$ac_objext"
18295
18296 # Old archive suffix (normally "a").
18297 libext="$libext"
18298
18299 # Shared library suffix (normally ".so").
18300 shrext_cmds='$shrext_cmds'
18301
18302 # Executable file suffix (normally "").
18303 exeext="$exeext"
18304
18305 # Additional compiler flags for building library objects.
18306 pic_flag=$lt_lt_prog_compiler_pic_GCJ
18307 pic_mode=$pic_mode
18308
18309 # What is the maximum length of a command?
18310 max_cmd_len=$lt_cv_sys_max_cmd_len
18311
18312 # Does compiler simultaneously support -c and -o options?
18313 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
18314
18315 # Must we lock files when doing compilation?
18316 need_locks=$lt_need_locks
18317
18318 # Do we need the lib prefix for modules?
18319 need_lib_prefix=$need_lib_prefix
18320
18321 # Do we need a version for libraries?
18322 need_version=$need_version
18323
18324 # Whether dlopen is supported.
18325 dlopen_support=$enable_dlopen
18326
18327 # Whether dlopen of programs is supported.
18328 dlopen_self=$enable_dlopen_self
18329
18330 # Whether dlopen of statically linked programs is supported.
18331 dlopen_self_static=$enable_dlopen_self_static
18332
18333 # Compiler flag to prevent dynamic linking.
18334 link_static_flag=$lt_lt_prog_compiler_static_GCJ
18335
18336 # Compiler flag to turn off builtin functions.
18337 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
18338
18339 # Compiler flag to allow reflexive dlopens.
18340 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
18341
18342 # Compiler flag to generate shared objects directly from archives.
18343 whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
18344
18345 # Compiler flag to generate thread-safe objects.
18346 thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
18347
18348 # Library versioning type.
18349 version_type=$version_type
18350
18351 # Format of library name prefix.
18352 libname_spec=$lt_libname_spec
18353
18354 # List of archive names. First name is the real one, the rest are links.
18355 # The last name is the one that the linker finds with -lNAME.
18356 library_names_spec=$lt_library_names_spec
18357
18358 # The coded name of the library, if different from the real name.
18359 soname_spec=$lt_soname_spec
18360
18361 # Commands used to build and install an old-style archive.
18362 RANLIB=$lt_RANLIB
18363 old_archive_cmds=$lt_old_archive_cmds_GCJ
18364 old_postinstall_cmds=$lt_old_postinstall_cmds
18365 old_postuninstall_cmds=$lt_old_postuninstall_cmds
18366
18367 # Create an old-style archive from a shared archive.
18368 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
18369
18370 # Create a temporary old-style archive to link instead of a shared archive.
18371 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
18372
18373 # Commands used to build and install a shared archive.
18374 archive_cmds=$lt_archive_cmds_GCJ
18375 archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
18376 postinstall_cmds=$lt_postinstall_cmds
18377 postuninstall_cmds=$lt_postuninstall_cmds
18378
18379 # Commands used to build a loadable module (assumed same as above if empty)
18380 module_cmds=$lt_module_cmds_GCJ
18381 module_expsym_cmds=$lt_module_expsym_cmds_GCJ
18382
18383 # Commands to strip libraries.
18384 old_striplib=$lt_old_striplib
18385 striplib=$lt_striplib
18386
18387 # Dependencies to place before the objects being linked to create a
18388 # shared library.
18389 predep_objects=$lt_predep_objects_GCJ
18390
18391 # Dependencies to place after the objects being linked to create a
18392 # shared library.
18393 postdep_objects=$lt_postdep_objects_GCJ
18394
18395 # Dependencies to place before the objects being linked to create a
18396 # shared library.
18397 predeps=$lt_predeps_GCJ
18398
18399 # Dependencies to place after the objects being linked to create a
18400 # shared library.
18401 postdeps=$lt_postdeps_GCJ
18402
18403 # The library search path used internally by the compiler when linking
18404 # a shared library.
18405 compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
18406
18407 # Method to check whether dependent libraries are shared objects.
18408 deplibs_check_method=$lt_deplibs_check_method
18409
18410 # Command to use when deplibs_check_method == file_magic.
18411 file_magic_cmd=$lt_file_magic_cmd
18412
18413 # Flag that allows shared libraries with undefined symbols to be built.
18414 allow_undefined_flag=$lt_allow_undefined_flag_GCJ
18415
18416 # Flag that forces no undefined symbols.
18417 no_undefined_flag=$lt_no_undefined_flag_GCJ
18418
18419 # Commands used to finish a libtool library installation in a directory.
18420 finish_cmds=$lt_finish_cmds
18421
18422 # Same as above, but a single script fragment to be evaled but not shown.
18423 finish_eval=$lt_finish_eval
18424
18425 # Take the output of nm and produce a listing of raw symbols and C names.
18426 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
18427
18428 # Transform the output of nm in a proper C declaration
18429 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
18430
18431 # Transform the output of nm in a C name address pair
18432 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
18433
18434 # This is the shared library runtime path variable.
18435 runpath_var=$runpath_var
18436
18437 # This is the shared library path variable.
18438 shlibpath_var=$shlibpath_var
18439
18440 # Is shlibpath searched before the hard-coded library search path?
18441 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
18442
18443 # How to hardcode a shared library path into an executable.
18444 hardcode_action=$hardcode_action_GCJ
18445
18446 # Whether we should hardcode library paths into libraries.
18447 hardcode_into_libs=$hardcode_into_libs
18448
18449 # Flag to hardcode \$libdir into a binary during linking.
18450 # This must work even if \$libdir does not exist.
18451 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
18452
18453 # If ld is used when linking, flag to hardcode \$libdir into
18454 # a binary during linking. This must work even if \$libdir does
18455 # not exist.
18456 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
18457
18458 # Whether we need a single -rpath flag with a separated argument.
18459 hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
18460
18461 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
18462 # resulting binary.
18463 hardcode_direct=$hardcode_direct_GCJ
18464
18465 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
18466 # resulting binary.
18467 hardcode_minus_L=$hardcode_minus_L_GCJ
18468
18469 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
18470 # the resulting binary.
18471 hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
18472
18473 # Set to yes if building a shared library automatically hardcodes DIR into the library
18474 # and all subsequent libraries and executables linked against it.
18475 hardcode_automatic=$hardcode_automatic_GCJ
18476
18477 # Variables whose values should be saved in libtool wrapper scripts and
18478 # restored at relink time.
18479 variables_saved_for_relink="$variables_saved_for_relink"
18480
18481 # Whether libtool must link a program against all its dependency libraries.
18482 link_all_deplibs=$link_all_deplibs_GCJ
18483
18484 # Compile-time system search path for libraries
18485 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
18486
18487 # Run-time system search path for libraries
18488 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
18489
18490 # Fix the shell variable \$srcfile for the compiler.
18491 fix_srcfile_path="$fix_srcfile_path_GCJ"
18492
18493 # Set to yes if exported symbols are required.
18494 always_export_symbols=$always_export_symbols_GCJ
18495
18496 # The commands to list exported symbols.
18497 export_symbols_cmds=$lt_export_symbols_cmds_GCJ
18498
18499 # The commands to extract the exported symbol list from a shared archive.
18500 extract_expsyms_cmds=$lt_extract_expsyms_cmds
18501
18502 # Symbols that should not be listed in the preloaded symbols.
18503 exclude_expsyms=$lt_exclude_expsyms_GCJ
18504
18505 # Symbols that must always be exported.
18506 include_expsyms=$lt_include_expsyms_GCJ
18507
18508 # ### END LIBTOOL TAG CONFIG: $tagname
18509
18510 __EOF__
18511
18512
18513 else
18514 # If there is no Makefile yet, we rely on a make rule to execute
18515 # `config.status --recheck' to rerun these tests and create the
18516 # libtool script then.
18517 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
18518 if test -f "$ltmain_in"; then
18519 test -f Makefile && make "$ltmain"
18520 fi
18521 fi
18522
18523
18524 ac_ext=c
18525 ac_cpp='$CPP $CPPFLAGS'
18526 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18527 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18528 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18529
18530 CC="$lt_save_CC"
18531
18532 else
18533 tagname=""
18534 fi
18535 ;;
18536
18537 RC)
18538
18539
18540
18541 # Source file extension for RC test sources.
18542 ac_ext=rc
18543
18544 # Object file extension for compiled RC test sources.
18545 objext=o
18546 objext_RC=$objext
18547
18548 # Code to be used in simple compile tests
18549 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
18550
18551 # Code to be used in simple link tests
18552 lt_simple_link_test_code="$lt_simple_compile_test_code"
18553
18554 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
18555
18556 # If no C compiler was specified, use CC.
18557 LTCC=${LTCC-"$CC"}
18558
18559 # If no C compiler flags were specified, use CFLAGS.
18560 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
18561
18562 # Allow CC to be a program name with arguments.
18563 compiler=$CC
18564
18565
18566 # save warnings/boilerplate of simple test code
18567 ac_outfile=conftest.$ac_objext
18568 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
18569 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
18570 _lt_compiler_boilerplate=`cat conftest.err`
18571 $rm conftest*
18572
18573 ac_outfile=conftest.$ac_objext
18574 printf "$lt_simple_link_test_code" >conftest.$ac_ext
18575 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
18576 _lt_linker_boilerplate=`cat conftest.err`
18577 $rm conftest*
18578
18579
18580 # Allow CC to be a program name with arguments.
18581 lt_save_CC="$CC"
18582 CC=${RC-"windres"}
18583 compiler=$CC
18584 compiler_RC=$CC
18585 for cc_temp in $compiler""; do
18586 case $cc_temp in
18587 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
18588 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
18589 \-*) ;;
18590 *) break;;
18591 esac
18592 done
18593 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
18594
18595 lt_cv_prog_compiler_c_o_RC=yes
18596
18597 # The else clause should only fire when bootstrapping the
18598 # libtool distribution, otherwise you forgot to ship ltmain.sh
18599 # with your package, and you will get complaints that there are
18600 # no rules to generate ltmain.sh.
18601 if test -f "$ltmain"; then
18602 # See if we are running on zsh, and set the options which allow our commands through
18603 # without removal of \ escapes.
18604 if test -n "${ZSH_VERSION+set}" ; then
18605 setopt NO_GLOB_SUBST
18606 fi
18607 # Now quote all the things that may contain metacharacters while being
18608 # careful not to overquote the AC_SUBSTed values. We take copies of the
18609 # variables and quote the copies for generation of the libtool script.
18610 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
18611 SED SHELL STRIP \
18612 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
18613 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
18614 deplibs_check_method reload_flag reload_cmds need_locks \
18615 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
18616 lt_cv_sys_global_symbol_to_c_name_address \
18617 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
18618 old_postinstall_cmds old_postuninstall_cmds \
18619 compiler_RC \
18620 CC_RC \
18621 LD_RC \
18622 lt_prog_compiler_wl_RC \
18623 lt_prog_compiler_pic_RC \
18624 lt_prog_compiler_static_RC \
18625 lt_prog_compiler_no_builtin_flag_RC \
18626 export_dynamic_flag_spec_RC \
18627 thread_safe_flag_spec_RC \
18628 whole_archive_flag_spec_RC \
18629 enable_shared_with_static_runtimes_RC \
18630 old_archive_cmds_RC \
18631 old_archive_from_new_cmds_RC \
18632 predep_objects_RC \
18633 postdep_objects_RC \
18634 predeps_RC \
18635 postdeps_RC \
18636 compiler_lib_search_path_RC \
18637 archive_cmds_RC \
18638 archive_expsym_cmds_RC \
18639 postinstall_cmds_RC \
18640 postuninstall_cmds_RC \
18641 old_archive_from_expsyms_cmds_RC \
18642 allow_undefined_flag_RC \
18643 no_undefined_flag_RC \
18644 export_symbols_cmds_RC \
18645 hardcode_libdir_flag_spec_RC \
18646 hardcode_libdir_flag_spec_ld_RC \
18647 hardcode_libdir_separator_RC \
18648 hardcode_automatic_RC \
18649 module_cmds_RC \
18650 module_expsym_cmds_RC \
18651 lt_cv_prog_compiler_c_o_RC \
18652 exclude_expsyms_RC \
18653 include_expsyms_RC; do
18654
18655 case $var in
18656 old_archive_cmds_RC | \
18657 old_archive_from_new_cmds_RC | \
18658 archive_cmds_RC | \
18659 archive_expsym_cmds_RC | \
18660 module_cmds_RC | \
18661 module_expsym_cmds_RC | \
18662 old_archive_from_expsyms_cmds_RC | \
18663 export_symbols_cmds_RC | \
18664 extract_expsyms_cmds | reload_cmds | finish_cmds | \
18665 postinstall_cmds | postuninstall_cmds | \
18666 old_postinstall_cmds | old_postuninstall_cmds | \
18667 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
18668 # Double-quote double-evaled strings.
18669 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
18670 ;;
18671 *)
18672 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
18673 ;;
18674 esac
18675 done
18676
18677 case $lt_echo in
18678 *'\$0 --fallback-echo"')
18679 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
18680 ;;
18681 esac
18682
18683 cfgfile="$ofile"
18684
18685 cat <<__EOF__ >> "$cfgfile"
18686 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
18687
18688 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
18689
18690 # Shell to use when invoking shell scripts.
18691 SHELL=$lt_SHELL
18692
18693 # Whether or not to build shared libraries.
18694 build_libtool_libs=$enable_shared
18695
18696 # Whether or not to build static libraries.
18697 build_old_libs=$enable_static
18698
18699 # Whether or not to add -lc for building shared libraries.
18700 build_libtool_need_lc=$archive_cmds_need_lc_RC
18701
18702 # Whether or not to disallow shared libs when runtime libs are static
18703 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
18704
18705 # Whether or not to optimize for fast installation.
18706 fast_install=$enable_fast_install
18707
18708 # The host system.
18709 host_alias=$host_alias
18710 host=$host
18711 host_os=$host_os
18712
18713 # The build system.
18714 build_alias=$build_alias
18715 build=$build
18716 build_os=$build_os
18717
18718 # An echo program that does not interpret backslashes.
18719 echo=$lt_echo
18720
18721 # The archiver.
18722 AR=$lt_AR
18723 AR_FLAGS=$lt_AR_FLAGS
18724
18725 # A C compiler.
18726 LTCC=$lt_LTCC
18727
18728 # LTCC compiler flags.
18729 LTCFLAGS=$lt_LTCFLAGS
18730
18731 # A language-specific compiler.
18732 CC=$lt_compiler_RC
18733
18734 # Is the compiler the GNU C compiler?
18735 with_gcc=$GCC_RC
18736
18737 # An ERE matcher.
18738 EGREP=$lt_EGREP
18739
18740 # The linker used to build libraries.
18741 LD=$lt_LD_RC
18742
18743 # Whether we need hard or soft links.
18744 LN_S=$lt_LN_S
18745
18746 # A BSD-compatible nm program.
18747 NM=$lt_NM
18748
18749 # A symbol stripping program
18750 STRIP=$lt_STRIP
18751
18752 # Used to examine libraries when file_magic_cmd begins "file"
18753 MAGIC_CMD=$MAGIC_CMD
18754
18755 # Used on cygwin: DLL creation program.
18756 DLLTOOL="$DLLTOOL"
18757
18758 # Used on cygwin: object dumper.
18759 OBJDUMP="$OBJDUMP"
18760
18761 # Used on cygwin: assembler.
18762 AS="$AS"
18763
18764 # The name of the directory that contains temporary libtool files.
18765 objdir=$objdir
18766
18767 # How to create reloadable object files.
18768 reload_flag=$lt_reload_flag
18769 reload_cmds=$lt_reload_cmds
18770
18771 # How to pass a linker flag through the compiler.
18772 wl=$lt_lt_prog_compiler_wl_RC
18773
18774 # Object file suffix (normally "o").
18775 objext="$ac_objext"
18776
18777 # Old archive suffix (normally "a").
18778 libext="$libext"
18779
18780 # Shared library suffix (normally ".so").
18781 shrext_cmds='$shrext_cmds'
18782
18783 # Executable file suffix (normally "").
18784 exeext="$exeext"
18785
18786 # Additional compiler flags for building library objects.
18787 pic_flag=$lt_lt_prog_compiler_pic_RC
18788 pic_mode=$pic_mode
18789
18790 # What is the maximum length of a command?
18791 max_cmd_len=$lt_cv_sys_max_cmd_len
18792
18793 # Does compiler simultaneously support -c and -o options?
18794 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
18795
18796 # Must we lock files when doing compilation?
18797 need_locks=$lt_need_locks
18798
18799 # Do we need the lib prefix for modules?
18800 need_lib_prefix=$need_lib_prefix
18801
18802 # Do we need a version for libraries?
18803 need_version=$need_version
18804
18805 # Whether dlopen is supported.
18806 dlopen_support=$enable_dlopen
18807
18808 # Whether dlopen of programs is supported.
18809 dlopen_self=$enable_dlopen_self
18810
18811 # Whether dlopen of statically linked programs is supported.
18812 dlopen_self_static=$enable_dlopen_self_static
18813
18814 # Compiler flag to prevent dynamic linking.
18815 link_static_flag=$lt_lt_prog_compiler_static_RC
18816
18817 # Compiler flag to turn off builtin functions.
18818 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
18819
18820 # Compiler flag to allow reflexive dlopens.
18821 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
18822
18823 # Compiler flag to generate shared objects directly from archives.
18824 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
18825
18826 # Compiler flag to generate thread-safe objects.
18827 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
18828
18829 # Library versioning type.
18830 version_type=$version_type
18831
18832 # Format of library name prefix.
18833 libname_spec=$lt_libname_spec
18834
18835 # List of archive names. First name is the real one, the rest are links.
18836 # The last name is the one that the linker finds with -lNAME.
18837 library_names_spec=$lt_library_names_spec
18838
18839 # The coded name of the library, if different from the real name.
18840 soname_spec=$lt_soname_spec
18841
18842 # Commands used to build and install an old-style archive.
18843 RANLIB=$lt_RANLIB
18844 old_archive_cmds=$lt_old_archive_cmds_RC
18845 old_postinstall_cmds=$lt_old_postinstall_cmds
18846 old_postuninstall_cmds=$lt_old_postuninstall_cmds
18847
18848 # Create an old-style archive from a shared archive.
18849 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
18850
18851 # Create a temporary old-style archive to link instead of a shared archive.
18852 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
18853
18854 # Commands used to build and install a shared archive.
18855 archive_cmds=$lt_archive_cmds_RC
18856 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
18857 postinstall_cmds=$lt_postinstall_cmds
18858 postuninstall_cmds=$lt_postuninstall_cmds
18859
18860 # Commands used to build a loadable module (assumed same as above if empty)
18861 module_cmds=$lt_module_cmds_RC
18862 module_expsym_cmds=$lt_module_expsym_cmds_RC
18863
18864 # Commands to strip libraries.
18865 old_striplib=$lt_old_striplib
18866 striplib=$lt_striplib
18867
18868 # Dependencies to place before the objects being linked to create a
18869 # shared library.
18870 predep_objects=$lt_predep_objects_RC
18871
18872 # Dependencies to place after the objects being linked to create a
18873 # shared library.
18874 postdep_objects=$lt_postdep_objects_RC
18875
18876 # Dependencies to place before the objects being linked to create a
18877 # shared library.
18878 predeps=$lt_predeps_RC
18879
18880 # Dependencies to place after the objects being linked to create a
18881 # shared library.
18882 postdeps=$lt_postdeps_RC
18883
18884 # The library search path used internally by the compiler when linking
18885 # a shared library.
18886 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
18887
18888 # Method to check whether dependent libraries are shared objects.
18889 deplibs_check_method=$lt_deplibs_check_method
18890
18891 # Command to use when deplibs_check_method == file_magic.
18892 file_magic_cmd=$lt_file_magic_cmd
18893
18894 # Flag that allows shared libraries with undefined symbols to be built.
18895 allow_undefined_flag=$lt_allow_undefined_flag_RC
18896
18897 # Flag that forces no undefined symbols.
18898 no_undefined_flag=$lt_no_undefined_flag_RC
18899
18900 # Commands used to finish a libtool library installation in a directory.
18901 finish_cmds=$lt_finish_cmds
18902
18903 # Same as above, but a single script fragment to be evaled but not shown.
18904 finish_eval=$lt_finish_eval
18905
18906 # Take the output of nm and produce a listing of raw symbols and C names.
18907 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
18908
18909 # Transform the output of nm in a proper C declaration
18910 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
18911
18912 # Transform the output of nm in a C name address pair
18913 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
18914
18915 # This is the shared library runtime path variable.
18916 runpath_var=$runpath_var
18917
18918 # This is the shared library path variable.
18919 shlibpath_var=$shlibpath_var
18920
18921 # Is shlibpath searched before the hard-coded library search path?
18922 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
18923
18924 # How to hardcode a shared library path into an executable.
18925 hardcode_action=$hardcode_action_RC
18926
18927 # Whether we should hardcode library paths into libraries.
18928 hardcode_into_libs=$hardcode_into_libs
18929
18930 # Flag to hardcode \$libdir into a binary during linking.
18931 # This must work even if \$libdir does not exist.
18932 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
18933
18934 # If ld is used when linking, flag to hardcode \$libdir into
18935 # a binary during linking. This must work even if \$libdir does
18936 # not exist.
18937 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
18938
18939 # Whether we need a single -rpath flag with a separated argument.
18940 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
18941
18942 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
18943 # resulting binary.
18944 hardcode_direct=$hardcode_direct_RC
18945
18946 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
18947 # resulting binary.
18948 hardcode_minus_L=$hardcode_minus_L_RC
18949
18950 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
18951 # the resulting binary.
18952 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
18953
18954 # Set to yes if building a shared library automatically hardcodes DIR into the library
18955 # and all subsequent libraries and executables linked against it.
18956 hardcode_automatic=$hardcode_automatic_RC
18957
18958 # Variables whose values should be saved in libtool wrapper scripts and
18959 # restored at relink time.
18960 variables_saved_for_relink="$variables_saved_for_relink"
18961
18962 # Whether libtool must link a program against all its dependency libraries.
18963 link_all_deplibs=$link_all_deplibs_RC
18964
18965 # Compile-time system search path for libraries
18966 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
18967
18968 # Run-time system search path for libraries
18969 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
18970
18971 # Fix the shell variable \$srcfile for the compiler.
18972 fix_srcfile_path="$fix_srcfile_path_RC"
18973
18974 # Set to yes if exported symbols are required.
18975 always_export_symbols=$always_export_symbols_RC
18976
18977 # The commands to list exported symbols.
18978 export_symbols_cmds=$lt_export_symbols_cmds_RC
18979
18980 # The commands to extract the exported symbol list from a shared archive.
18981 extract_expsyms_cmds=$lt_extract_expsyms_cmds
18982
18983 # Symbols that should not be listed in the preloaded symbols.
18984 exclude_expsyms=$lt_exclude_expsyms_RC
18985
18986 # Symbols that must always be exported.
18987 include_expsyms=$lt_include_expsyms_RC
18988
18989 # ### END LIBTOOL TAG CONFIG: $tagname
18990
18991 __EOF__
18992
18993
18994 else
18995 # If there is no Makefile yet, we rely on a make rule to execute
18996 # `config.status --recheck' to rerun these tests and create the
18997 # libtool script then.
18998 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
18999 if test -f "$ltmain_in"; then
19000 test -f Makefile && make "$ltmain"
19001 fi
19002 fi
19003
19004
19005 ac_ext=c
19006 ac_cpp='$CPP $CPPFLAGS'
19007 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19008 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19009 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19010
19011 CC="$lt_save_CC"
19012
19013 ;;
19014
19015 *)
19016 { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
19017 echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
19018 { (exit 1); exit 1; }; }
19019 ;;
19020 esac
19021
19022 # Append the new tag name to the list of available tags.
19023 if test -n "$tagname" ; then
19024 available_tags="$available_tags $tagname"
19025 fi
19026 fi
19027 done
19028 IFS="$lt_save_ifs"
19029
19030 # Now substitute the updated list of available tags.
19031 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
19032 mv "${ofile}T" "$ofile"
19033 chmod +x "$ofile"
19034 else
19035 rm -f "${ofile}T"
19036 { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
19037 echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
19038 { (exit 1); exit 1; }; }
19039 fi
19040 fi
19041
19042
19043
19044 # This can be used to rebuild libtool when needed
19045 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
19046
19047 # Always use our own libtool.
19048 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
19049
19050 # Prevent multiple expansion
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072 echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
19073 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
19074 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
19075 if test "${enable_maintainer_mode+set}" = set; then
19076 enableval="$enable_maintainer_mode"
19077 USE_MAINTAINER_MODE=$enableval
19078 else
19079 USE_MAINTAINER_MODE=no
19080 fi;
19081 echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
19082 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
19083
19084
19085 if test $USE_MAINTAINER_MODE = yes; then
19086 MAINTAINER_MODE_TRUE=
19087 MAINTAINER_MODE_FALSE='#'
19088 else
19089 MAINTAINER_MODE_TRUE='#'
19090 MAINTAINER_MODE_FALSE=
19091 fi
19092 MAINT=$MAINTAINER_MODE_TRUE
19093
19094
19095
19096 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19097 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
19098 if test "${ac_cv_c_const+set}" = set; then
19099 echo $ECHO_N "(cached) $ECHO_C" >&6
19100 else
19101 cat >conftest.$ac_ext <<_ACEOF
19102 /* confdefs.h. */
19103 _ACEOF
19104 cat confdefs.h >>conftest.$ac_ext
19105 cat >>conftest.$ac_ext <<_ACEOF
19106 /* end confdefs.h. */
19107
19108 int
19109 main ()
19110 {
19111 /* FIXME: Include the comments suggested by Paul. */
19112 #ifndef __cplusplus
19113 /* Ultrix mips cc rejects this. */
19114 typedef int charset[2];
19115 const charset x;
19116 /* SunOS 4.1.1 cc rejects this. */
19117 char const *const *ccp;
19118 char **p;
19119 /* NEC SVR4.0.2 mips cc rejects this. */
19120 struct point {int x, y;};
19121 static struct point const zero = {0,0};
19122 /* AIX XL C 1.02.0.0 rejects this.
19123 It does not let you subtract one const X* pointer from another in
19124 an arm of an if-expression whose if-part is not a constant
19125 expression */
19126 const char *g = "string";
19127 ccp = &g + (g ? g-g : 0);
19128 /* HPUX 7.0 cc rejects these. */
19129 ++ccp;
19130 p = (char**) ccp;
19131 ccp = (char const *const *) p;
19132 { /* SCO 3.2v4 cc rejects this. */
19133 char *t;
19134 char const *s = 0 ? (char *) 0 : (char const *) 0;
19135
19136 *t++ = 0;
19137 }
19138 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19139 int x[] = {25, 17};
19140 const int *foo = &x[0];
19141 ++foo;
19142 }
19143 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19144 typedef const int *iptr;
19145 iptr p = 0;
19146 ++p;
19147 }
19148 { /* AIX XL C 1.02.0.0 rejects this saying
19149 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19150 struct s { int j; const int *ap[3]; };
19151 struct s *b; b->j = 5;
19152 }
19153 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19154 const int foo = 10;
19155 }
19156 #endif
19157
19158 ;
19159 return 0;
19160 }
19161 _ACEOF
19162 rm -f conftest.$ac_objext
19163 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19164 (eval $ac_compile) 2>conftest.er1
19165 ac_status=$?
19166 grep -v '^ *+' conftest.er1 >conftest.err
19167 rm -f conftest.er1
19168 cat conftest.err >&5
19169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19170 (exit $ac_status); } &&
19171 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19173 (eval $ac_try) 2>&5
19174 ac_status=$?
19175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19176 (exit $ac_status); }; } &&
19177 { ac_try='test -s conftest.$ac_objext'
19178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19179 (eval $ac_try) 2>&5
19180 ac_status=$?
19181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19182 (exit $ac_status); }; }; then
19183 ac_cv_c_const=yes
19184 else
19185 echo "$as_me: failed program was:" >&5
19186 sed 's/^/| /' conftest.$ac_ext >&5
19187
19188 ac_cv_c_const=no
19189 fi
19190 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19191 fi
19192 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19193 echo "${ECHO_T}$ac_cv_c_const" >&6
19194 if test $ac_cv_c_const = no; then
19195
19196 cat >>confdefs.h <<\_ACEOF
19197 #define const
19198 _ACEOF
19199
19200 fi
19201
19202
19203 # Extract the first word of "pkg-config", so it can be a program name with args.
19204 set dummy pkg-config; ac_word=$2
19205 echo "$as_me:$LINENO: checking for $ac_word" >&5
19206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19207 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
19208 echo $ECHO_N "(cached) $ECHO_C" >&6
19209 else
19210 case $PKG_CONFIG in
19211 [\\/]* | ?:[\\/]*)
19212 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19213 ;;
19214 *)
19215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19216 for as_dir in $PATH
19217 do
19218 IFS=$as_save_IFS
19219 test -z "$as_dir" && as_dir=.
19220 for ac_exec_ext in '' $ac_executable_extensions; do
19221 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19222 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19223 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19224 break 2
19225 fi
19226 done
19227 done
19228
19229 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
19230 ;;
19231 esac
19232 fi
19233 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19234
19235 if test -n "$PKG_CONFIG"; then
19236 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
19237 echo "${ECHO_T}$PKG_CONFIG" >&6
19238 else
19239 echo "$as_me:$LINENO: result: no" >&5
19240 echo "${ECHO_T}no" >&6
19241 fi
19242
19243
19244 CFLAGS=
19245 LIBS=-lm
19246
19247
19248 # Extract the first word of ""swig"", so it can be a program name with args.
19249 set dummy "swig"; ac_word=$2
19250 echo "$as_me:$LINENO: checking for $ac_word" >&5
19251 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19252 if test "${ac_cv_prog_have_swig+set}" = set; then
19253 echo $ECHO_N "(cached) $ECHO_C" >&6
19254 else
19255 if test -n "$have_swig"; then
19256 ac_cv_prog_have_swig="$have_swig" # Let the user override the test.
19257 else
19258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19259 for as_dir in $PATH
19260 do
19261 IFS=$as_save_IFS
19262 test -z "$as_dir" && as_dir=.
19263 for ac_exec_ext in '' $ac_executable_extensions; do
19264 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19265 ac_cv_prog_have_swig="yes"
19266 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19267 break 2
19268 fi
19269 done
19270 done
19271
19272 test -z "$ac_cv_prog_have_swig" && ac_cv_prog_have_swig="no"
19273 fi
19274 fi
19275 have_swig=$ac_cv_prog_have_swig
19276 if test -n "$have_swig"; then
19277 echo "$as_me:$LINENO: result: $have_swig" >&5
19278 echo "${ECHO_T}$have_swig" >&6
19279 else
19280 echo "$as_me:$LINENO: result: no" >&5
19281 echo "${ECHO_T}no" >&6
19282 fi
19283
19284
19285
19286 build_pascal=no
19287
19288 # Extract the first word of ""fpc"", so it can be a program name with args.
19289 set dummy "fpc"; ac_word=$2
19290 echo "$as_me:$LINENO: checking for $ac_word" >&5
19291 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19292 if test "${ac_cv_prog_have_pascal+set}" = set; then
19293 echo $ECHO_N "(cached) $ECHO_C" >&6
19294 else
19295 if test -n "$have_pascal"; then
19296 ac_cv_prog_have_pascal="$have_pascal" # Let the user override the test.
19297 else
19298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19299 for as_dir in $PATH
19300 do
19301 IFS=$as_save_IFS
19302 test -z "$as_dir" && as_dir=.
19303 for ac_exec_ext in '' $ac_executable_extensions; do
19304 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19305 ac_cv_prog_have_pascal="yes"
19306 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19307 break 2
19308 fi
19309 done
19310 done
19311
19312 test -z "$ac_cv_prog_have_pascal" && ac_cv_prog_have_pascal="no"
19313 fi
19314 fi
19315 have_pascal=$ac_cv_prog_have_pascal
19316 if test -n "$have_pascal"; then
19317 echo "$as_me:$LINENO: result: $have_pascal" >&5
19318 echo "${ECHO_T}$have_pascal" >&6
19319 else
19320 echo "$as_me:$LINENO: result: no" >&5
19321 echo "${ECHO_T}no" >&6
19322 fi
19323
19324
19325 # Check whether --enable-pascal or --disable-pascal was given.
19326 if test "${enable_pascal+set}" = set; then
19327 enableval="$enable_pascal"
19328 build_pascal="$enableval"
19329 else
19330 build_pascal=no
19331 fi;
19332
19333 if test "x$have_pascal" = "xno"; then
19334 build_pascal=no
19335 else
19336 PA_VERSION=`fpc -iV`
19337 PA_TPR=`fpc -iTP`
19338 PA_TOS=`fpc -iTO`
19339 PA_MODULES_PATH="/usr/lib/fpc/$PA_VERSION/units/$PA_TPR-$PA_TOS"
19340
19341
19342 fi
19343
19344
19345
19346 if test "x$build_pascal" = "xyes"; then
19347 WITH_PASCAL_TRUE=
19348 WITH_PASCAL_FALSE='#'
19349 else
19350 WITH_PASCAL_TRUE='#'
19351 WITH_PASCAL_FALSE=
19352 fi
19353
19354
19355 build_python=no
19356
19357 # Check whether --enable-python or --disable-python was given.
19358 if test "${enable_python+set}" = set; then
19359 enableval="$enable_python"
19360 build_python="$enableval"
19361 else
19362 build_python=no
19363 fi;
19364
19365
19366 # Check whether --with-python-sitelib-dir or --without-python-sitelib-dir was given.
19367 if test "${with_python_sitelib_dir+set}" = set; then
19368 withval="$with_python_sitelib_dir"
19369
19370 fi;
19371
19372 # Extract the first word of ""python"", so it can be a program name with args.
19373 set dummy "python"; ac_word=$2
19374 echo "$as_me:$LINENO: checking for $ac_word" >&5
19375 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19376 if test "${ac_cv_prog_have_python+set}" = set; then
19377 echo $ECHO_N "(cached) $ECHO_C" >&6
19378 else
19379 if test -n "$have_python"; then
19380 ac_cv_prog_have_python="$have_python" # Let the user override the test.
19381 else
19382 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19383 for as_dir in $PATH
19384 do
19385 IFS=$as_save_IFS
19386 test -z "$as_dir" && as_dir=.
19387 for ac_exec_ext in '' $ac_executable_extensions; do
19388 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19389 ac_cv_prog_have_python="yes"
19390 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19391 break 2
19392 fi
19393 done
19394 done
19395
19396 test -z "$ac_cv_prog_have_python" && ac_cv_prog_have_python="no"
19397 fi
19398 fi
19399 have_python=$ac_cv_prog_have_python
19400 if test -n "$have_python"; then
19401 echo "$as_me:$LINENO: result: $have_python" >&5
19402 echo "${ECHO_T}$have_python" >&6
19403 else
19404 echo "$as_me:$LINENO: result: no" >&5
19405 echo "${ECHO_T}no" >&6
19406 fi
19407
19408
19409 if test "x$have_python" = "xyes"; then
19410 PY_PREFIX=`python -c 'import sys ; print sys.prefix'`
19411 PY_VERSION=`python -c 'import sys ; print sys.version[0:3]'`
19412 echo "$as_me:$LINENO: checking for $PY_PREFIX/include/python$PY_VERSION/Python.h" >&5
19413 echo $ECHO_N "checking for $PY_PREFIX/include/python$PY_VERSION/Python.h... $ECHO_C" >&6
19414 if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h; then
19415 echo "$as_me:$LINENO: result: yes" >&5
19416 echo "${ECHO_T}yes" >&6
19417 PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
19418
19419 if test "x$with_python_sitelib_dir" = "x" ; then
19420 PY_MODULES_PATH="$PY_PREFIX/lib/python$PY_VERSION/site-packages"
19421 else
19422 PY_MODULES_PATH=$with_python_sitelib_dir
19423 fi
19424
19425
19426
19427
19428 if test "x$have_swig" = "xno"; then
19429 build_python=no
19430 fi
19431 else
19432 echo "$as_me:$LINENO: result: no" >&5
19433 echo "${ECHO_T}no" >&6
19434 build_python=no
19435 fi
19436 fi
19437
19438
19439
19440 if test "x$build_python" = "xyes"; then
19441 WITH_PYTHON_TRUE=
19442 WITH_PYTHON_FALSE='#'
19443 else
19444 WITH_PYTHON_TRUE='#'
19445 WITH_PYTHON_FALSE=
19446 fi
19447
19448
19449 build_perl=no
19450
19451 # Check whether --enable-perl or --disable-perl was given.
19452 if test "${enable_perl+set}" = set; then
19453 enableval="$enable_perl"
19454 build_perl="$enableval"
19455 else
19456 build_perl=no
19457 fi;
19458
19459
19460 # Check whether --with-perl-sitelib-dir or --without-perl-sitelib-dir was given.
19461 if test "${with_perl_sitelib_dir+set}" = set; then
19462 withval="$with_perl_sitelib_dir"
19463
19464 fi;
19465
19466 # Extract the first word of ""perl"", so it can be a program name with args.
19467 set dummy "perl"; ac_word=$2
19468 echo "$as_me:$LINENO: checking for $ac_word" >&5
19469 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19470 if test "${ac_cv_prog_have_perl+set}" = set; then
19471 echo $ECHO_N "(cached) $ECHO_C" >&6
19472 else
19473 if test -n "$have_perl"; then
19474 ac_cv_prog_have_perl="$have_perl" # Let the user override the test.
19475 else
19476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19477 for as_dir in $PATH
19478 do
19479 IFS=$as_save_IFS
19480 test -z "$as_dir" && as_dir=.
19481 for ac_exec_ext in '' $ac_executable_extensions; do
19482 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19483 ac_cv_prog_have_perl="yes"
19484 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19485 break 2
19486 fi
19487 done
19488 done
19489
19490 test -z "$ac_cv_prog_have_perl" && ac_cv_prog_have_perl="no"
19491 fi
19492 fi
19493 have_perl=$ac_cv_prog_have_perl
19494 if test -n "$have_perl"; then
19495 echo "$as_me:$LINENO: result: $have_perl" >&5
19496 echo "${ECHO_T}$have_perl" >&6
19497 else
19498 echo "$as_me:$LINENO: result: no" >&5
19499 echo "${ECHO_T}no" >&6
19500 fi
19501
19502
19503 if test "x$have_perl" = "xyes"; then
19504 PE_PREFIX=`(perl -e 'use Config; print $Config{archlib};')`
19505 echo "$as_me:$LINENO: checking for $PE_PREFIX/CORE/perl.h" >&5
19506 echo $ECHO_N "checking for $PE_PREFIX/CORE/perl.h... $ECHO_C" >&6
19507 if test -f $PE_PREFIX/CORE/perl.h; then
19508 echo "$as_me:$LINENO: result: yes" >&5
19509 echo "${ECHO_T}yes" >&6
19510 PE_CFLAGS="-I$PE_PREFIX/CORE "
19511 PE_CFLAGS=$PE_CFLAGS`(perl -e 'use Config; print $Config{cppflags};')`
19512
19513 if test "x$with_perl_sitelib_dir" = "x" ; then
19514 PE_MODULES_PATH=`(perl -e 'use Config; print $Config{sitelib};')`
19515 else
19516 PE_MODULES_PATH=$with_perl_sitelib_dir
19517 fi
19518
19519
19520
19521 if test "x$have_swig" = "xno"; then
19522 build_perl=no
19523 fi
19524 else
19525 echo "$as_me:$LINENO: result: no" >&5
19526 echo "${ECHO_T}no" >&6
19527 build_perl=no
19528 fi
19529 fi
19530
19531
19532
19533
19534 if test "x$build_perl" = "xyes"; then
19535 WITH_PERL_TRUE=
19536 WITH_PERL_FALSE='#'
19537 else
19538 WITH_PERL_TRUE='#'
19539 WITH_PERL_FALSE=
19540 fi
19541
19542
19543
19544 ALL_LINGUAS="he es_MX ru fr sv"
19545
19546
19547 MKINSTALLDIRS=
19548 if test -n "$ac_aux_dir"; then
19549 case "$ac_aux_dir" in
19550 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
19551 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
19552 esac
19553 fi
19554 if test -z "$MKINSTALLDIRS"; then
19555 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
19556 fi
19557
19558
19559
19560 echo "$as_me:$LINENO: checking whether NLS is requested" >&5
19561 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
19562 # Check whether --enable-nls or --disable-nls was given.
19563 if test "${enable_nls+set}" = set; then
19564 enableval="$enable_nls"
19565 USE_NLS=$enableval
19566 else
19567 USE_NLS=yes
19568 fi;
19569 echo "$as_me:$LINENO: result: $USE_NLS" >&5
19570 echo "${ECHO_T}$USE_NLS" >&6
19571
19572
19573
19574
19575
19576
19577 # Prepare PATH_SEPARATOR.
19578 # The user is always right.
19579 if test "${PATH_SEPARATOR+set}" != set; then
19580 echo "#! /bin/sh" >conf$$.sh
19581 echo "exit 0" >>conf$$.sh
19582 chmod +x conf$$.sh
19583 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
19584 PATH_SEPARATOR=';'
19585 else
19586 PATH_SEPARATOR=:
19587 fi
19588 rm -f conf$$.sh
19589 fi
19590
19591 # Find out how to test for executable files. Don't use a zero-byte file,
19592 # as systems may use methods other than mode bits to determine executability.
19593 cat >conf$$.file <<_ASEOF
19594 #! /bin/sh
19595 exit 0
19596 _ASEOF
19597 chmod +x conf$$.file
19598 if test -x conf$$.file >/dev/null 2>&1; then
19599 ac_executable_p="test -x"
19600 else
19601 ac_executable_p="test -f"
19602 fi
19603 rm -f conf$$.file
19604
19605 # Extract the first word of "msgfmt", so it can be a program name with args.
19606 set dummy msgfmt; ac_word=$2
19607 echo "$as_me:$LINENO: checking for $ac_word" >&5
19608 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19609 if test "${ac_cv_path_MSGFMT+set}" = set; then
19610 echo $ECHO_N "(cached) $ECHO_C" >&6
19611 else
19612 case "$MSGFMT" in
19613 [\\/]* | ?:[\\/]*)
19614 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
19615 ;;
19616 *)
19617 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
19618 for ac_dir in $PATH; do
19619 IFS="$ac_save_IFS"
19620 test -z "$ac_dir" && ac_dir=.
19621 for ac_exec_ext in '' $ac_executable_extensions; do
19622 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
19623 echo "$as_me: trying $ac_dir/$ac_word..." >&5
19624 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
19625 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
19626 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
19627 break 2
19628 fi
19629 fi
19630 done
19631 done
19632 IFS="$ac_save_IFS"
19633 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
19634 ;;
19635 esac
19636 fi
19637 MSGFMT="$ac_cv_path_MSGFMT"
19638 if test "$MSGFMT" != ":"; then
19639 echo "$as_me:$LINENO: result: $MSGFMT" >&5
19640 echo "${ECHO_T}$MSGFMT" >&6
19641 else
19642 echo "$as_me:$LINENO: result: no" >&5
19643 echo "${ECHO_T}no" >&6
19644 fi
19645
19646 # Extract the first word of "gmsgfmt", so it can be a program name with args.
19647 set dummy gmsgfmt; ac_word=$2
19648 echo "$as_me:$LINENO: checking for $ac_word" >&5
19649 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19650 if test "${ac_cv_path_GMSGFMT+set}" = set; then
19651 echo $ECHO_N "(cached) $ECHO_C" >&6
19652 else
19653 case $GMSGFMT in
19654 [\\/]* | ?:[\\/]*)
19655 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
19656 ;;
19657 *)
19658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19659 for as_dir in $PATH
19660 do
19661 IFS=$as_save_IFS
19662 test -z "$as_dir" && as_dir=.
19663 for ac_exec_ext in '' $ac_executable_extensions; do
19664 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19665 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
19666 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19667 break 2
19668 fi
19669 done
19670 done
19671
19672 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
19673 ;;
19674 esac
19675 fi
19676 GMSGFMT=$ac_cv_path_GMSGFMT
19677
19678 if test -n "$GMSGFMT"; then
19679 echo "$as_me:$LINENO: result: $GMSGFMT" >&5
19680 echo "${ECHO_T}$GMSGFMT" >&6
19681 else
19682 echo "$as_me:$LINENO: result: no" >&5
19683 echo "${ECHO_T}no" >&6
19684 fi
19685
19686
19687
19688 # Prepare PATH_SEPARATOR.
19689 # The user is always right.
19690 if test "${PATH_SEPARATOR+set}" != set; then
19691 echo "#! /bin/sh" >conf$$.sh
19692 echo "exit 0" >>conf$$.sh
19693 chmod +x conf$$.sh
19694 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
19695 PATH_SEPARATOR=';'
19696 else
19697 PATH_SEPARATOR=:
19698 fi
19699 rm -f conf$$.sh
19700 fi
19701
19702 # Find out how to test for executable files. Don't use a zero-byte file,
19703 # as systems may use methods other than mode bits to determine executability.
19704 cat >conf$$.file <<_ASEOF
19705 #! /bin/sh
19706 exit 0
19707 _ASEOF
19708 chmod +x conf$$.file
19709 if test -x conf$$.file >/dev/null 2>&1; then
19710 ac_executable_p="test -x"
19711 else
19712 ac_executable_p="test -f"
19713 fi
19714 rm -f conf$$.file
19715
19716 # Extract the first word of "xgettext", so it can be a program name with args.
19717 set dummy xgettext; ac_word=$2
19718 echo "$as_me:$LINENO: checking for $ac_word" >&5
19719 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19720 if test "${ac_cv_path_XGETTEXT+set}" = set; then
19721 echo $ECHO_N "(cached) $ECHO_C" >&6
19722 else
19723 case "$XGETTEXT" in
19724 [\\/]* | ?:[\\/]*)
19725 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
19726 ;;
19727 *)
19728 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
19729 for ac_dir in $PATH; do
19730 IFS="$ac_save_IFS"
19731 test -z "$ac_dir" && ac_dir=.
19732 for ac_exec_ext in '' $ac_executable_extensions; do
19733 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
19734 echo "$as_me: trying $ac_dir/$ac_word..." >&5
19735 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
19736 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
19737 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
19738 break 2
19739 fi
19740 fi
19741 done
19742 done
19743 IFS="$ac_save_IFS"
19744 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
19745 ;;
19746 esac
19747 fi
19748 XGETTEXT="$ac_cv_path_XGETTEXT"
19749 if test "$XGETTEXT" != ":"; then
19750 echo "$as_me:$LINENO: result: $XGETTEXT" >&5
19751 echo "${ECHO_T}$XGETTEXT" >&6
19752 else
19753 echo "$as_me:$LINENO: result: no" >&5
19754 echo "${ECHO_T}no" >&6
19755 fi
19756
19757 rm -f messages.po
19758
19759
19760 # Prepare PATH_SEPARATOR.
19761 # The user is always right.
19762 if test "${PATH_SEPARATOR+set}" != set; then
19763 echo "#! /bin/sh" >conf$$.sh
19764 echo "exit 0" >>conf$$.sh
19765 chmod +x conf$$.sh
19766 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
19767 PATH_SEPARATOR=';'
19768 else
19769 PATH_SEPARATOR=:
19770 fi
19771 rm -f conf$$.sh
19772 fi
19773
19774 # Find out how to test for executable files. Don't use a zero-byte file,
19775 # as systems may use methods other than mode bits to determine executability.
19776 cat >conf$$.file <<_ASEOF
19777 #! /bin/sh
19778 exit 0
19779 _ASEOF
19780 chmod +x conf$$.file
19781 if test -x conf$$.file >/dev/null 2>&1; then
19782 ac_executable_p="test -x"
19783 else
19784 ac_executable_p="test -f"
19785 fi
19786 rm -f conf$$.file
19787
19788 # Extract the first word of "msgmerge", so it can be a program name with args.
19789 set dummy msgmerge; ac_word=$2
19790 echo "$as_me:$LINENO: checking for $ac_word" >&5
19791 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19792 if test "${ac_cv_path_MSGMERGE+set}" = set; then
19793 echo $ECHO_N "(cached) $ECHO_C" >&6
19794 else
19795 case "$MSGMERGE" in
19796 [\\/]* | ?:[\\/]*)
19797 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
19798 ;;
19799 *)
19800 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
19801 for ac_dir in $PATH; do
19802 IFS="$ac_save_IFS"
19803 test -z "$ac_dir" && ac_dir=.
19804 for ac_exec_ext in '' $ac_executable_extensions; do
19805 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
19806 echo "$as_me: trying $ac_dir/$ac_word..." >&5
19807 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
19808 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
19809 break 2
19810 fi
19811 fi
19812 done
19813 done
19814 IFS="$ac_save_IFS"
19815 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
19816 ;;
19817 esac
19818 fi
19819 MSGMERGE="$ac_cv_path_MSGMERGE"
19820 if test "$MSGMERGE" != ":"; then
19821 echo "$as_me:$LINENO: result: $MSGMERGE" >&5
19822 echo "${ECHO_T}$MSGMERGE" >&6
19823 else
19824 echo "$as_me:$LINENO: result: no" >&5
19825 echo "${ECHO_T}no" >&6
19826 fi
19827
19828
19829 if test "$GMSGFMT" != ":"; then
19830 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
19831 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
19832 : ;
19833 else
19834 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
19835 echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
19836 echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6
19837 GMSGFMT=":"
19838 fi
19839 fi
19840
19841 if test "$XGETTEXT" != ":"; then
19842 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
19843 (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
19844 : ;
19845 else
19846 echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
19847 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
19848 XGETTEXT=":"
19849 fi
19850 rm -f messages.po
19851 fi
19852
19853 ac_config_commands="$ac_config_commands default-1"
19854
19855
19856
19857 echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2 or newer" >&5
19858 echo $ECHO_N "checking whether we are using the GNU C Library 2 or newer... $ECHO_C" >&6
19859 if test "${ac_cv_gnu_library_2+set}" = set; then
19860 echo $ECHO_N "(cached) $ECHO_C" >&6
19861 else
19862 cat >conftest.$ac_ext <<_ACEOF
19863 /* confdefs.h. */
19864 _ACEOF
19865 cat confdefs.h >>conftest.$ac_ext
19866 cat >>conftest.$ac_ext <<_ACEOF
19867 /* end confdefs.h. */
19868
19869 #include <features.h>
19870 #ifdef __GNU_LIBRARY__
19871 #if (__GLIBC__ >= 2)
19872 Lucky GNU user
19873 #endif
19874 #endif
19875
19876 _ACEOF
19877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19878 $EGREP "Lucky GNU user" >/dev/null 2>&1; then
19879 ac_cv_gnu_library_2=yes
19880 else
19881 ac_cv_gnu_library_2=no
19882 fi
19883 rm -f conftest*
19884
19885
19886
19887 fi
19888 echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2" >&5
19889 echo "${ECHO_T}$ac_cv_gnu_library_2" >&6
19890
19891 GLIBC2="$ac_cv_gnu_library_2"
19892
19893
19894 if test -n "$ac_tool_prefix"; then
19895 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
19896 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
19897 echo "$as_me:$LINENO: checking for $ac_word" >&5
19898 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19899 if test "${ac_cv_prog_RANLIB+set}" = set; then
19900 echo $ECHO_N "(cached) $ECHO_C" >&6
19901 else
19902 if test -n "$RANLIB"; then
19903 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
19904 else
19905 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19906 for as_dir in $PATH
19907 do
19908 IFS=$as_save_IFS
19909 test -z "$as_dir" && as_dir=.
19910 for ac_exec_ext in '' $ac_executable_extensions; do
19911 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19912 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
19913 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19914 break 2
19915 fi
19916 done
19917 done
19918
19919 fi
19920 fi
19921 RANLIB=$ac_cv_prog_RANLIB
19922 if test -n "$RANLIB"; then
19923 echo "$as_me:$LINENO: result: $RANLIB" >&5
19924 echo "${ECHO_T}$RANLIB" >&6
19925 else
19926 echo "$as_me:$LINENO: result: no" >&5
19927 echo "${ECHO_T}no" >&6
19928 fi
19929
19930 fi
19931 if test -z "$ac_cv_prog_RANLIB"; then
19932 ac_ct_RANLIB=$RANLIB
19933 # Extract the first word of "ranlib", so it can be a program name with args.
19934 set dummy ranlib; ac_word=$2
19935 echo "$as_me:$LINENO: checking for $ac_word" >&5
19936 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19937 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
19938 echo $ECHO_N "(cached) $ECHO_C" >&6
19939 else
19940 if test -n "$ac_ct_RANLIB"; then
19941 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
19942 else
19943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19944 for as_dir in $PATH
19945 do
19946 IFS=$as_save_IFS
19947 test -z "$as_dir" && as_dir=.
19948 for ac_exec_ext in '' $ac_executable_extensions; do
19949 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19950 ac_cv_prog_ac_ct_RANLIB="ranlib"
19951 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19952 break 2
19953 fi
19954 done
19955 done
19956
19957 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
19958 fi
19959 fi
19960 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
19961 if test -n "$ac_ct_RANLIB"; then
19962 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
19963 echo "${ECHO_T}$ac_ct_RANLIB" >&6
19964 else
19965 echo "$as_me:$LINENO: result: no" >&5
19966 echo "${ECHO_T}no" >&6
19967 fi
19968
19969 RANLIB=$ac_ct_RANLIB
19970 else
19971 RANLIB="$ac_cv_prog_RANLIB"
19972 fi
19973
19974
19975 echo "$as_me:$LINENO: checking for signed" >&5
19976 echo $ECHO_N "checking for signed... $ECHO_C" >&6
19977 if test "${bh_cv_c_signed+set}" = set; then
19978 echo $ECHO_N "(cached) $ECHO_C" >&6
19979 else
19980 cat >conftest.$ac_ext <<_ACEOF
19981 /* confdefs.h. */
19982 _ACEOF
19983 cat confdefs.h >>conftest.$ac_ext
19984 cat >>conftest.$ac_ext <<_ACEOF
19985 /* end confdefs.h. */
19986
19987 int
19988 main ()
19989 {
19990 signed char x;
19991 ;
19992 return 0;
19993 }
19994 _ACEOF
19995 rm -f conftest.$ac_objext
19996 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19997 (eval $ac_compile) 2>conftest.er1
19998 ac_status=$?
19999 grep -v '^ *+' conftest.er1 >conftest.err
20000 rm -f conftest.er1
20001 cat conftest.err >&5
20002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20003 (exit $ac_status); } &&
20004 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20006 (eval $ac_try) 2>&5
20007 ac_status=$?
20008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20009 (exit $ac_status); }; } &&
20010 { ac_try='test -s conftest.$ac_objext'
20011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20012 (eval $ac_try) 2>&5
20013 ac_status=$?
20014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20015 (exit $ac_status); }; }; then
20016 bh_cv_c_signed=yes
20017 else
20018 echo "$as_me: failed program was:" >&5
20019 sed 's/^/| /' conftest.$ac_ext >&5
20020
20021 bh_cv_c_signed=no
20022 fi
20023 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20024 fi
20025 echo "$as_me:$LINENO: result: $bh_cv_c_signed" >&5
20026 echo "${ECHO_T}$bh_cv_c_signed" >&6
20027 if test $bh_cv_c_signed = no; then
20028
20029 cat >>confdefs.h <<\_ACEOF
20030 #define signed
20031 _ACEOF
20032
20033 fi
20034
20035 echo "$as_me:$LINENO: checking for inline" >&5
20036 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20037 if test "${ac_cv_c_inline+set}" = set; then
20038 echo $ECHO_N "(cached) $ECHO_C" >&6
20039 else
20040 ac_cv_c_inline=no
20041 for ac_kw in inline __inline__ __inline; do
20042 cat >conftest.$ac_ext <<_ACEOF
20043 /* confdefs.h. */
20044 _ACEOF
20045 cat confdefs.h >>conftest.$ac_ext
20046 cat >>conftest.$ac_ext <<_ACEOF
20047 /* end confdefs.h. */
20048 #ifndef __cplusplus
20049 typedef int foo_t;
20050 static $ac_kw foo_t static_foo () {return 0; }
20051 $ac_kw foo_t foo () {return 0; }
20052 #endif
20053
20054 _ACEOF
20055 rm -f conftest.$ac_objext
20056 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20057 (eval $ac_compile) 2>conftest.er1
20058 ac_status=$?
20059 grep -v '^ *+' conftest.er1 >conftest.err
20060 rm -f conftest.er1
20061 cat conftest.err >&5
20062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20063 (exit $ac_status); } &&
20064 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20066 (eval $ac_try) 2>&5
20067 ac_status=$?
20068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20069 (exit $ac_status); }; } &&
20070 { ac_try='test -s conftest.$ac_objext'
20071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20072 (eval $ac_try) 2>&5
20073 ac_status=$?
20074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20075 (exit $ac_status); }; }; then
20076 ac_cv_c_inline=$ac_kw; break
20077 else
20078 echo "$as_me: failed program was:" >&5
20079 sed 's/^/| /' conftest.$ac_ext >&5
20080
20081 fi
20082 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20083 done
20084
20085 fi
20086 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
20087 echo "${ECHO_T}$ac_cv_c_inline" >&6
20088
20089
20090 case $ac_cv_c_inline in
20091 inline | yes) ;;
20092 *)
20093 case $ac_cv_c_inline in
20094 no) ac_val=;;
20095 *) ac_val=$ac_cv_c_inline;;
20096 esac
20097 cat >>confdefs.h <<_ACEOF
20098 #ifndef __cplusplus
20099 #define inline $ac_val
20100 #endif
20101 _ACEOF
20102 ;;
20103 esac
20104
20105 echo "$as_me:$LINENO: checking for off_t" >&5
20106 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
20107 if test "${ac_cv_type_off_t+set}" = set; then
20108 echo $ECHO_N "(cached) $ECHO_C" >&6
20109 else
20110 cat >conftest.$ac_ext <<_ACEOF
20111 /* confdefs.h. */
20112 _ACEOF
20113 cat confdefs.h >>conftest.$ac_ext
20114 cat >>conftest.$ac_ext <<_ACEOF
20115 /* end confdefs.h. */
20116 $ac_includes_default
20117 int
20118 main ()
20119 {
20120 if ((off_t *) 0)
20121 return 0;
20122 if (sizeof (off_t))
20123 return 0;
20124 ;
20125 return 0;
20126 }
20127 _ACEOF
20128 rm -f conftest.$ac_objext
20129 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20130 (eval $ac_compile) 2>conftest.er1
20131 ac_status=$?
20132 grep -v '^ *+' conftest.er1 >conftest.err
20133 rm -f conftest.er1
20134 cat conftest.err >&5
20135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20136 (exit $ac_status); } &&
20137 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20139 (eval $ac_try) 2>&5
20140 ac_status=$?
20141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20142 (exit $ac_status); }; } &&
20143 { ac_try='test -s conftest.$ac_objext'
20144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20145 (eval $ac_try) 2>&5
20146 ac_status=$?
20147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20148 (exit $ac_status); }; }; then
20149 ac_cv_type_off_t=yes
20150 else
20151 echo "$as_me: failed program was:" >&5
20152 sed 's/^/| /' conftest.$ac_ext >&5
20153
20154 ac_cv_type_off_t=no
20155 fi
20156 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20157 fi
20158 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
20159 echo "${ECHO_T}$ac_cv_type_off_t" >&6
20160 if test $ac_cv_type_off_t = yes; then
20161 :
20162 else
20163
20164 cat >>confdefs.h <<_ACEOF
20165 #define off_t long
20166 _ACEOF
20167
20168 fi
20169
20170 echo "$as_me:$LINENO: checking for size_t" >&5
20171 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
20172 if test "${ac_cv_type_size_t+set}" = set; then
20173 echo $ECHO_N "(cached) $ECHO_C" >&6
20174 else
20175 cat >conftest.$ac_ext <<_ACEOF
20176 /* confdefs.h. */
20177 _ACEOF
20178 cat confdefs.h >>conftest.$ac_ext
20179 cat >>conftest.$ac_ext <<_ACEOF
20180 /* end confdefs.h. */
20181 $ac_includes_default
20182 int
20183 main ()
20184 {
20185 if ((size_t *) 0)
20186 return 0;
20187 if (sizeof (size_t))
20188 return 0;
20189 ;
20190 return 0;
20191 }
20192 _ACEOF
20193 rm -f conftest.$ac_objext
20194 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20195 (eval $ac_compile) 2>conftest.er1
20196 ac_status=$?
20197 grep -v '^ *+' conftest.er1 >conftest.err
20198 rm -f conftest.er1
20199 cat conftest.err >&5
20200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20201 (exit $ac_status); } &&
20202 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20204 (eval $ac_try) 2>&5
20205 ac_status=$?
20206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20207 (exit $ac_status); }; } &&
20208 { ac_try='test -s conftest.$ac_objext'
20209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20210 (eval $ac_try) 2>&5
20211 ac_status=$?
20212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20213 (exit $ac_status); }; }; then
20214 ac_cv_type_size_t=yes
20215 else
20216 echo "$as_me: failed program was:" >&5
20217 sed 's/^/| /' conftest.$ac_ext >&5
20218
20219 ac_cv_type_size_t=no
20220 fi
20221 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20222 fi
20223 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
20224 echo "${ECHO_T}$ac_cv_type_size_t" >&6
20225 if test $ac_cv_type_size_t = yes; then
20226 :
20227 else
20228
20229 cat >>confdefs.h <<_ACEOF
20230 #define size_t unsigned
20231 _ACEOF
20232
20233 fi
20234
20235
20236 echo "$as_me:$LINENO: checking for long long" >&5
20237 echo $ECHO_N "checking for long long... $ECHO_C" >&6
20238 if test "${ac_cv_type_long_long+set}" = set; then
20239 echo $ECHO_N "(cached) $ECHO_C" >&6
20240 else
20241 cat >conftest.$ac_ext <<_ACEOF
20242 /* confdefs.h. */
20243 _ACEOF
20244 cat confdefs.h >>conftest.$ac_ext
20245 cat >>conftest.$ac_ext <<_ACEOF
20246 /* end confdefs.h. */
20247 long long ll = 1LL; int i = 63;
20248 int
20249 main ()
20250 {
20251 long long llmax = (long long) -1;
20252 return ll << i | ll >> i | llmax / ll | llmax % ll;
20253 ;
20254 return 0;
20255 }
20256 _ACEOF
20257 rm -f conftest.$ac_objext conftest$ac_exeext
20258 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20259 (eval $ac_link) 2>conftest.er1
20260 ac_status=$?
20261 grep -v '^ *+' conftest.er1 >conftest.err
20262 rm -f conftest.er1
20263 cat conftest.err >&5
20264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20265 (exit $ac_status); } &&
20266 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20268 (eval $ac_try) 2>&5
20269 ac_status=$?
20270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20271 (exit $ac_status); }; } &&
20272 { ac_try='test -s conftest$ac_exeext'
20273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20274 (eval $ac_try) 2>&5
20275 ac_status=$?
20276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20277 (exit $ac_status); }; }; then
20278 ac_cv_type_long_long=yes
20279 else
20280 echo "$as_me: failed program was:" >&5
20281 sed 's/^/| /' conftest.$ac_ext >&5
20282
20283 ac_cv_type_long_long=no
20284 fi
20285 rm -f conftest.err conftest.$ac_objext \
20286 conftest$ac_exeext conftest.$ac_ext
20287 fi
20288 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
20289 echo "${ECHO_T}$ac_cv_type_long_long" >&6
20290 if test $ac_cv_type_long_long = yes; then
20291
20292 cat >>confdefs.h <<\_ACEOF
20293 #define HAVE_LONG_LONG 1
20294 _ACEOF
20295
20296 fi
20297
20298
20299 echo "$as_me:$LINENO: checking for long double" >&5
20300 echo $ECHO_N "checking for long double... $ECHO_C" >&6
20301 if test "${gt_cv_c_long_double+set}" = set; then
20302 echo $ECHO_N "(cached) $ECHO_C" >&6
20303 else
20304 if test "$GCC" = yes; then
20305 gt_cv_c_long_double=yes
20306 else
20307 cat >conftest.$ac_ext <<_ACEOF
20308 /* confdefs.h. */
20309 _ACEOF
20310 cat confdefs.h >>conftest.$ac_ext
20311 cat >>conftest.$ac_ext <<_ACEOF
20312 /* end confdefs.h. */
20313
20314 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
20315 long double foo = 0.0;
20316 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
20317 int array [2*(sizeof(long double) >= sizeof(double)) - 1];
20318
20319 int
20320 main ()
20321 {
20322
20323 ;
20324 return 0;
20325 }
20326 _ACEOF
20327 rm -f conftest.$ac_objext
20328 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20329 (eval $ac_compile) 2>conftest.er1
20330 ac_status=$?
20331 grep -v '^ *+' conftest.er1 >conftest.err
20332 rm -f conftest.er1
20333 cat conftest.err >&5
20334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20335 (exit $ac_status); } &&
20336 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20338 (eval $ac_try) 2>&5
20339 ac_status=$?
20340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20341 (exit $ac_status); }; } &&
20342 { ac_try='test -s conftest.$ac_objext'
20343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20344 (eval $ac_try) 2>&5
20345 ac_status=$?
20346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20347 (exit $ac_status); }; }; then
20348 gt_cv_c_long_double=yes
20349 else
20350 echo "$as_me: failed program was:" >&5
20351 sed 's/^/| /' conftest.$ac_ext >&5
20352
20353 gt_cv_c_long_double=no
20354 fi
20355 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20356 fi
20357 fi
20358 echo "$as_me:$LINENO: result: $gt_cv_c_long_double" >&5
20359 echo "${ECHO_T}$gt_cv_c_long_double" >&6
20360 if test $gt_cv_c_long_double = yes; then
20361
20362 cat >>confdefs.h <<\_ACEOF
20363 #define HAVE_LONG_DOUBLE 1
20364 _ACEOF
20365
20366 fi
20367
20368
20369 echo "$as_me:$LINENO: checking for wchar_t" >&5
20370 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20371 if test "${gt_cv_c_wchar_t+set}" = set; then
20372 echo $ECHO_N "(cached) $ECHO_C" >&6
20373 else
20374 cat >conftest.$ac_ext <<_ACEOF
20375 /* confdefs.h. */
20376 _ACEOF
20377 cat confdefs.h >>conftest.$ac_ext
20378 cat >>conftest.$ac_ext <<_ACEOF
20379 /* end confdefs.h. */
20380 #include <stddef.h>
20381 wchar_t foo = (wchar_t)'\0';
20382 int
20383 main ()
20384 {
20385
20386 ;
20387 return 0;
20388 }
20389 _ACEOF
20390 rm -f conftest.$ac_objext
20391 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20392 (eval $ac_compile) 2>conftest.er1
20393 ac_status=$?
20394 grep -v '^ *+' conftest.er1 >conftest.err
20395 rm -f conftest.er1
20396 cat conftest.err >&5
20397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20398 (exit $ac_status); } &&
20399 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20401 (eval $ac_try) 2>&5
20402 ac_status=$?
20403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20404 (exit $ac_status); }; } &&
20405 { ac_try='test -s conftest.$ac_objext'
20406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20407 (eval $ac_try) 2>&5
20408 ac_status=$?
20409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20410 (exit $ac_status); }; }; then
20411 gt_cv_c_wchar_t=yes
20412 else
20413 echo "$as_me: failed program was:" >&5
20414 sed 's/^/| /' conftest.$ac_ext >&5
20415
20416 gt_cv_c_wchar_t=no
20417 fi
20418 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20419 fi
20420 echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5
20421 echo "${ECHO_T}$gt_cv_c_wchar_t" >&6
20422 if test $gt_cv_c_wchar_t = yes; then
20423
20424 cat >>confdefs.h <<\_ACEOF
20425 #define HAVE_WCHAR_T 1
20426 _ACEOF
20427
20428 fi
20429
20430
20431 echo "$as_me:$LINENO: checking for wint_t" >&5
20432 echo $ECHO_N "checking for wint_t... $ECHO_C" >&6
20433 if test "${gt_cv_c_wint_t+set}" = set; then
20434 echo $ECHO_N "(cached) $ECHO_C" >&6
20435 else
20436 cat >conftest.$ac_ext <<_ACEOF
20437 /* confdefs.h. */
20438 _ACEOF
20439 cat confdefs.h >>conftest.$ac_ext
20440 cat >>conftest.$ac_ext <<_ACEOF
20441 /* end confdefs.h. */
20442 #include <wchar.h>
20443 wint_t foo = (wchar_t)'\0';
20444 int
20445 main ()
20446 {
20447
20448 ;
20449 return 0;
20450 }
20451 _ACEOF
20452 rm -f conftest.$ac_objext
20453 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20454 (eval $ac_compile) 2>conftest.er1
20455 ac_status=$?
20456 grep -v '^ *+' conftest.er1 >conftest.err
20457 rm -f conftest.er1
20458 cat conftest.err >&5
20459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20460 (exit $ac_status); } &&
20461 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20463 (eval $ac_try) 2>&5
20464 ac_status=$?
20465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20466 (exit $ac_status); }; } &&
20467 { ac_try='test -s conftest.$ac_objext'
20468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20469 (eval $ac_try) 2>&5
20470 ac_status=$?
20471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20472 (exit $ac_status); }; }; then
20473 gt_cv_c_wint_t=yes
20474 else
20475 echo "$as_me: failed program was:" >&5
20476 sed 's/^/| /' conftest.$ac_ext >&5
20477
20478 gt_cv_c_wint_t=no
20479 fi
20480 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20481 fi
20482 echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5
20483 echo "${ECHO_T}$gt_cv_c_wint_t" >&6
20484 if test $gt_cv_c_wint_t = yes; then
20485
20486 cat >>confdefs.h <<\_ACEOF
20487 #define HAVE_WINT_T 1
20488 _ACEOF
20489
20490 fi
20491
20492
20493 echo "$as_me:$LINENO: checking for inttypes.h" >&5
20494 echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
20495 if test "${gl_cv_header_inttypes_h+set}" = set; then
20496 echo $ECHO_N "(cached) $ECHO_C" >&6
20497 else
20498 cat >conftest.$ac_ext <<_ACEOF
20499 /* confdefs.h. */
20500 _ACEOF
20501 cat confdefs.h >>conftest.$ac_ext
20502 cat >>conftest.$ac_ext <<_ACEOF
20503 /* end confdefs.h. */
20504 #include <sys/types.h>
20505 #include <inttypes.h>
20506 int
20507 main ()
20508 {
20509 uintmax_t i = (uintmax_t) -1;
20510 ;
20511 return 0;
20512 }
20513 _ACEOF
20514 rm -f conftest.$ac_objext
20515 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20516 (eval $ac_compile) 2>conftest.er1
20517 ac_status=$?
20518 grep -v '^ *+' conftest.er1 >conftest.err
20519 rm -f conftest.er1
20520 cat conftest.err >&5
20521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20522 (exit $ac_status); } &&
20523 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20525 (eval $ac_try) 2>&5
20526 ac_status=$?
20527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20528 (exit $ac_status); }; } &&
20529 { ac_try='test -s conftest.$ac_objext'
20530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20531 (eval $ac_try) 2>&5
20532 ac_status=$?
20533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20534 (exit $ac_status); }; }; then
20535 gl_cv_header_inttypes_h=yes
20536 else
20537 echo "$as_me: failed program was:" >&5
20538 sed 's/^/| /' conftest.$ac_ext >&5
20539
20540 gl_cv_header_inttypes_h=no
20541 fi
20542 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20543 fi
20544 echo "$as_me:$LINENO: result: $gl_cv_header_inttypes_h" >&5
20545 echo "${ECHO_T}$gl_cv_header_inttypes_h" >&6
20546 if test $gl_cv_header_inttypes_h = yes; then
20547
20548 cat >>confdefs.h <<_ACEOF
20549 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
20550 _ACEOF
20551
20552 fi
20553
20554
20555 echo "$as_me:$LINENO: checking for stdint.h" >&5
20556 echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6
20557 if test "${gl_cv_header_stdint_h+set}" = set; then
20558 echo $ECHO_N "(cached) $ECHO_C" >&6
20559 else
20560 cat >conftest.$ac_ext <<_ACEOF
20561 /* confdefs.h. */
20562 _ACEOF
20563 cat confdefs.h >>conftest.$ac_ext
20564 cat >>conftest.$ac_ext <<_ACEOF
20565 /* end confdefs.h. */
20566 #include <sys/types.h>
20567 #include <stdint.h>
20568 int
20569 main ()
20570 {
20571 uintmax_t i = (uintmax_t) -1;
20572 ;
20573 return 0;
20574 }
20575 _ACEOF
20576 rm -f conftest.$ac_objext
20577 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20578 (eval $ac_compile) 2>conftest.er1
20579 ac_status=$?
20580 grep -v '^ *+' conftest.er1 >conftest.err
20581 rm -f conftest.er1
20582 cat conftest.err >&5
20583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20584 (exit $ac_status); } &&
20585 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20587 (eval $ac_try) 2>&5
20588 ac_status=$?
20589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20590 (exit $ac_status); }; } &&
20591 { ac_try='test -s conftest.$ac_objext'
20592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20593 (eval $ac_try) 2>&5
20594 ac_status=$?
20595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20596 (exit $ac_status); }; }; then
20597 gl_cv_header_stdint_h=yes
20598 else
20599 echo "$as_me: failed program was:" >&5
20600 sed 's/^/| /' conftest.$ac_ext >&5
20601
20602 gl_cv_header_stdint_h=no
20603 fi
20604 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20605 fi
20606 echo "$as_me:$LINENO: result: $gl_cv_header_stdint_h" >&5
20607 echo "${ECHO_T}$gl_cv_header_stdint_h" >&6
20608 if test $gl_cv_header_stdint_h = yes; then
20609
20610 cat >>confdefs.h <<_ACEOF
20611 #define HAVE_STDINT_H_WITH_UINTMAX 1
20612 _ACEOF
20613
20614 fi
20615
20616
20617
20618
20619 echo "$as_me:$LINENO: checking for intmax_t" >&5
20620 echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6
20621 if test "${gt_cv_c_intmax_t+set}" = set; then
20622 echo $ECHO_N "(cached) $ECHO_C" >&6
20623 else
20624 cat >conftest.$ac_ext <<_ACEOF
20625 /* confdefs.h. */
20626 _ACEOF
20627 cat confdefs.h >>conftest.$ac_ext
20628 cat >>conftest.$ac_ext <<_ACEOF
20629 /* end confdefs.h. */
20630
20631 #include <stddef.h>
20632 #include <stdlib.h>
20633 #if HAVE_STDINT_H_WITH_UINTMAX
20634 #include <stdint.h>
20635 #endif
20636 #if HAVE_INTTYPES_H_WITH_UINTMAX
20637 #include <inttypes.h>
20638 #endif
20639
20640 int
20641 main ()
20642 {
20643 intmax_t x = -1;
20644 ;
20645 return 0;
20646 }
20647 _ACEOF
20648 rm -f conftest.$ac_objext
20649 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20650 (eval $ac_compile) 2>conftest.er1
20651 ac_status=$?
20652 grep -v '^ *+' conftest.er1 >conftest.err
20653 rm -f conftest.er1
20654 cat conftest.err >&5
20655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20656 (exit $ac_status); } &&
20657 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20659 (eval $ac_try) 2>&5
20660 ac_status=$?
20661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20662 (exit $ac_status); }; } &&
20663 { ac_try='test -s conftest.$ac_objext'
20664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20665 (eval $ac_try) 2>&5
20666 ac_status=$?
20667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20668 (exit $ac_status); }; }; then
20669 gt_cv_c_intmax_t=yes
20670 else
20671 echo "$as_me: failed program was:" >&5
20672 sed 's/^/| /' conftest.$ac_ext >&5
20673
20674 gt_cv_c_intmax_t=no
20675 fi
20676 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20677 fi
20678 echo "$as_me:$LINENO: result: $gt_cv_c_intmax_t" >&5
20679 echo "${ECHO_T}$gt_cv_c_intmax_t" >&6
20680 if test $gt_cv_c_intmax_t = yes; then
20681
20682 cat >>confdefs.h <<\_ACEOF
20683 #define HAVE_INTMAX_T 1
20684 _ACEOF
20685
20686 fi
20687
20688
20689
20690 echo "$as_me:$LINENO: checking whether printf() supports POSIX/XSI format strings" >&5
20691 echo $ECHO_N "checking whether printf() supports POSIX/XSI format strings... $ECHO_C" >&6
20692 if test "${gt_cv_func_printf_posix+set}" = set; then
20693 echo $ECHO_N "(cached) $ECHO_C" >&6
20694 else
20695
20696 if test "$cross_compiling" = yes; then
20697
20698 cat >conftest.$ac_ext <<_ACEOF
20699 /* confdefs.h. */
20700 _ACEOF
20701 cat confdefs.h >>conftest.$ac_ext
20702 cat >>conftest.$ac_ext <<_ACEOF
20703 /* end confdefs.h. */
20704
20705 #if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
20706 notposix
20707 #endif
20708
20709 _ACEOF
20710 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20711 $EGREP "notposix" >/dev/null 2>&1; then
20712 gt_cv_func_printf_posix="guessing no"
20713 else
20714 gt_cv_func_printf_posix="guessing yes"
20715 fi
20716 rm -f conftest*
20717
20718
20719 else
20720 cat >conftest.$ac_ext <<_ACEOF
20721 /* confdefs.h. */
20722 _ACEOF
20723 cat confdefs.h >>conftest.$ac_ext
20724 cat >>conftest.$ac_ext <<_ACEOF
20725 /* end confdefs.h. */
20726
20727 #include <stdio.h>
20728 #include <string.h>
20729 /* The string "%2$d %1$d", with dollar characters protected from the shell's
20730 dollar expansion (possibly an autoconf bug). */
20731 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
20732 static char buf[100];
20733 int main ()
20734 {
20735 sprintf (buf, format, 33, 55);
20736 return (strcmp (buf, "55 33") != 0);
20737 }
20738 _ACEOF
20739 rm -f conftest$ac_exeext
20740 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20741 (eval $ac_link) 2>&5
20742 ac_status=$?
20743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20744 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20746 (eval $ac_try) 2>&5
20747 ac_status=$?
20748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20749 (exit $ac_status); }; }; then
20750 gt_cv_func_printf_posix=yes
20751 else
20752 echo "$as_me: program exited with status $ac_status" >&5
20753 echo "$as_me: failed program was:" >&5
20754 sed 's/^/| /' conftest.$ac_ext >&5
20755
20756 ( exit $ac_status )
20757 gt_cv_func_printf_posix=no
20758 fi
20759 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20760 fi
20761
20762 fi
20763 echo "$as_me:$LINENO: result: $gt_cv_func_printf_posix" >&5
20764 echo "${ECHO_T}$gt_cv_func_printf_posix" >&6
20765 case $gt_cv_func_printf_posix in
20766 *yes)
20767
20768 cat >>confdefs.h <<\_ACEOF
20769 #define HAVE_POSIX_PRINTF 1
20770 _ACEOF
20771
20772 ;;
20773 esac
20774
20775 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
20776 # for constant arguments. Useless!
20777 echo "$as_me:$LINENO: checking for working alloca.h" >&5
20778 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
20779 if test "${ac_cv_working_alloca_h+set}" = set; then
20780 echo $ECHO_N "(cached) $ECHO_C" >&6
20781 else
20782 cat >conftest.$ac_ext <<_ACEOF
20783 /* confdefs.h. */
20784 _ACEOF
20785 cat confdefs.h >>conftest.$ac_ext
20786 cat >>conftest.$ac_ext <<_ACEOF
20787 /* end confdefs.h. */
20788 #include <alloca.h>
20789 int
20790 main ()
20791 {
20792 char *p = (char *) alloca (2 * sizeof (int));
20793 ;
20794 return 0;
20795 }
20796 _ACEOF
20797 rm -f conftest.$ac_objext conftest$ac_exeext
20798 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20799 (eval $ac_link) 2>conftest.er1
20800 ac_status=$?
20801 grep -v '^ *+' conftest.er1 >conftest.err
20802 rm -f conftest.er1
20803 cat conftest.err >&5
20804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20805 (exit $ac_status); } &&
20806 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20808 (eval $ac_try) 2>&5
20809 ac_status=$?
20810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20811 (exit $ac_status); }; } &&
20812 { ac_try='test -s conftest$ac_exeext'
20813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20814 (eval $ac_try) 2>&5
20815 ac_status=$?
20816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20817 (exit $ac_status); }; }; then
20818 ac_cv_working_alloca_h=yes
20819 else
20820 echo "$as_me: failed program was:" >&5
20821 sed 's/^/| /' conftest.$ac_ext >&5
20822
20823 ac_cv_working_alloca_h=no
20824 fi
20825 rm -f conftest.err conftest.$ac_objext \
20826 conftest$ac_exeext conftest.$ac_ext
20827 fi
20828 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
20829 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
20830 if test $ac_cv_working_alloca_h = yes; then
20831
20832 cat >>confdefs.h <<\_ACEOF
20833 #define HAVE_ALLOCA_H 1
20834 _ACEOF
20835
20836 fi
20837
20838 echo "$as_me:$LINENO: checking for alloca" >&5
20839 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
20840 if test "${ac_cv_func_alloca_works+set}" = set; then
20841 echo $ECHO_N "(cached) $ECHO_C" >&6
20842 else
20843 cat >conftest.$ac_ext <<_ACEOF
20844 /* confdefs.h. */
20845 _ACEOF
20846 cat confdefs.h >>conftest.$ac_ext
20847 cat >>conftest.$ac_ext <<_ACEOF
20848 /* end confdefs.h. */
20849 #ifdef __GNUC__
20850 # define alloca __builtin_alloca
20851 #else
20852 # ifdef _MSC_VER
20853 # include <malloc.h>
20854 # define alloca _alloca
20855 # else
20856 # if HAVE_ALLOCA_H
20857 # include <alloca.h>
20858 # else
20859 # ifdef _AIX
20860 #pragma alloca
20861 # else
20862 # ifndef alloca /* predefined by HP cc +Olibcalls */
20863 char *alloca ();
20864 # endif
20865 # endif
20866 # endif
20867 # endif
20868 #endif
20869
20870 int
20871 main ()
20872 {
20873 char *p = (char *) alloca (1);
20874 ;
20875 return 0;
20876 }
20877 _ACEOF
20878 rm -f conftest.$ac_objext conftest$ac_exeext
20879 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20880 (eval $ac_link) 2>conftest.er1
20881 ac_status=$?
20882 grep -v '^ *+' conftest.er1 >conftest.err
20883 rm -f conftest.er1
20884 cat conftest.err >&5
20885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20886 (exit $ac_status); } &&
20887 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20889 (eval $ac_try) 2>&5
20890 ac_status=$?
20891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20892 (exit $ac_status); }; } &&
20893 { ac_try='test -s conftest$ac_exeext'
20894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20895 (eval $ac_try) 2>&5
20896 ac_status=$?
20897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20898 (exit $ac_status); }; }; then
20899 ac_cv_func_alloca_works=yes
20900 else
20901 echo "$as_me: failed program was:" >&5
20902 sed 's/^/| /' conftest.$ac_ext >&5
20903
20904 ac_cv_func_alloca_works=no
20905 fi
20906 rm -f conftest.err conftest.$ac_objext \
20907 conftest$ac_exeext conftest.$ac_ext
20908 fi
20909 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
20910 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
20911
20912 if test $ac_cv_func_alloca_works = yes; then
20913
20914 cat >>confdefs.h <<\_ACEOF
20915 #define HAVE_ALLOCA 1
20916 _ACEOF
20917
20918 else
20919 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
20920 # that cause trouble. Some versions do not even contain alloca or
20921 # contain a buggy version. If you still want to use their alloca,
20922 # use ar to extract alloca.o from them instead of compiling alloca.c.
20923
20924 ALLOCA=alloca.$ac_objext
20925
20926 cat >>confdefs.h <<\_ACEOF
20927 #define C_ALLOCA 1
20928 _ACEOF
20929
20930
20931 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
20932 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
20933 if test "${ac_cv_os_cray+set}" = set; then
20934 echo $ECHO_N "(cached) $ECHO_C" >&6
20935 else
20936 cat >conftest.$ac_ext <<_ACEOF
20937 /* confdefs.h. */
20938 _ACEOF
20939 cat confdefs.h >>conftest.$ac_ext
20940 cat >>conftest.$ac_ext <<_ACEOF
20941 /* end confdefs.h. */
20942 #if defined(CRAY) && ! defined(CRAY2)
20943 webecray
20944 #else
20945 wenotbecray
20946 #endif
20947
20948 _ACEOF
20949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20950 $EGREP "webecray" >/dev/null 2>&1; then
20951 ac_cv_os_cray=yes
20952 else
20953 ac_cv_os_cray=no
20954 fi
20955 rm -f conftest*
20956
20957 fi
20958 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
20959 echo "${ECHO_T}$ac_cv_os_cray" >&6
20960 if test $ac_cv_os_cray = yes; then
20961 for ac_func in _getb67 GETB67 getb67; do
20962 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20963 echo "$as_me:$LINENO: checking for $ac_func" >&5
20964 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20965 if eval "test \"\${$as_ac_var+set}\" = set"; then
20966 echo $ECHO_N "(cached) $ECHO_C" >&6
20967 else
20968 cat >conftest.$ac_ext <<_ACEOF
20969 /* confdefs.h. */
20970 _ACEOF
20971 cat confdefs.h >>conftest.$ac_ext
20972 cat >>conftest.$ac_ext <<_ACEOF
20973 /* end confdefs.h. */
20974 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20975 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20976 #define $ac_func innocuous_$ac_func
20977
20978 /* System header to define __stub macros and hopefully few prototypes,
20979 which can conflict with char $ac_func (); below.
20980 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20981 <limits.h> exists even on freestanding compilers. */
20982
20983 #ifdef __STDC__
20984 # include <limits.h>
20985 #else
20986 # include <assert.h>
20987 #endif
20988
20989 #undef $ac_func
20990
20991 /* Override any gcc2 internal prototype to avoid an error. */
20992 #ifdef __cplusplus
20993 extern "C"
20994 {
20995 #endif
20996 /* We use char because int might match the return type of a gcc2
20997 builtin and then its argument prototype would still apply. */
20998 char $ac_func ();
20999 /* The GNU C library defines this for functions which it implements
21000 to always fail with ENOSYS. Some functions are actually named
21001 something starting with __ and the normal name is an alias. */
21002 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21003 choke me
21004 #else
21005 char (*f) () = $ac_func;
21006 #endif
21007 #ifdef __cplusplus
21008 }
21009 #endif
21010
21011 int
21012 main ()
21013 {
21014 return f != $ac_func;
21015 ;
21016 return 0;
21017 }
21018 _ACEOF
21019 rm -f conftest.$ac_objext conftest$ac_exeext
21020 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21021 (eval $ac_link) 2>conftest.er1
21022 ac_status=$?
21023 grep -v '^ *+' conftest.er1 >conftest.err
21024 rm -f conftest.er1
21025 cat conftest.err >&5
21026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21027 (exit $ac_status); } &&
21028 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21030 (eval $ac_try) 2>&5
21031 ac_status=$?
21032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21033 (exit $ac_status); }; } &&
21034 { ac_try='test -s conftest$ac_exeext'
21035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21036 (eval $ac_try) 2>&5
21037 ac_status=$?
21038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21039 (exit $ac_status); }; }; then
21040 eval "$as_ac_var=yes"
21041 else
21042 echo "$as_me: failed program was:" >&5
21043 sed 's/^/| /' conftest.$ac_ext >&5
21044
21045 eval "$as_ac_var=no"
21046 fi
21047 rm -f conftest.err conftest.$ac_objext \
21048 conftest$ac_exeext conftest.$ac_ext
21049 fi
21050 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
21051 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21052 if test `eval echo '${'$as_ac_var'}'` = yes; then
21053
21054 cat >>confdefs.h <<_ACEOF
21055 #define CRAY_STACKSEG_END $ac_func
21056 _ACEOF
21057
21058 break
21059 fi
21060
21061 done
21062 fi
21063
21064 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
21065 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
21066 if test "${ac_cv_c_stack_direction+set}" = set; then
21067 echo $ECHO_N "(cached) $ECHO_C" >&6
21068 else
21069 if test "$cross_compiling" = yes; then
21070 ac_cv_c_stack_direction=0
21071 else
21072 cat >conftest.$ac_ext <<_ACEOF
21073 /* confdefs.h. */
21074 _ACEOF
21075 cat confdefs.h >>conftest.$ac_ext
21076 cat >>conftest.$ac_ext <<_ACEOF
21077 /* end confdefs.h. */
21078 int
21079 find_stack_direction ()
21080 {
21081 static char *addr = 0;
21082 auto char dummy;
21083 if (addr == 0)
21084 {
21085 addr = &dummy;
21086 return find_stack_direction ();
21087 }
21088 else
21089 return (&dummy > addr) ? 1 : -1;
21090 }
21091
21092 int
21093 main ()
21094 {
21095 exit (find_stack_direction () < 0);
21096 }
21097 _ACEOF
21098 rm -f conftest$ac_exeext
21099 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21100 (eval $ac_link) 2>&5
21101 ac_status=$?
21102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21103 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21105 (eval $ac_try) 2>&5
21106 ac_status=$?
21107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21108 (exit $ac_status); }; }; then
21109 ac_cv_c_stack_direction=1
21110 else
21111 echo "$as_me: program exited with status $ac_status" >&5
21112 echo "$as_me: failed program was:" >&5
21113 sed 's/^/| /' conftest.$ac_ext >&5
21114
21115 ( exit $ac_status )
21116 ac_cv_c_stack_direction=-1
21117 fi
21118 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21119 fi
21120 fi
21121 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
21122 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
21123
21124 cat >>confdefs.h <<_ACEOF
21125 #define STACK_DIRECTION $ac_cv_c_stack_direction
21126 _ACEOF
21127
21128
21129 fi
21130
21131
21132
21133 for ac_header in stdlib.h unistd.h
21134 do
21135 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21136 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21137 echo "$as_me:$LINENO: checking for $ac_header" >&5
21138 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21139 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21140 echo $ECHO_N "(cached) $ECHO_C" >&6
21141 fi
21142 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21143 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21144 else
21145 # Is the header compilable?
21146 echo "$as_me:$LINENO: checking $ac_header usability" >&5
21147 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
21148 cat >conftest.$ac_ext <<_ACEOF
21149 /* confdefs.h. */
21150 _ACEOF
21151 cat confdefs.h >>conftest.$ac_ext
21152 cat >>conftest.$ac_ext <<_ACEOF
21153 /* end confdefs.h. */
21154 $ac_includes_default
21155 #include <$ac_header>
21156 _ACEOF
21157 rm -f conftest.$ac_objext
21158 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21159 (eval $ac_compile) 2>conftest.er1
21160 ac_status=$?
21161 grep -v '^ *+' conftest.er1 >conftest.err
21162 rm -f conftest.er1
21163 cat conftest.err >&5
21164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21165 (exit $ac_status); } &&
21166 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21168 (eval $ac_try) 2>&5
21169 ac_status=$?
21170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21171 (exit $ac_status); }; } &&
21172 { ac_try='test -s conftest.$ac_objext'
21173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21174 (eval $ac_try) 2>&5
21175 ac_status=$?
21176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21177 (exit $ac_status); }; }; then
21178 ac_header_compiler=yes
21179 else
21180 echo "$as_me: failed program was:" >&5
21181 sed 's/^/| /' conftest.$ac_ext >&5
21182
21183 ac_header_compiler=no
21184 fi
21185 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21186 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21187 echo "${ECHO_T}$ac_header_compiler" >&6
21188
21189 # Is the header present?
21190 echo "$as_me:$LINENO: checking $ac_header presence" >&5
21191 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
21192 cat >conftest.$ac_ext <<_ACEOF
21193 /* confdefs.h. */
21194 _ACEOF
21195 cat confdefs.h >>conftest.$ac_ext
21196 cat >>conftest.$ac_ext <<_ACEOF
21197 /* end confdefs.h. */
21198 #include <$ac_header>
21199 _ACEOF
21200 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21201 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21202 ac_status=$?
21203 grep -v '^ *+' conftest.er1 >conftest.err
21204 rm -f conftest.er1
21205 cat conftest.err >&5
21206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21207 (exit $ac_status); } >/dev/null; then
21208 if test -s conftest.err; then
21209 ac_cpp_err=$ac_c_preproc_warn_flag
21210 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21211 else
21212 ac_cpp_err=
21213 fi
21214 else
21215 ac_cpp_err=yes
21216 fi
21217 if test -z "$ac_cpp_err"; then
21218 ac_header_preproc=yes
21219 else
21220 echo "$as_me: failed program was:" >&5
21221 sed 's/^/| /' conftest.$ac_ext >&5
21222
21223 ac_header_preproc=no
21224 fi
21225 rm -f conftest.err conftest.$ac_ext
21226 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21227 echo "${ECHO_T}$ac_header_preproc" >&6
21228
21229 # So? What about this header?
21230 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21231 yes:no: )
21232 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21233 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
21234 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21235 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21236 ac_header_preproc=yes
21237 ;;
21238 no:yes:* )
21239 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21240 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
21241 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21242 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21243 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21244 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21245 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21246 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
21247 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21248 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21249 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21250 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
21251 (
21252 cat <<\_ASBOX
21253 ## ------------------------------------------ ##
21254 ## Report this to the AC_PACKAGE_NAME lists. ##
21255 ## ------------------------------------------ ##
21256 _ASBOX
21257 ) |
21258 sed "s/^/$as_me: WARNING: /" >&2
21259 ;;
21260 esac
21261 echo "$as_me:$LINENO: checking for $ac_header" >&5
21262 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21263 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21264 echo $ECHO_N "(cached) $ECHO_C" >&6
21265 else
21266 eval "$as_ac_Header=\$ac_header_preproc"
21267 fi
21268 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21269 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21270
21271 fi
21272 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21273 cat >>confdefs.h <<_ACEOF
21274 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21275 _ACEOF
21276
21277 fi
21278
21279 done
21280
21281
21282 for ac_func in getpagesize
21283 do
21284 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21285 echo "$as_me:$LINENO: checking for $ac_func" >&5
21286 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21287 if eval "test \"\${$as_ac_var+set}\" = set"; then
21288 echo $ECHO_N "(cached) $ECHO_C" >&6
21289 else
21290 cat >conftest.$ac_ext <<_ACEOF
21291 /* confdefs.h. */
21292 _ACEOF
21293 cat confdefs.h >>conftest.$ac_ext
21294 cat >>conftest.$ac_ext <<_ACEOF
21295 /* end confdefs.h. */
21296 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21297 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21298 #define $ac_func innocuous_$ac_func
21299
21300 /* System header to define __stub macros and hopefully few prototypes,
21301 which can conflict with char $ac_func (); below.
21302 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21303 <limits.h> exists even on freestanding compilers. */
21304
21305 #ifdef __STDC__
21306 # include <limits.h>
21307 #else
21308 # include <assert.h>
21309 #endif
21310
21311 #undef $ac_func
21312
21313 /* Override any gcc2 internal prototype to avoid an error. */
21314 #ifdef __cplusplus
21315 extern "C"
21316 {
21317 #endif
21318 /* We use char because int might match the return type of a gcc2
21319 builtin and then its argument prototype would still apply. */
21320 char $ac_func ();
21321 /* The GNU C library defines this for functions which it implements
21322 to always fail with ENOSYS. Some functions are actually named
21323 something starting with __ and the normal name is an alias. */
21324 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21325 choke me
21326 #else
21327 char (*f) () = $ac_func;
21328 #endif
21329 #ifdef __cplusplus
21330 }
21331 #endif
21332
21333 int
21334 main ()
21335 {
21336 return f != $ac_func;
21337 ;
21338 return 0;
21339 }
21340 _ACEOF
21341 rm -f conftest.$ac_objext conftest$ac_exeext
21342 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21343 (eval $ac_link) 2>conftest.er1
21344 ac_status=$?
21345 grep -v '^ *+' conftest.er1 >conftest.err
21346 rm -f conftest.er1
21347 cat conftest.err >&5
21348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21349 (exit $ac_status); } &&
21350 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21352 (eval $ac_try) 2>&5
21353 ac_status=$?
21354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21355 (exit $ac_status); }; } &&
21356 { ac_try='test -s conftest$ac_exeext'
21357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21358 (eval $ac_try) 2>&5
21359 ac_status=$?
21360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21361 (exit $ac_status); }; }; then
21362 eval "$as_ac_var=yes"
21363 else
21364 echo "$as_me: failed program was:" >&5
21365 sed 's/^/| /' conftest.$ac_ext >&5
21366
21367 eval "$as_ac_var=no"
21368 fi
21369 rm -f conftest.err conftest.$ac_objext \
21370 conftest$ac_exeext conftest.$ac_ext
21371 fi
21372 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
21373 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21374 if test `eval echo '${'$as_ac_var'}'` = yes; then
21375 cat >>confdefs.h <<_ACEOF
21376 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21377 _ACEOF
21378
21379 fi
21380 done
21381
21382 echo "$as_me:$LINENO: checking for working mmap" >&5
21383 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
21384 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
21385 echo $ECHO_N "(cached) $ECHO_C" >&6
21386 else
21387 if test "$cross_compiling" = yes; then
21388 ac_cv_func_mmap_fixed_mapped=no
21389 else
21390 cat >conftest.$ac_ext <<_ACEOF
21391 /* confdefs.h. */
21392 _ACEOF
21393 cat confdefs.h >>conftest.$ac_ext
21394 cat >>conftest.$ac_ext <<_ACEOF
21395 /* end confdefs.h. */
21396 $ac_includes_default
21397 /* malloc might have been renamed as rpl_malloc. */
21398 #undef malloc
21399
21400 /* Thanks to Mike Haertel and Jim Avera for this test.
21401 Here is a matrix of mmap possibilities:
21402 mmap private not fixed
21403 mmap private fixed at somewhere currently unmapped
21404 mmap private fixed at somewhere already mapped
21405 mmap shared not fixed
21406 mmap shared fixed at somewhere currently unmapped
21407 mmap shared fixed at somewhere already mapped
21408 For private mappings, we should verify that changes cannot be read()
21409 back from the file, nor mmap's back from the file at a different
21410 address. (There have been systems where private was not correctly
21411 implemented like the infamous i386 svr4.0, and systems where the
21412 VM page cache was not coherent with the file system buffer cache
21413 like early versions of FreeBSD and possibly contemporary NetBSD.)
21414 For shared mappings, we should conversely verify that changes get
21415 propagated back to all the places they're supposed to be.
21416
21417 Grep wants private fixed already mapped.
21418 The main things grep needs to know about mmap are:
21419 * does it exist and is it safe to write into the mmap'd area
21420 * how to use it (BSD variants) */
21421
21422 #include <fcntl.h>
21423 #include <sys/mman.h>
21424
21425 #if !STDC_HEADERS && !HAVE_STDLIB_H
21426 char *malloc ();
21427 #endif
21428
21429 /* This mess was copied from the GNU getpagesize.h. */
21430 #if !HAVE_GETPAGESIZE
21431 /* Assume that all systems that can run configure have sys/param.h. */
21432 # if !HAVE_SYS_PARAM_H
21433 # define HAVE_SYS_PARAM_H 1
21434 # endif
21435
21436 # ifdef _SC_PAGESIZE
21437 # define getpagesize() sysconf(_SC_PAGESIZE)
21438 # else /* no _SC_PAGESIZE */
21439 # if HAVE_SYS_PARAM_H
21440 # include <sys/param.h>
21441 # ifdef EXEC_PAGESIZE
21442 # define getpagesize() EXEC_PAGESIZE
21443 # else /* no EXEC_PAGESIZE */
21444 # ifdef NBPG
21445 # define getpagesize() NBPG * CLSIZE
21446 # ifndef CLSIZE
21447 # define CLSIZE 1
21448 # endif /* no CLSIZE */
21449 # else /* no NBPG */
21450 # ifdef NBPC
21451 # define getpagesize() NBPC
21452 # else /* no NBPC */
21453 # ifdef PAGESIZE
21454 # define getpagesize() PAGESIZE
21455 # endif /* PAGESIZE */
21456 # endif /* no NBPC */
21457 # endif /* no NBPG */
21458 # endif /* no EXEC_PAGESIZE */
21459 # else /* no HAVE_SYS_PARAM_H */
21460 # define getpagesize() 8192 /* punt totally */
21461 # endif /* no HAVE_SYS_PARAM_H */
21462 # endif /* no _SC_PAGESIZE */
21463
21464 #endif /* no HAVE_GETPAGESIZE */
21465
21466 int
21467 main ()
21468 {
21469 char *data, *data2, *data3;
21470 int i, pagesize;
21471 int fd;
21472
21473 pagesize = getpagesize ();
21474
21475 /* First, make a file with some known garbage in it. */
21476 data = (char *) malloc (pagesize);
21477 if (!data)
21478 exit (1);
21479 for (i = 0; i < pagesize; ++i)
21480 *(data + i) = rand ();
21481 umask (0);
21482 fd = creat ("conftest.mmap", 0600);
21483 if (fd < 0)
21484 exit (1);
21485 if (write (fd, data, pagesize) != pagesize)
21486 exit (1);
21487 close (fd);
21488
21489 /* Next, try to mmap the file at a fixed address which already has
21490 something else allocated at it. If we can, also make sure that
21491 we see the same garbage. */
21492 fd = open ("conftest.mmap", O_RDWR);
21493 if (fd < 0)
21494 exit (1);
21495 data2 = (char *) malloc (2 * pagesize);
21496 if (!data2)
21497 exit (1);
21498 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
21499 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
21500 MAP_PRIVATE | MAP_FIXED, fd, 0L))
21501 exit (1);
21502 for (i = 0; i < pagesize; ++i)
21503 if (*(data + i) != *(data2 + i))
21504 exit (1);
21505
21506 /* Finally, make sure that changes to the mapped area do not
21507 percolate back to the file as seen by read(). (This is a bug on
21508 some variants of i386 svr4.0.) */
21509 for (i = 0; i < pagesize; ++i)
21510 *(data2 + i) = *(data2 + i) + 1;
21511 data3 = (char *) malloc (pagesize);
21512 if (!data3)
21513 exit (1);
21514 if (read (fd, data3, pagesize) != pagesize)
21515 exit (1);
21516 for (i = 0; i < pagesize; ++i)
21517 if (*(data + i) != *(data3 + i))
21518 exit (1);
21519 close (fd);
21520 exit (0);
21521 }
21522 _ACEOF
21523 rm -f conftest$ac_exeext
21524 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21525 (eval $ac_link) 2>&5
21526 ac_status=$?
21527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21528 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21530 (eval $ac_try) 2>&5
21531 ac_status=$?
21532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21533 (exit $ac_status); }; }; then
21534 ac_cv_func_mmap_fixed_mapped=yes
21535 else
21536 echo "$as_me: program exited with status $ac_status" >&5
21537 echo "$as_me: failed program was:" >&5
21538 sed 's/^/| /' conftest.$ac_ext >&5
21539
21540 ( exit $ac_status )
21541 ac_cv_func_mmap_fixed_mapped=no
21542 fi
21543 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21544 fi
21545 fi
21546 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
21547 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
21548 if test $ac_cv_func_mmap_fixed_mapped = yes; then
21549
21550 cat >>confdefs.h <<\_ACEOF
21551 #define HAVE_MMAP 1
21552 _ACEOF
21553
21554 fi
21555 rm -f conftest.mmap
21556
21557
21558 echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5
21559 echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
21560 if test "${ac_cv_gnu_library_2_1+set}" = set; then
21561 echo $ECHO_N "(cached) $ECHO_C" >&6
21562 else
21563 cat >conftest.$ac_ext <<_ACEOF
21564 /* confdefs.h. */
21565 _ACEOF
21566 cat confdefs.h >>conftest.$ac_ext
21567 cat >>conftest.$ac_ext <<_ACEOF
21568 /* end confdefs.h. */
21569
21570 #include <features.h>
21571 #ifdef __GNU_LIBRARY__
21572 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
21573 Lucky GNU user
21574 #endif
21575 #endif
21576
21577 _ACEOF
21578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21579 $EGREP "Lucky GNU user" >/dev/null 2>&1; then
21580 ac_cv_gnu_library_2_1=yes
21581 else
21582 ac_cv_gnu_library_2_1=no
21583 fi
21584 rm -f conftest*
21585
21586
21587
21588 fi
21589 echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5
21590 echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
21591
21592 GLIBC21="$ac_cv_gnu_library_2_1"
21593
21594
21595
21596
21597 echo "$as_me:$LINENO: checking whether integer division by zero raises SIGFPE" >&5
21598 echo $ECHO_N "checking whether integer division by zero raises SIGFPE... $ECHO_C" >&6
21599 if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then
21600 echo $ECHO_N "(cached) $ECHO_C" >&6
21601 else
21602
21603 if test "$cross_compiling" = yes; then
21604
21605 # Guess based on the CPU.
21606 case "$host_cpu" in
21607 alpha* | i3456786 | m68k | s390*)
21608 gt_cv_int_divbyzero_sigfpe="guessing yes";;
21609 *)
21610 gt_cv_int_divbyzero_sigfpe="guessing no";;
21611 esac
21612
21613 else
21614 cat >conftest.$ac_ext <<_ACEOF
21615 /* confdefs.h. */
21616 _ACEOF
21617 cat confdefs.h >>conftest.$ac_ext
21618 cat >>conftest.$ac_ext <<_ACEOF
21619 /* end confdefs.h. */
21620
21621 #include <stdlib.h>
21622 #include <signal.h>
21623
21624 static void
21625 #ifdef __cplusplus
21626 sigfpe_handler (int sig)
21627 #else
21628 sigfpe_handler (sig) int sig;
21629 #endif
21630 {
21631 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
21632 exit (sig != SIGFPE);
21633 }
21634
21635 int x = 1;
21636 int y = 0;
21637 int z;
21638 int nan;
21639
21640 int main ()
21641 {
21642 signal (SIGFPE, sigfpe_handler);
21643 /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
21644 #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
21645 signal (SIGTRAP, sigfpe_handler);
21646 #endif
21647 /* Linux/SPARC yields signal SIGILL. */
21648 #if defined (__sparc__) && defined (__linux__)
21649 signal (SIGILL, sigfpe_handler);
21650 #endif
21651
21652 z = x / y;
21653 nan = y / y;
21654 exit (1);
21655 }
21656
21657 _ACEOF
21658 rm -f conftest$ac_exeext
21659 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21660 (eval $ac_link) 2>&5
21661 ac_status=$?
21662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21663 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21665 (eval $ac_try) 2>&5
21666 ac_status=$?
21667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21668 (exit $ac_status); }; }; then
21669 gt_cv_int_divbyzero_sigfpe=yes
21670 else
21671 echo "$as_me: program exited with status $ac_status" >&5
21672 echo "$as_me: failed program was:" >&5
21673 sed 's/^/| /' conftest.$ac_ext >&5
21674
21675 ( exit $ac_status )
21676 gt_cv_int_divbyzero_sigfpe=no
21677 fi
21678 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21679 fi
21680
21681 fi
21682 echo "$as_me:$LINENO: result: $gt_cv_int_divbyzero_sigfpe" >&5
21683 echo "${ECHO_T}$gt_cv_int_divbyzero_sigfpe" >&6
21684 case "$gt_cv_int_divbyzero_sigfpe" in
21685 *yes) value=1;;
21686 *) value=0;;
21687 esac
21688
21689 cat >>confdefs.h <<_ACEOF
21690 #define INTDIV0_RAISES_SIGFPE $value
21691 _ACEOF
21692
21693
21694
21695 echo "$as_me:$LINENO: checking for unsigned long long" >&5
21696 echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6
21697 if test "${ac_cv_type_unsigned_long_long+set}" = set; then
21698 echo $ECHO_N "(cached) $ECHO_C" >&6
21699 else
21700 cat >conftest.$ac_ext <<_ACEOF
21701 /* confdefs.h. */
21702 _ACEOF
21703 cat confdefs.h >>conftest.$ac_ext
21704 cat >>conftest.$ac_ext <<_ACEOF
21705 /* end confdefs.h. */
21706 unsigned long long ull = 1ULL; int i = 63;
21707 int
21708 main ()
21709 {
21710 unsigned long long ullmax = (unsigned long long) -1;
21711 return ull << i | ull >> i | ullmax / ull | ullmax % ull;
21712 ;
21713 return 0;
21714 }
21715 _ACEOF
21716 rm -f conftest.$ac_objext conftest$ac_exeext
21717 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21718 (eval $ac_link) 2>conftest.er1
21719 ac_status=$?
21720 grep -v '^ *+' conftest.er1 >conftest.err
21721 rm -f conftest.er1
21722 cat conftest.err >&5
21723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21724 (exit $ac_status); } &&
21725 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21727 (eval $ac_try) 2>&5
21728 ac_status=$?
21729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21730 (exit $ac_status); }; } &&
21731 { ac_try='test -s conftest$ac_exeext'
21732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21733 (eval $ac_try) 2>&5
21734 ac_status=$?
21735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21736 (exit $ac_status); }; }; then
21737 ac_cv_type_unsigned_long_long=yes
21738 else
21739 echo "$as_me: failed program was:" >&5
21740 sed 's/^/| /' conftest.$ac_ext >&5
21741
21742 ac_cv_type_unsigned_long_long=no
21743 fi
21744 rm -f conftest.err conftest.$ac_objext \
21745 conftest$ac_exeext conftest.$ac_ext
21746 fi
21747 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5
21748 echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6
21749 if test $ac_cv_type_unsigned_long_long = yes; then
21750
21751 cat >>confdefs.h <<\_ACEOF
21752 #define HAVE_UNSIGNED_LONG_LONG 1
21753 _ACEOF
21754
21755 fi
21756
21757
21758
21759
21760 if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
21761
21762 test $ac_cv_type_unsigned_long_long = yes \
21763 && ac_type='unsigned long long' \
21764 || ac_type='unsigned long'
21765
21766 cat >>confdefs.h <<_ACEOF
21767 #define uintmax_t $ac_type
21768 _ACEOF
21769
21770 else
21771
21772 cat >>confdefs.h <<\_ACEOF
21773 #define HAVE_UINTMAX_T 1
21774 _ACEOF
21775
21776 fi
21777
21778
21779 echo "$as_me:$LINENO: checking for inttypes.h" >&5
21780 echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
21781 if test "${gt_cv_header_inttypes_h+set}" = set; then
21782 echo $ECHO_N "(cached) $ECHO_C" >&6
21783 else
21784
21785 cat >conftest.$ac_ext <<_ACEOF
21786 /* confdefs.h. */
21787 _ACEOF
21788 cat confdefs.h >>conftest.$ac_ext
21789 cat >>conftest.$ac_ext <<_ACEOF
21790 /* end confdefs.h. */
21791 #include <sys/types.h>
21792 #include <inttypes.h>
21793 int
21794 main ()
21795 {
21796
21797 ;
21798 return 0;
21799 }
21800 _ACEOF
21801 rm -f conftest.$ac_objext
21802 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21803 (eval $ac_compile) 2>conftest.er1
21804 ac_status=$?
21805 grep -v '^ *+' conftest.er1 >conftest.err
21806 rm -f conftest.er1
21807 cat conftest.err >&5
21808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21809 (exit $ac_status); } &&
21810 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21812 (eval $ac_try) 2>&5
21813 ac_status=$?
21814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21815 (exit $ac_status); }; } &&
21816 { ac_try='test -s conftest.$ac_objext'
21817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21818 (eval $ac_try) 2>&5
21819 ac_status=$?
21820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21821 (exit $ac_status); }; }; then
21822 gt_cv_header_inttypes_h=yes
21823 else
21824 echo "$as_me: failed program was:" >&5
21825 sed 's/^/| /' conftest.$ac_ext >&5
21826
21827 gt_cv_header_inttypes_h=no
21828 fi
21829 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21830
21831 fi
21832 echo "$as_me:$LINENO: result: $gt_cv_header_inttypes_h" >&5
21833 echo "${ECHO_T}$gt_cv_header_inttypes_h" >&6
21834 if test $gt_cv_header_inttypes_h = yes; then
21835
21836 cat >>confdefs.h <<_ACEOF
21837 #define HAVE_INTTYPES_H 1
21838 _ACEOF
21839
21840 fi
21841
21842
21843
21844 if test $gt_cv_header_inttypes_h = yes; then
21845 echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5
21846 echo $ECHO_N "checking whether the inttypes.h PRIxNN macros are broken... $ECHO_C" >&6
21847 if test "${gt_cv_inttypes_pri_broken+set}" = set; then
21848 echo $ECHO_N "(cached) $ECHO_C" >&6
21849 else
21850
21851 cat >conftest.$ac_ext <<_ACEOF
21852 /* confdefs.h. */
21853 _ACEOF
21854 cat confdefs.h >>conftest.$ac_ext
21855 cat >>conftest.$ac_ext <<_ACEOF
21856 /* end confdefs.h. */
21857 #include <inttypes.h>
21858 #ifdef PRId32
21859 char *p = PRId32;
21860 #endif
21861
21862 int
21863 main ()
21864 {
21865
21866 ;
21867 return 0;
21868 }
21869 _ACEOF
21870 rm -f conftest.$ac_objext
21871 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21872 (eval $ac_compile) 2>conftest.er1
21873 ac_status=$?
21874 grep -v '^ *+' conftest.er1 >conftest.err
21875 rm -f conftest.er1
21876 cat conftest.err >&5
21877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21878 (exit $ac_status); } &&
21879 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21881 (eval $ac_try) 2>&5
21882 ac_status=$?
21883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21884 (exit $ac_status); }; } &&
21885 { ac_try='test -s conftest.$ac_objext'
21886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21887 (eval $ac_try) 2>&5
21888 ac_status=$?
21889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21890 (exit $ac_status); }; }; then
21891 gt_cv_inttypes_pri_broken=no
21892 else
21893 echo "$as_me: failed program was:" >&5
21894 sed 's/^/| /' conftest.$ac_ext >&5
21895
21896 gt_cv_inttypes_pri_broken=yes
21897 fi
21898 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21899
21900 fi
21901 echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5
21902 echo "${ECHO_T}$gt_cv_inttypes_pri_broken" >&6
21903 fi
21904 if test "$gt_cv_inttypes_pri_broken" = yes; then
21905
21906 cat >>confdefs.h <<_ACEOF
21907 #define PRI_MACROS_BROKEN 1
21908 _ACEOF
21909
21910 fi
21911
21912
21913
21914 for ac_header in stdint.h
21915 do
21916 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21917 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21918 echo "$as_me:$LINENO: checking for $ac_header" >&5
21919 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21920 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21921 echo $ECHO_N "(cached) $ECHO_C" >&6
21922 fi
21923 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21924 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21925 else
21926 # Is the header compilable?
21927 echo "$as_me:$LINENO: checking $ac_header usability" >&5
21928 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
21929 cat >conftest.$ac_ext <<_ACEOF
21930 /* confdefs.h. */
21931 _ACEOF
21932 cat confdefs.h >>conftest.$ac_ext
21933 cat >>conftest.$ac_ext <<_ACEOF
21934 /* end confdefs.h. */
21935 $ac_includes_default
21936 #include <$ac_header>
21937 _ACEOF
21938 rm -f conftest.$ac_objext
21939 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21940 (eval $ac_compile) 2>conftest.er1
21941 ac_status=$?
21942 grep -v '^ *+' conftest.er1 >conftest.err
21943 rm -f conftest.er1
21944 cat conftest.err >&5
21945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21946 (exit $ac_status); } &&
21947 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21949 (eval $ac_try) 2>&5
21950 ac_status=$?
21951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21952 (exit $ac_status); }; } &&
21953 { ac_try='test -s conftest.$ac_objext'
21954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21955 (eval $ac_try) 2>&5
21956 ac_status=$?
21957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21958 (exit $ac_status); }; }; then
21959 ac_header_compiler=yes
21960 else
21961 echo "$as_me: failed program was:" >&5
21962 sed 's/^/| /' conftest.$ac_ext >&5
21963
21964 ac_header_compiler=no
21965 fi
21966 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21967 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21968 echo "${ECHO_T}$ac_header_compiler" >&6
21969
21970 # Is the header present?
21971 echo "$as_me:$LINENO: checking $ac_header presence" >&5
21972 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
21973 cat >conftest.$ac_ext <<_ACEOF
21974 /* confdefs.h. */
21975 _ACEOF
21976 cat confdefs.h >>conftest.$ac_ext
21977 cat >>conftest.$ac_ext <<_ACEOF
21978 /* end confdefs.h. */
21979 #include <$ac_header>
21980 _ACEOF
21981 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21982 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21983 ac_status=$?
21984 grep -v '^ *+' conftest.er1 >conftest.err
21985 rm -f conftest.er1
21986 cat conftest.err >&5
21987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21988 (exit $ac_status); } >/dev/null; then
21989 if test -s conftest.err; then
21990 ac_cpp_err=$ac_c_preproc_warn_flag
21991 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21992 else
21993 ac_cpp_err=
21994 fi
21995 else
21996 ac_cpp_err=yes
21997 fi
21998 if test -z "$ac_cpp_err"; then
21999 ac_header_preproc=yes
22000 else
22001 echo "$as_me: failed program was:" >&5
22002 sed 's/^/| /' conftest.$ac_ext >&5
22003
22004 ac_header_preproc=no
22005 fi
22006 rm -f conftest.err conftest.$ac_ext
22007 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22008 echo "${ECHO_T}$ac_header_preproc" >&6
22009
22010 # So? What about this header?
22011 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22012 yes:no: )
22013 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22014 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
22015 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22016 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22017 ac_header_preproc=yes
22018 ;;
22019 no:yes:* )
22020 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22021 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
22022 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22023 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22024 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22025 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22026 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22027 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
22028 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22029 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
22030 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22031 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
22032 (
22033 cat <<\_ASBOX
22034 ## ------------------------------------------ ##
22035 ## Report this to the AC_PACKAGE_NAME lists. ##
22036 ## ------------------------------------------ ##
22037 _ASBOX
22038 ) |
22039 sed "s/^/$as_me: WARNING: /" >&2
22040 ;;
22041 esac
22042 echo "$as_me:$LINENO: checking for $ac_header" >&5
22043 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22044 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22045 echo $ECHO_N "(cached) $ECHO_C" >&6
22046 else
22047 eval "$as_ac_Header=\$ac_header_preproc"
22048 fi
22049 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
22050 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22051
22052 fi
22053 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22054 cat >>confdefs.h <<_ACEOF
22055 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22056 _ACEOF
22057
22058 fi
22059
22060 done
22061
22062 echo "$as_me:$LINENO: checking for SIZE_MAX" >&5
22063 echo $ECHO_N "checking for SIZE_MAX... $ECHO_C" >&6
22064 result=
22065 cat >conftest.$ac_ext <<_ACEOF
22066 /* confdefs.h. */
22067 _ACEOF
22068 cat confdefs.h >>conftest.$ac_ext
22069 cat >>conftest.$ac_ext <<_ACEOF
22070 /* end confdefs.h. */
22071
22072 #include <limits.h>
22073 #if HAVE_STDINT_H
22074 #include <stdint.h>
22075 #endif
22076 #ifdef SIZE_MAX
22077 Found it
22078 #endif
22079
22080 _ACEOF
22081 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22082 $EGREP "Found it" >/dev/null 2>&1; then
22083 result=yes
22084 fi
22085 rm -f conftest*
22086
22087 if test -z "$result"; then
22088 if test "$cross_compiling" = yes; then
22089 # Depending upon the size, compute the lo and hi bounds.
22090 cat >conftest.$ac_ext <<_ACEOF
22091 /* confdefs.h. */
22092 _ACEOF
22093 cat confdefs.h >>conftest.$ac_ext
22094 cat >>conftest.$ac_ext <<_ACEOF
22095 /* end confdefs.h. */
22096 #include <stddef.h>
22097 int
22098 main ()
22099 {
22100 static int test_array [1 - 2 * !((~(size_t)0 / 10) >= 0)];
22101 test_array [0] = 0
22102
22103 ;
22104 return 0;
22105 }
22106 _ACEOF
22107 rm -f conftest.$ac_objext
22108 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22109 (eval $ac_compile) 2>conftest.er1
22110 ac_status=$?
22111 grep -v '^ *+' conftest.er1 >conftest.err
22112 rm -f conftest.er1
22113 cat conftest.err >&5
22114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22115 (exit $ac_status); } &&
22116 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22118 (eval $ac_try) 2>&5
22119 ac_status=$?
22120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22121 (exit $ac_status); }; } &&
22122 { ac_try='test -s conftest.$ac_objext'
22123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22124 (eval $ac_try) 2>&5
22125 ac_status=$?
22126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22127 (exit $ac_status); }; }; then
22128 ac_lo=0 ac_mid=0
22129 while :; do
22130 cat >conftest.$ac_ext <<_ACEOF
22131 /* confdefs.h. */
22132 _ACEOF
22133 cat confdefs.h >>conftest.$ac_ext
22134 cat >>conftest.$ac_ext <<_ACEOF
22135 /* end confdefs.h. */
22136 #include <stddef.h>
22137 int
22138 main ()
22139 {
22140 static int test_array [1 - 2 * !((~(size_t)0 / 10) <= $ac_mid)];
22141 test_array [0] = 0
22142
22143 ;
22144 return 0;
22145 }
22146 _ACEOF
22147 rm -f conftest.$ac_objext
22148 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22149 (eval $ac_compile) 2>conftest.er1
22150 ac_status=$?
22151 grep -v '^ *+' conftest.er1 >conftest.err
22152 rm -f conftest.er1
22153 cat conftest.err >&5
22154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22155 (exit $ac_status); } &&
22156 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22158 (eval $ac_try) 2>&5
22159 ac_status=$?
22160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22161 (exit $ac_status); }; } &&
22162 { ac_try='test -s conftest.$ac_objext'
22163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22164 (eval $ac_try) 2>&5
22165 ac_status=$?
22166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22167 (exit $ac_status); }; }; then
22168 ac_hi=$ac_mid; break
22169 else
22170 echo "$as_me: failed program was:" >&5
22171 sed 's/^/| /' conftest.$ac_ext >&5
22172
22173 ac_lo=`expr $ac_mid + 1`
22174 if test $ac_lo -le $ac_mid; then
22175 ac_lo= ac_hi=
22176 break
22177 fi
22178 ac_mid=`expr 2 '*' $ac_mid + 1`
22179 fi
22180 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22181 done
22182 else
22183 echo "$as_me: failed program was:" >&5
22184 sed 's/^/| /' conftest.$ac_ext >&5
22185
22186 cat >conftest.$ac_ext <<_ACEOF
22187 /* confdefs.h. */
22188 _ACEOF
22189 cat confdefs.h >>conftest.$ac_ext
22190 cat >>conftest.$ac_ext <<_ACEOF
22191 /* end confdefs.h. */
22192 #include <stddef.h>
22193 int
22194 main ()
22195 {
22196 static int test_array [1 - 2 * !((~(size_t)0 / 10) < 0)];
22197 test_array [0] = 0
22198
22199 ;
22200 return 0;
22201 }
22202 _ACEOF
22203 rm -f conftest.$ac_objext
22204 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22205 (eval $ac_compile) 2>conftest.er1
22206 ac_status=$?
22207 grep -v '^ *+' conftest.er1 >conftest.err
22208 rm -f conftest.er1
22209 cat conftest.err >&5
22210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22211 (exit $ac_status); } &&
22212 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22214 (eval $ac_try) 2>&5
22215 ac_status=$?
22216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22217 (exit $ac_status); }; } &&
22218 { ac_try='test -s conftest.$ac_objext'
22219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22220 (eval $ac_try) 2>&5
22221 ac_status=$?
22222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22223 (exit $ac_status); }; }; then
22224 ac_hi=-1 ac_mid=-1
22225 while :; do
22226 cat >conftest.$ac_ext <<_ACEOF
22227 /* confdefs.h. */
22228 _ACEOF
22229 cat confdefs.h >>conftest.$ac_ext
22230 cat >>conftest.$ac_ext <<_ACEOF
22231 /* end confdefs.h. */
22232 #include <stddef.h>
22233 int
22234 main ()
22235 {
22236 static int test_array [1 - 2 * !((~(size_t)0 / 10) >= $ac_mid)];
22237 test_array [0] = 0
22238
22239 ;
22240 return 0;
22241 }
22242 _ACEOF
22243 rm -f conftest.$ac_objext
22244 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22245 (eval $ac_compile) 2>conftest.er1
22246 ac_status=$?
22247 grep -v '^ *+' conftest.er1 >conftest.err
22248 rm -f conftest.er1
22249 cat conftest.err >&5
22250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22251 (exit $ac_status); } &&
22252 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22254 (eval $ac_try) 2>&5
22255 ac_status=$?
22256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22257 (exit $ac_status); }; } &&
22258 { ac_try='test -s conftest.$ac_objext'
22259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22260 (eval $ac_try) 2>&5
22261 ac_status=$?
22262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22263 (exit $ac_status); }; }; then
22264 ac_lo=$ac_mid; break
22265 else
22266 echo "$as_me: failed program was:" >&5
22267 sed 's/^/| /' conftest.$ac_ext >&5
22268
22269 ac_hi=`expr '(' $ac_mid ')' - 1`
22270 if test $ac_mid -le $ac_hi; then
22271 ac_lo= ac_hi=
22272 break
22273 fi
22274 ac_mid=`expr 2 '*' $ac_mid`
22275 fi
22276 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22277 done
22278 else
22279 echo "$as_me: failed program was:" >&5
22280 sed 's/^/| /' conftest.$ac_ext >&5
22281
22282 ac_lo= ac_hi=
22283 fi
22284 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22285 fi
22286 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22287 # Binary search between lo and hi bounds.
22288 while test "x$ac_lo" != "x$ac_hi"; do
22289 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22290 cat >conftest.$ac_ext <<_ACEOF
22291 /* confdefs.h. */
22292 _ACEOF
22293 cat confdefs.h >>conftest.$ac_ext
22294 cat >>conftest.$ac_ext <<_ACEOF
22295 /* end confdefs.h. */
22296 #include <stddef.h>
22297 int
22298 main ()
22299 {
22300 static int test_array [1 - 2 * !((~(size_t)0 / 10) <= $ac_mid)];
22301 test_array [0] = 0
22302
22303 ;
22304 return 0;
22305 }
22306 _ACEOF
22307 rm -f conftest.$ac_objext
22308 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22309 (eval $ac_compile) 2>conftest.er1
22310 ac_status=$?
22311 grep -v '^ *+' conftest.er1 >conftest.err
22312 rm -f conftest.er1
22313 cat conftest.err >&5
22314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22315 (exit $ac_status); } &&
22316 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22318 (eval $ac_try) 2>&5
22319 ac_status=$?
22320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22321 (exit $ac_status); }; } &&
22322 { ac_try='test -s conftest.$ac_objext'
22323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22324 (eval $ac_try) 2>&5
22325 ac_status=$?
22326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22327 (exit $ac_status); }; }; then
22328 ac_hi=$ac_mid
22329 else
22330 echo "$as_me: failed program was:" >&5
22331 sed 's/^/| /' conftest.$ac_ext >&5
22332
22333 ac_lo=`expr '(' $ac_mid ')' + 1`
22334 fi
22335 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22336 done
22337 case $ac_lo in
22338 ?*) res_hi=$ac_lo;;
22339 '') result=? ;;
22340 esac
22341 else
22342 if test "$cross_compiling" = yes; then
22343 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
22344 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
22345 { (exit 1); exit 1; }; }
22346 else
22347 cat >conftest.$ac_ext <<_ACEOF
22348 /* confdefs.h. */
22349 _ACEOF
22350 cat confdefs.h >>conftest.$ac_ext
22351 cat >>conftest.$ac_ext <<_ACEOF
22352 /* end confdefs.h. */
22353 #include <stddef.h>
22354 long longval () { return ~(size_t)0 / 10; }
22355 unsigned long ulongval () { return ~(size_t)0 / 10; }
22356 #include <stdio.h>
22357 #include <stdlib.h>
22358 int
22359 main ()
22360 {
22361
22362 FILE *f = fopen ("conftest.val", "w");
22363 if (! f)
22364 exit (1);
22365 if ((~(size_t)0 / 10) < 0)
22366 {
22367 long i = longval ();
22368 if (i != (~(size_t)0 / 10))
22369 exit (1);
22370 fprintf (f, "%ld\n", i);
22371 }
22372 else
22373 {
22374 unsigned long i = ulongval ();
22375 if (i != (~(size_t)0 / 10))
22376 exit (1);
22377 fprintf (f, "%lu\n", i);
22378 }
22379 exit (ferror (f) || fclose (f) != 0);
22380
22381 ;
22382 return 0;
22383 }
22384 _ACEOF
22385 rm -f conftest$ac_exeext
22386 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22387 (eval $ac_link) 2>&5
22388 ac_status=$?
22389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22390 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22392 (eval $ac_try) 2>&5
22393 ac_status=$?
22394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22395 (exit $ac_status); }; }; then
22396 res_hi=`cat conftest.val`
22397 else
22398 echo "$as_me: program exited with status $ac_status" >&5
22399 echo "$as_me: failed program was:" >&5
22400 sed 's/^/| /' conftest.$ac_ext >&5
22401
22402 ( exit $ac_status )
22403 result=?
22404 fi
22405 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22406 fi
22407 fi
22408 rm -f conftest.val
22409 if test "$cross_compiling" = yes; then
22410 # Depending upon the size, compute the lo and hi bounds.
22411 cat >conftest.$ac_ext <<_ACEOF
22412 /* confdefs.h. */
22413 _ACEOF
22414 cat confdefs.h >>conftest.$ac_ext
22415 cat >>conftest.$ac_ext <<_ACEOF
22416 /* end confdefs.h. */
22417 #include <stddef.h>
22418 int
22419 main ()
22420 {
22421 static int test_array [1 - 2 * !((~(size_t)0 % 10) >= 0)];
22422 test_array [0] = 0
22423
22424 ;
22425 return 0;
22426 }
22427 _ACEOF
22428 rm -f conftest.$ac_objext
22429 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22430 (eval $ac_compile) 2>conftest.er1
22431 ac_status=$?
22432 grep -v '^ *+' conftest.er1 >conftest.err
22433 rm -f conftest.er1
22434 cat conftest.err >&5
22435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22436 (exit $ac_status); } &&
22437 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22439 (eval $ac_try) 2>&5
22440 ac_status=$?
22441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22442 (exit $ac_status); }; } &&
22443 { ac_try='test -s conftest.$ac_objext'
22444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22445 (eval $ac_try) 2>&5
22446 ac_status=$?
22447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22448 (exit $ac_status); }; }; then
22449 ac_lo=0 ac_mid=0
22450 while :; do
22451 cat >conftest.$ac_ext <<_ACEOF
22452 /* confdefs.h. */
22453 _ACEOF
22454 cat confdefs.h >>conftest.$ac_ext
22455 cat >>conftest.$ac_ext <<_ACEOF
22456 /* end confdefs.h. */
22457 #include <stddef.h>
22458 int
22459 main ()
22460 {
22461 static int test_array [1 - 2 * !((~(size_t)0 % 10) <= $ac_mid)];
22462 test_array [0] = 0
22463
22464 ;
22465 return 0;
22466 }
22467 _ACEOF
22468 rm -f conftest.$ac_objext
22469 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22470 (eval $ac_compile) 2>conftest.er1
22471 ac_status=$?
22472 grep -v '^ *+' conftest.er1 >conftest.err
22473 rm -f conftest.er1
22474 cat conftest.err >&5
22475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22476 (exit $ac_status); } &&
22477 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22479 (eval $ac_try) 2>&5
22480 ac_status=$?
22481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22482 (exit $ac_status); }; } &&
22483 { ac_try='test -s conftest.$ac_objext'
22484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22485 (eval $ac_try) 2>&5
22486 ac_status=$?
22487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22488 (exit $ac_status); }; }; then
22489 ac_hi=$ac_mid; break
22490 else
22491 echo "$as_me: failed program was:" >&5
22492 sed 's/^/| /' conftest.$ac_ext >&5
22493
22494 ac_lo=`expr $ac_mid + 1`
22495 if test $ac_lo -le $ac_mid; then
22496 ac_lo= ac_hi=
22497 break
22498 fi
22499 ac_mid=`expr 2 '*' $ac_mid + 1`
22500 fi
22501 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22502 done
22503 else
22504 echo "$as_me: failed program was:" >&5
22505 sed 's/^/| /' conftest.$ac_ext >&5
22506
22507 cat >conftest.$ac_ext <<_ACEOF
22508 /* confdefs.h. */
22509 _ACEOF
22510 cat confdefs.h >>conftest.$ac_ext
22511 cat >>conftest.$ac_ext <<_ACEOF
22512 /* end confdefs.h. */
22513 #include <stddef.h>
22514 int
22515 main ()
22516 {
22517 static int test_array [1 - 2 * !((~(size_t)0 % 10) < 0)];
22518 test_array [0] = 0
22519
22520 ;
22521 return 0;
22522 }
22523 _ACEOF
22524 rm -f conftest.$ac_objext
22525 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22526 (eval $ac_compile) 2>conftest.er1
22527 ac_status=$?
22528 grep -v '^ *+' conftest.er1 >conftest.err
22529 rm -f conftest.er1
22530 cat conftest.err >&5
22531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22532 (exit $ac_status); } &&
22533 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22535 (eval $ac_try) 2>&5
22536 ac_status=$?
22537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22538 (exit $ac_status); }; } &&
22539 { ac_try='test -s conftest.$ac_objext'
22540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22541 (eval $ac_try) 2>&5
22542 ac_status=$?
22543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22544 (exit $ac_status); }; }; then
22545 ac_hi=-1 ac_mid=-1
22546 while :; do
22547 cat >conftest.$ac_ext <<_ACEOF
22548 /* confdefs.h. */
22549 _ACEOF
22550 cat confdefs.h >>conftest.$ac_ext
22551 cat >>conftest.$ac_ext <<_ACEOF
22552 /* end confdefs.h. */
22553 #include <stddef.h>
22554 int
22555 main ()
22556 {
22557 static int test_array [1 - 2 * !((~(size_t)0 % 10) >= $ac_mid)];
22558 test_array [0] = 0
22559
22560 ;
22561 return 0;
22562 }
22563 _ACEOF
22564 rm -f conftest.$ac_objext
22565 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22566 (eval $ac_compile) 2>conftest.er1
22567 ac_status=$?
22568 grep -v '^ *+' conftest.er1 >conftest.err
22569 rm -f conftest.er1
22570 cat conftest.err >&5
22571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22572 (exit $ac_status); } &&
22573 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22575 (eval $ac_try) 2>&5
22576 ac_status=$?
22577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22578 (exit $ac_status); }; } &&
22579 { ac_try='test -s conftest.$ac_objext'
22580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22581 (eval $ac_try) 2>&5
22582 ac_status=$?
22583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22584 (exit $ac_status); }; }; then
22585 ac_lo=$ac_mid; break
22586 else
22587 echo "$as_me: failed program was:" >&5
22588 sed 's/^/| /' conftest.$ac_ext >&5
22589
22590 ac_hi=`expr '(' $ac_mid ')' - 1`
22591 if test $ac_mid -le $ac_hi; then
22592 ac_lo= ac_hi=
22593 break
22594 fi
22595 ac_mid=`expr 2 '*' $ac_mid`
22596 fi
22597 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22598 done
22599 else
22600 echo "$as_me: failed program was:" >&5
22601 sed 's/^/| /' conftest.$ac_ext >&5
22602
22603 ac_lo= ac_hi=
22604 fi
22605 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22606 fi
22607 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22608 # Binary search between lo and hi bounds.
22609 while test "x$ac_lo" != "x$ac_hi"; do
22610 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22611 cat >conftest.$ac_ext <<_ACEOF
22612 /* confdefs.h. */
22613 _ACEOF
22614 cat confdefs.h >>conftest.$ac_ext
22615 cat >>conftest.$ac_ext <<_ACEOF
22616 /* end confdefs.h. */
22617 #include <stddef.h>
22618 int
22619 main ()
22620 {
22621 static int test_array [1 - 2 * !((~(size_t)0 % 10) <= $ac_mid)];
22622 test_array [0] = 0
22623
22624 ;
22625 return 0;
22626 }
22627 _ACEOF
22628 rm -f conftest.$ac_objext
22629 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22630 (eval $ac_compile) 2>conftest.er1
22631 ac_status=$?
22632 grep -v '^ *+' conftest.er1 >conftest.err
22633 rm -f conftest.er1
22634 cat conftest.err >&5
22635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22636 (exit $ac_status); } &&
22637 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22639 (eval $ac_try) 2>&5
22640 ac_status=$?
22641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22642 (exit $ac_status); }; } &&
22643 { ac_try='test -s conftest.$ac_objext'
22644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22645 (eval $ac_try) 2>&5
22646 ac_status=$?
22647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22648 (exit $ac_status); }; }; then
22649 ac_hi=$ac_mid
22650 else
22651 echo "$as_me: failed program was:" >&5
22652 sed 's/^/| /' conftest.$ac_ext >&5
22653
22654 ac_lo=`expr '(' $ac_mid ')' + 1`
22655 fi
22656 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22657 done
22658 case $ac_lo in
22659 ?*) res_lo=$ac_lo;;
22660 '') result=? ;;
22661 esac
22662 else
22663 if test "$cross_compiling" = yes; then
22664 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
22665 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
22666 { (exit 1); exit 1; }; }
22667 else
22668 cat >conftest.$ac_ext <<_ACEOF
22669 /* confdefs.h. */
22670 _ACEOF
22671 cat confdefs.h >>conftest.$ac_ext
22672 cat >>conftest.$ac_ext <<_ACEOF
22673 /* end confdefs.h. */
22674 #include <stddef.h>
22675 long longval () { return ~(size_t)0 % 10; }
22676 unsigned long ulongval () { return ~(size_t)0 % 10; }
22677 #include <stdio.h>
22678 #include <stdlib.h>
22679 int
22680 main ()
22681 {
22682
22683 FILE *f = fopen ("conftest.val", "w");
22684 if (! f)
22685 exit (1);
22686 if ((~(size_t)0 % 10) < 0)
22687 {
22688 long i = longval ();
22689 if (i != (~(size_t)0 % 10))
22690 exit (1);
22691 fprintf (f, "%ld\n", i);
22692 }
22693 else
22694 {
22695 unsigned long i = ulongval ();
22696 if (i != (~(size_t)0 % 10))
22697 exit (1);
22698 fprintf (f, "%lu\n", i);
22699 }
22700 exit (ferror (f) || fclose (f) != 0);
22701
22702 ;
22703 return 0;
22704 }
22705 _ACEOF
22706 rm -f conftest$ac_exeext
22707 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22708 (eval $ac_link) 2>&5
22709 ac_status=$?
22710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22711 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22713 (eval $ac_try) 2>&5
22714 ac_status=$?
22715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22716 (exit $ac_status); }; }; then
22717 res_lo=`cat conftest.val`
22718 else
22719 echo "$as_me: program exited with status $ac_status" >&5
22720 echo "$as_me: failed program was:" >&5
22721 sed 's/^/| /' conftest.$ac_ext >&5
22722
22723 ( exit $ac_status )
22724 result=?
22725 fi
22726 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22727 fi
22728 fi
22729 rm -f conftest.val
22730 if test "$cross_compiling" = yes; then
22731 # Depending upon the size, compute the lo and hi bounds.
22732 cat >conftest.$ac_ext <<_ACEOF
22733 /* confdefs.h. */
22734 _ACEOF
22735 cat confdefs.h >>conftest.$ac_ext
22736 cat >>conftest.$ac_ext <<_ACEOF
22737 /* end confdefs.h. */
22738 #include <stddef.h>
22739 int
22740 main ()
22741 {
22742 static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 0)];
22743 test_array [0] = 0
22744
22745 ;
22746 return 0;
22747 }
22748 _ACEOF
22749 rm -f conftest.$ac_objext
22750 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22751 (eval $ac_compile) 2>conftest.er1
22752 ac_status=$?
22753 grep -v '^ *+' conftest.er1 >conftest.err
22754 rm -f conftest.er1
22755 cat conftest.err >&5
22756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22757 (exit $ac_status); } &&
22758 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22760 (eval $ac_try) 2>&5
22761 ac_status=$?
22762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22763 (exit $ac_status); }; } &&
22764 { ac_try='test -s conftest.$ac_objext'
22765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22766 (eval $ac_try) 2>&5
22767 ac_status=$?
22768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22769 (exit $ac_status); }; }; then
22770 ac_lo=0 ac_mid=0
22771 while :; do
22772 cat >conftest.$ac_ext <<_ACEOF
22773 /* confdefs.h. */
22774 _ACEOF
22775 cat confdefs.h >>conftest.$ac_ext
22776 cat >>conftest.$ac_ext <<_ACEOF
22777 /* end confdefs.h. */
22778 #include <stddef.h>
22779 int
22780 main ()
22781 {
22782 static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)];
22783 test_array [0] = 0
22784
22785 ;
22786 return 0;
22787 }
22788 _ACEOF
22789 rm -f conftest.$ac_objext
22790 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22791 (eval $ac_compile) 2>conftest.er1
22792 ac_status=$?
22793 grep -v '^ *+' conftest.er1 >conftest.err
22794 rm -f conftest.er1
22795 cat conftest.err >&5
22796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22797 (exit $ac_status); } &&
22798 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22800 (eval $ac_try) 2>&5
22801 ac_status=$?
22802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22803 (exit $ac_status); }; } &&
22804 { ac_try='test -s conftest.$ac_objext'
22805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22806 (eval $ac_try) 2>&5
22807 ac_status=$?
22808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22809 (exit $ac_status); }; }; then
22810 ac_hi=$ac_mid; break
22811 else
22812 echo "$as_me: failed program was:" >&5
22813 sed 's/^/| /' conftest.$ac_ext >&5
22814
22815 ac_lo=`expr $ac_mid + 1`
22816 if test $ac_lo -le $ac_mid; then
22817 ac_lo= ac_hi=
22818 break
22819 fi
22820 ac_mid=`expr 2 '*' $ac_mid + 1`
22821 fi
22822 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22823 done
22824 else
22825 echo "$as_me: failed program was:" >&5
22826 sed 's/^/| /' conftest.$ac_ext >&5
22827
22828 cat >conftest.$ac_ext <<_ACEOF
22829 /* confdefs.h. */
22830 _ACEOF
22831 cat confdefs.h >>conftest.$ac_ext
22832 cat >>conftest.$ac_ext <<_ACEOF
22833 /* end confdefs.h. */
22834 #include <stddef.h>
22835 int
22836 main ()
22837 {
22838 static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 0)];
22839 test_array [0] = 0
22840
22841 ;
22842 return 0;
22843 }
22844 _ACEOF
22845 rm -f conftest.$ac_objext
22846 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22847 (eval $ac_compile) 2>conftest.er1
22848 ac_status=$?
22849 grep -v '^ *+' conftest.er1 >conftest.err
22850 rm -f conftest.er1
22851 cat conftest.err >&5
22852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22853 (exit $ac_status); } &&
22854 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22856 (eval $ac_try) 2>&5
22857 ac_status=$?
22858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22859 (exit $ac_status); }; } &&
22860 { ac_try='test -s conftest.$ac_objext'
22861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22862 (eval $ac_try) 2>&5
22863 ac_status=$?
22864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22865 (exit $ac_status); }; }; then
22866 ac_hi=-1 ac_mid=-1
22867 while :; do
22868 cat >conftest.$ac_ext <<_ACEOF
22869 /* confdefs.h. */
22870 _ACEOF
22871 cat confdefs.h >>conftest.$ac_ext
22872 cat >>conftest.$ac_ext <<_ACEOF
22873 /* end confdefs.h. */
22874 #include <stddef.h>
22875 int
22876 main ()
22877 {
22878 static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= $ac_mid)];
22879 test_array [0] = 0
22880
22881 ;
22882 return 0;
22883 }
22884 _ACEOF
22885 rm -f conftest.$ac_objext
22886 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22887 (eval $ac_compile) 2>conftest.er1
22888 ac_status=$?
22889 grep -v '^ *+' conftest.er1 >conftest.err
22890 rm -f conftest.er1
22891 cat conftest.err >&5
22892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22893 (exit $ac_status); } &&
22894 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22896 (eval $ac_try) 2>&5
22897 ac_status=$?
22898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22899 (exit $ac_status); }; } &&
22900 { ac_try='test -s conftest.$ac_objext'
22901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22902 (eval $ac_try) 2>&5
22903 ac_status=$?
22904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22905 (exit $ac_status); }; }; then
22906 ac_lo=$ac_mid; break
22907 else
22908 echo "$as_me: failed program was:" >&5
22909 sed 's/^/| /' conftest.$ac_ext >&5
22910
22911 ac_hi=`expr '(' $ac_mid ')' - 1`
22912 if test $ac_mid -le $ac_hi; then
22913 ac_lo= ac_hi=
22914 break
22915 fi
22916 ac_mid=`expr 2 '*' $ac_mid`
22917 fi
22918 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22919 done
22920 else
22921 echo "$as_me: failed program was:" >&5
22922 sed 's/^/| /' conftest.$ac_ext >&5
22923
22924 ac_lo= ac_hi=
22925 fi
22926 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22927 fi
22928 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22929 # Binary search between lo and hi bounds.
22930 while test "x$ac_lo" != "x$ac_hi"; do
22931 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22932 cat >conftest.$ac_ext <<_ACEOF
22933 /* confdefs.h. */
22934 _ACEOF
22935 cat confdefs.h >>conftest.$ac_ext
22936 cat >>conftest.$ac_ext <<_ACEOF
22937 /* end confdefs.h. */
22938 #include <stddef.h>
22939 int
22940 main ()
22941 {
22942 static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)];
22943 test_array [0] = 0
22944
22945 ;
22946 return 0;
22947 }
22948 _ACEOF
22949 rm -f conftest.$ac_objext
22950 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22951 (eval $ac_compile) 2>conftest.er1
22952 ac_status=$?
22953 grep -v '^ *+' conftest.er1 >conftest.err
22954 rm -f conftest.er1
22955 cat conftest.err >&5
22956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22957 (exit $ac_status); } &&
22958 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22960 (eval $ac_try) 2>&5
22961 ac_status=$?
22962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22963 (exit $ac_status); }; } &&
22964 { ac_try='test -s conftest.$ac_objext'
22965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22966 (eval $ac_try) 2>&5
22967 ac_status=$?
22968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22969 (exit $ac_status); }; }; then
22970 ac_hi=$ac_mid
22971 else
22972 echo "$as_me: failed program was:" >&5
22973 sed 's/^/| /' conftest.$ac_ext >&5
22974
22975 ac_lo=`expr '(' $ac_mid ')' + 1`
22976 fi
22977 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22978 done
22979 case $ac_lo in
22980 ?*) fits_in_uint=$ac_lo;;
22981 '') result=? ;;
22982 esac
22983 else
22984 if test "$cross_compiling" = yes; then
22985 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
22986 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
22987 { (exit 1); exit 1; }; }
22988 else
22989 cat >conftest.$ac_ext <<_ACEOF
22990 /* confdefs.h. */
22991 _ACEOF
22992 cat confdefs.h >>conftest.$ac_ext
22993 cat >>conftest.$ac_ext <<_ACEOF
22994 /* end confdefs.h. */
22995 #include <stddef.h>
22996 long longval () { return sizeof (size_t) <= sizeof (unsigned int); }
22997 unsigned long ulongval () { return sizeof (size_t) <= sizeof (unsigned int); }
22998 #include <stdio.h>
22999 #include <stdlib.h>
23000 int
23001 main ()
23002 {
23003
23004 FILE *f = fopen ("conftest.val", "w");
23005 if (! f)
23006 exit (1);
23007 if ((sizeof (size_t) <= sizeof (unsigned int)) < 0)
23008 {
23009 long i = longval ();
23010 if (i != (sizeof (size_t) <= sizeof (unsigned int)))
23011 exit (1);
23012 fprintf (f, "%ld\n", i);
23013 }
23014 else
23015 {
23016 unsigned long i = ulongval ();
23017 if (i != (sizeof (size_t) <= sizeof (unsigned int)))
23018 exit (1);
23019 fprintf (f, "%lu\n", i);
23020 }
23021 exit (ferror (f) || fclose (f) != 0);
23022
23023 ;
23024 return 0;
23025 }
23026 _ACEOF
23027 rm -f conftest$ac_exeext
23028 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23029 (eval $ac_link) 2>&5
23030 ac_status=$?
23031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23032 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23034 (eval $ac_try) 2>&5
23035 ac_status=$?
23036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23037 (exit $ac_status); }; }; then
23038 fits_in_uint=`cat conftest.val`
23039 else
23040 echo "$as_me: program exited with status $ac_status" >&5
23041 echo "$as_me: failed program was:" >&5
23042 sed 's/^/| /' conftest.$ac_ext >&5
23043
23044 ( exit $ac_status )
23045 result=?
23046 fi
23047 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23048 fi
23049 fi
23050 rm -f conftest.val
23051 if test "$fits_in_uint" = 1; then
23052 cat >conftest.$ac_ext <<_ACEOF
23053 /* confdefs.h. */
23054 _ACEOF
23055 cat confdefs.h >>conftest.$ac_ext
23056 cat >>conftest.$ac_ext <<_ACEOF
23057 /* end confdefs.h. */
23058 #include <stddef.h>
23059 extern size_t foo;
23060 extern unsigned long foo;
23061
23062 int
23063 main ()
23064 {
23065
23066 ;
23067 return 0;
23068 }
23069 _ACEOF
23070 rm -f conftest.$ac_objext
23071 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23072 (eval $ac_compile) 2>conftest.er1
23073 ac_status=$?
23074 grep -v '^ *+' conftest.er1 >conftest.err
23075 rm -f conftest.er1
23076 cat conftest.err >&5
23077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23078 (exit $ac_status); } &&
23079 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23081 (eval $ac_try) 2>&5
23082 ac_status=$?
23083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23084 (exit $ac_status); }; } &&
23085 { ac_try='test -s conftest.$ac_objext'
23086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23087 (eval $ac_try) 2>&5
23088 ac_status=$?
23089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23090 (exit $ac_status); }; }; then
23091 fits_in_uint=0
23092 else
23093 echo "$as_me: failed program was:" >&5
23094 sed 's/^/| /' conftest.$ac_ext >&5
23095
23096 fi
23097 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23098 fi
23099 if test -z "$result"; then
23100 if test "$fits_in_uint" = 1; then
23101 result="$res_hi$res_lo"U
23102 else
23103 result="$res_hi$res_lo"UL
23104 fi
23105 else
23106 result='~(size_t)0'
23107 fi
23108 fi
23109 echo "$as_me:$LINENO: result: $result" >&5
23110 echo "${ECHO_T}$result" >&6
23111 if test "$result" != yes; then
23112
23113 cat >>confdefs.h <<_ACEOF
23114 #define SIZE_MAX $result
23115 _ACEOF
23116
23117 fi
23118
23119
23120
23121
23122
23123 for ac_header in stdint.h
23124 do
23125 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23126 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23127 echo "$as_me:$LINENO: checking for $ac_header" >&5
23128 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23129 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23130 echo $ECHO_N "(cached) $ECHO_C" >&6
23131 fi
23132 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
23133 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23134 else
23135 # Is the header compilable?
23136 echo "$as_me:$LINENO: checking $ac_header usability" >&5
23137 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
23138 cat >conftest.$ac_ext <<_ACEOF
23139 /* confdefs.h. */
23140 _ACEOF
23141 cat confdefs.h >>conftest.$ac_ext
23142 cat >>conftest.$ac_ext <<_ACEOF
23143 /* end confdefs.h. */
23144 $ac_includes_default
23145 #include <$ac_header>
23146 _ACEOF
23147 rm -f conftest.$ac_objext
23148 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23149 (eval $ac_compile) 2>conftest.er1
23150 ac_status=$?
23151 grep -v '^ *+' conftest.er1 >conftest.err
23152 rm -f conftest.er1
23153 cat conftest.err >&5
23154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23155 (exit $ac_status); } &&
23156 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23158 (eval $ac_try) 2>&5
23159 ac_status=$?
23160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23161 (exit $ac_status); }; } &&
23162 { ac_try='test -s conftest.$ac_objext'
23163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23164 (eval $ac_try) 2>&5
23165 ac_status=$?
23166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23167 (exit $ac_status); }; }; then
23168 ac_header_compiler=yes
23169 else
23170 echo "$as_me: failed program was:" >&5
23171 sed 's/^/| /' conftest.$ac_ext >&5
23172
23173 ac_header_compiler=no
23174 fi
23175 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23176 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23177 echo "${ECHO_T}$ac_header_compiler" >&6
23178
23179 # Is the header present?
23180 echo "$as_me:$LINENO: checking $ac_header presence" >&5
23181 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
23182 cat >conftest.$ac_ext <<_ACEOF
23183 /* confdefs.h. */
23184 _ACEOF
23185 cat confdefs.h >>conftest.$ac_ext
23186 cat >>conftest.$ac_ext <<_ACEOF
23187 /* end confdefs.h. */
23188 #include <$ac_header>
23189 _ACEOF
23190 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
23191 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23192 ac_status=$?
23193 grep -v '^ *+' conftest.er1 >conftest.err
23194 rm -f conftest.er1
23195 cat conftest.err >&5
23196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23197 (exit $ac_status); } >/dev/null; then
23198 if test -s conftest.err; then
23199 ac_cpp_err=$ac_c_preproc_warn_flag
23200 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
23201 else
23202 ac_cpp_err=
23203 fi
23204 else
23205 ac_cpp_err=yes
23206 fi
23207 if test -z "$ac_cpp_err"; then
23208 ac_header_preproc=yes
23209 else
23210 echo "$as_me: failed program was:" >&5
23211 sed 's/^/| /' conftest.$ac_ext >&5
23212
23213 ac_header_preproc=no
23214 fi
23215 rm -f conftest.err conftest.$ac_ext
23216 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23217 echo "${ECHO_T}$ac_header_preproc" >&6
23218
23219 # So? What about this header?
23220 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23221 yes:no: )
23222 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23223 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
23224 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23225 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23226 ac_header_preproc=yes
23227 ;;
23228 no:yes:* )
23229 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23230 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
23231 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23232 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23233 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23234 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23235 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23236 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
23237 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
23238 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
23239 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23240 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
23241 (
23242 cat <<\_ASBOX
23243 ## ------------------------------------------ ##
23244 ## Report this to the AC_PACKAGE_NAME lists. ##
23245 ## ------------------------------------------ ##
23246 _ASBOX
23247 ) |
23248 sed "s/^/$as_me: WARNING: /" >&2
23249 ;;
23250 esac
23251 echo "$as_me:$LINENO: checking for $ac_header" >&5
23252 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23253 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23254 echo $ECHO_N "(cached) $ECHO_C" >&6
23255 else
23256 eval "$as_ac_Header=\$ac_header_preproc"
23257 fi
23258 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
23259 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23260
23261 fi
23262 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23263 cat >>confdefs.h <<_ACEOF
23264 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23265 _ACEOF
23266
23267 fi
23268
23269 done
23270
23271
23272
23273 echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5
23274 echo $ECHO_N "checking for CFPreferencesCopyAppValue... $ECHO_C" >&6
23275 if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then
23276 echo $ECHO_N "(cached) $ECHO_C" >&6
23277 else
23278 gt_save_CPPFLAGS="$CPPFLAGS"
23279 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
23280 gt_save_LIBS="$LIBS"
23281 LIBS="$LIBS -framework CoreFoundation"
23282 cat >conftest.$ac_ext <<_ACEOF
23283 /* confdefs.h. */
23284 _ACEOF
23285 cat confdefs.h >>conftest.$ac_ext
23286 cat >>conftest.$ac_ext <<_ACEOF
23287 /* end confdefs.h. */
23288 #include <CFPreferences.h>
23289 int
23290 main ()
23291 {
23292 CFPreferencesCopyAppValue(NULL, NULL)
23293 ;
23294 return 0;
23295 }
23296 _ACEOF
23297 rm -f conftest.$ac_objext conftest$ac_exeext
23298 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23299 (eval $ac_link) 2>conftest.er1
23300 ac_status=$?
23301 grep -v '^ *+' conftest.er1 >conftest.err
23302 rm -f conftest.er1
23303 cat conftest.err >&5
23304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23305 (exit $ac_status); } &&
23306 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23308 (eval $ac_try) 2>&5
23309 ac_status=$?
23310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23311 (exit $ac_status); }; } &&
23312 { ac_try='test -s conftest$ac_exeext'
23313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23314 (eval $ac_try) 2>&5
23315 ac_status=$?
23316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23317 (exit $ac_status); }; }; then
23318 gt_cv_func_CFPreferencesCopyAppValue=yes
23319 else
23320 echo "$as_me: failed program was:" >&5
23321 sed 's/^/| /' conftest.$ac_ext >&5
23322
23323 gt_cv_func_CFPreferencesCopyAppValue=no
23324 fi
23325 rm -f conftest.err conftest.$ac_objext \
23326 conftest$ac_exeext conftest.$ac_ext
23327 CPPFLAGS="$gt_save_CPPFLAGS"
23328 LIBS="$gt_save_LIBS"
23329 fi
23330 echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
23331 echo "${ECHO_T}$gt_cv_func_CFPreferencesCopyAppValue" >&6
23332 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
23333
23334 cat >>confdefs.h <<\_ACEOF
23335 #define HAVE_CFPREFERENCESCOPYAPPVALUE 1
23336 _ACEOF
23337
23338 fi
23339 echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5
23340 echo $ECHO_N "checking for CFLocaleCopyCurrent... $ECHO_C" >&6
23341 if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then
23342 echo $ECHO_N "(cached) $ECHO_C" >&6
23343 else
23344 gt_save_CPPFLAGS="$CPPFLAGS"
23345 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
23346 gt_save_LIBS="$LIBS"
23347 LIBS="$LIBS -framework CoreFoundation"
23348 cat >conftest.$ac_ext <<_ACEOF
23349 /* confdefs.h. */
23350 _ACEOF
23351 cat confdefs.h >>conftest.$ac_ext
23352 cat >>conftest.$ac_ext <<_ACEOF
23353 /* end confdefs.h. */
23354 #include <CFLocale.h>
23355 int
23356 main ()
23357 {
23358 CFLocaleCopyCurrent();
23359 ;
23360 return 0;
23361 }
23362 _ACEOF
23363 rm -f conftest.$ac_objext conftest$ac_exeext
23364 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23365 (eval $ac_link) 2>conftest.er1
23366 ac_status=$?
23367 grep -v '^ *+' conftest.er1 >conftest.err
23368 rm -f conftest.er1
23369 cat conftest.err >&5
23370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23371 (exit $ac_status); } &&
23372 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23374 (eval $ac_try) 2>&5
23375 ac_status=$?
23376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23377 (exit $ac_status); }; } &&
23378 { ac_try='test -s conftest$ac_exeext'
23379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23380 (eval $ac_try) 2>&5
23381 ac_status=$?
23382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23383 (exit $ac_status); }; }; then
23384 gt_cv_func_CFLocaleCopyCurrent=yes
23385 else
23386 echo "$as_me: failed program was:" >&5
23387 sed 's/^/| /' conftest.$ac_ext >&5
23388
23389 gt_cv_func_CFLocaleCopyCurrent=no
23390 fi
23391 rm -f conftest.err conftest.$ac_objext \
23392 conftest$ac_exeext conftest.$ac_ext
23393 CPPFLAGS="$gt_save_CPPFLAGS"
23394 LIBS="$gt_save_LIBS"
23395 fi
23396 echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
23397 echo "${ECHO_T}$gt_cv_func_CFLocaleCopyCurrent" >&6
23398 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
23399
23400 cat >>confdefs.h <<\_ACEOF
23401 #define HAVE_CFLOCALECOPYCURRENT 1
23402 _ACEOF
23403
23404 fi
23405 INTL_MACOSX_LIBS=
23406 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
23407 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
23408 fi
23409
23410
23411
23412 if test "X$prefix" = "XNONE"; then
23413 acl_final_prefix="$ac_default_prefix"
23414 else
23415 acl_final_prefix="$prefix"
23416 fi
23417 if test "X$exec_prefix" = "XNONE"; then
23418 acl_final_exec_prefix='${prefix}'
23419 else
23420 acl_final_exec_prefix="$exec_prefix"
23421 fi
23422 acl_save_prefix="$prefix"
23423 prefix="$acl_final_prefix"
23424 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
23425 prefix="$acl_save_prefix"
23426
23427
23428 # Check whether --with-gnu-ld or --without-gnu-ld was given.
23429 if test "${with_gnu_ld+set}" = set; then
23430 withval="$with_gnu_ld"
23431 test "$withval" = no || with_gnu_ld=yes
23432 else
23433 with_gnu_ld=no
23434 fi;
23435 # Prepare PATH_SEPARATOR.
23436 # The user is always right.
23437 if test "${PATH_SEPARATOR+set}" != set; then
23438 echo "#! /bin/sh" >conf$$.sh
23439 echo "exit 0" >>conf$$.sh
23440 chmod +x conf$$.sh
23441 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23442 PATH_SEPARATOR=';'
23443 else
23444 PATH_SEPARATOR=:
23445 fi
23446 rm -f conf$$.sh
23447 fi
23448 ac_prog=ld
23449 if test "$GCC" = yes; then
23450 # Check if gcc -print-prog-name=ld gives a path.
23451 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
23452 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
23453 case $host in
23454 *-*-mingw*)
23455 # gcc leaves a trailing carriage return which upsets mingw
23456 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
23457 *)
23458 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
23459 esac
23460 case $ac_prog in
23461 # Accept absolute paths.
23462 [\\/]* | [A-Za-z]:[\\/]*)
23463 re_direlt='/[^/][^/]*/\.\./'
23464 # Canonicalize the path of ld
23465 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
23466 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
23467 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
23468 done
23469 test -z "$LD" && LD="$ac_prog"
23470 ;;
23471 "")
23472 # If it fails, then pretend we aren't using GCC.
23473 ac_prog=ld
23474 ;;
23475 *)
23476 # If it is relative, then search for the first ld in PATH.
23477 with_gnu_ld=unknown
23478 ;;
23479 esac
23480 elif test "$with_gnu_ld" = yes; then
23481 echo "$as_me:$LINENO: checking for GNU ld" >&5
23482 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
23483 else
23484 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
23485 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
23486 fi
23487 if test "${acl_cv_path_LD+set}" = set; then
23488 echo $ECHO_N "(cached) $ECHO_C" >&6
23489 else
23490 if test -z "$LD"; then
23491 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
23492 for ac_dir in $PATH; do
23493 test -z "$ac_dir" && ac_dir=.
23494 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
23495 acl_cv_path_LD="$ac_dir/$ac_prog"
23496 # Check to see if the program is GNU ld. I'd rather use --version,
23497 # but apparently some GNU ld's only accept -v.
23498 # Break only if it was the GNU/non-GNU ld that we prefer.
23499 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
23500 *GNU* | *'with BFD'*)
23501 test "$with_gnu_ld" != no && break ;;
23502 *)
23503 test "$with_gnu_ld" != yes && break ;;
23504 esac
23505 fi
23506 done
23507 IFS="$ac_save_ifs"
23508 else
23509 acl_cv_path_LD="$LD" # Let the user override the test with a path.
23510 fi
23511 fi
23512
23513 LD="$acl_cv_path_LD"
23514 if test -n "$LD"; then
23515 echo "$as_me:$LINENO: result: $LD" >&5
23516 echo "${ECHO_T}$LD" >&6
23517 else
23518 echo "$as_me:$LINENO: result: no" >&5
23519 echo "${ECHO_T}no" >&6
23520 fi
23521 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
23522 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
23523 { (exit 1); exit 1; }; }
23524 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
23525 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
23526 if test "${acl_cv_prog_gnu_ld+set}" = set; then
23527 echo $ECHO_N "(cached) $ECHO_C" >&6
23528 else
23529 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
23530 case `$LD -v 2>&1 </dev/null` in
23531 *GNU* | *'with BFD'*)
23532 acl_cv_prog_gnu_ld=yes ;;
23533 *)
23534 acl_cv_prog_gnu_ld=no ;;
23535 esac
23536 fi
23537 echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
23538 echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
23539 with_gnu_ld=$acl_cv_prog_gnu_ld
23540
23541
23542
23543
23544 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
23545 echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
23546 if test "${acl_cv_rpath+set}" = set; then
23547 echo $ECHO_N "(cached) $ECHO_C" >&6
23548 else
23549
23550 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
23551 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
23552 . ./conftest.sh
23553 rm -f ./conftest.sh
23554 acl_cv_rpath=done
23555
23556 fi
23557 echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
23558 echo "${ECHO_T}$acl_cv_rpath" >&6
23559 wl="$acl_cv_wl"
23560 libext="$acl_cv_libext"
23561 shlibext="$acl_cv_shlibext"
23562 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
23563 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
23564 hardcode_direct="$acl_cv_hardcode_direct"
23565 hardcode_minus_L="$acl_cv_hardcode_minus_L"
23566 # Check whether --enable-rpath or --disable-rpath was given.
23567 if test "${enable_rpath+set}" = set; then
23568 enableval="$enable_rpath"
23569 :
23570 else
23571 enable_rpath=yes
23572 fi;
23573
23574
23575
23576
23577
23578
23579
23580 use_additional=yes
23581
23582 acl_save_prefix="$prefix"
23583 prefix="$acl_final_prefix"
23584 acl_save_exec_prefix="$exec_prefix"
23585 exec_prefix="$acl_final_exec_prefix"
23586
23587 eval additional_includedir=\"$includedir\"
23588 eval additional_libdir=\"$libdir\"
23589
23590 exec_prefix="$acl_save_exec_prefix"
23591 prefix="$acl_save_prefix"
23592
23593
23594 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
23595 if test "${with_libiconv_prefix+set}" = set; then
23596 withval="$with_libiconv_prefix"
23597
23598 if test "X$withval" = "Xno"; then
23599 use_additional=no
23600 else
23601 if test "X$withval" = "X"; then
23602
23603 acl_save_prefix="$prefix"
23604 prefix="$acl_final_prefix"
23605 acl_save_exec_prefix="$exec_prefix"
23606 exec_prefix="$acl_final_exec_prefix"
23607
23608 eval additional_includedir=\"$includedir\"
23609 eval additional_libdir=\"$libdir\"
23610
23611 exec_prefix="$acl_save_exec_prefix"
23612 prefix="$acl_save_prefix"
23613
23614 else
23615 additional_includedir="$withval/include"
23616 additional_libdir="$withval/lib"
23617 fi
23618 fi
23619
23620 fi;
23621 LIBICONV=
23622 LTLIBICONV=
23623 INCICONV=
23624 rpathdirs=
23625 ltrpathdirs=
23626 names_already_handled=
23627 names_next_round='iconv '
23628 while test -n "$names_next_round"; do
23629 names_this_round="$names_next_round"
23630 names_next_round=
23631 for name in $names_this_round; do
23632 already_handled=
23633 for n in $names_already_handled; do
23634 if test "$n" = "$name"; then
23635 already_handled=yes
23636 break
23637 fi
23638 done
23639 if test -z "$already_handled"; then
23640 names_already_handled="$names_already_handled $name"
23641 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
23642 eval value=\"\$HAVE_LIB$uppername\"
23643 if test -n "$value"; then
23644 if test "$value" = yes; then
23645 eval value=\"\$LIB$uppername\"
23646 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
23647 eval value=\"\$LTLIB$uppername\"
23648 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
23649 else
23650 :
23651 fi
23652 else
23653 found_dir=
23654 found_la=
23655 found_so=
23656 found_a=
23657 if test $use_additional = yes; then
23658 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
23659 found_dir="$additional_libdir"
23660 found_so="$additional_libdir/lib$name.$shlibext"
23661 if test -f "$additional_libdir/lib$name.la"; then
23662 found_la="$additional_libdir/lib$name.la"
23663 fi
23664 else
23665 if test -f "$additional_libdir/lib$name.$libext"; then
23666 found_dir="$additional_libdir"
23667 found_a="$additional_libdir/lib$name.$libext"
23668 if test -f "$additional_libdir/lib$name.la"; then
23669 found_la="$additional_libdir/lib$name.la"
23670 fi
23671 fi
23672 fi
23673 fi
23674 if test "X$found_dir" = "X"; then
23675 for x in $LDFLAGS $LTLIBICONV; do
23676
23677 acl_save_prefix="$prefix"
23678 prefix="$acl_final_prefix"
23679 acl_save_exec_prefix="$exec_prefix"
23680 exec_prefix="$acl_final_exec_prefix"
23681 eval x=\"$x\"
23682 exec_prefix="$acl_save_exec_prefix"
23683 prefix="$acl_save_prefix"
23684
23685 case "$x" in
23686 -L*)
23687 dir=`echo "X$x" | sed -e 's/^X-L//'`
23688 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
23689 found_dir="$dir"
23690 found_so="$dir/lib$name.$shlibext"
23691 if test -f "$dir/lib$name.la"; then
23692 found_la="$dir/lib$name.la"
23693 fi
23694 else
23695 if test -f "$dir/lib$name.$libext"; then
23696 found_dir="$dir"
23697 found_a="$dir/lib$name.$libext"
23698 if test -f "$dir/lib$name.la"; then
23699 found_la="$dir/lib$name.la"
23700 fi
23701 fi
23702 fi
23703 ;;
23704 esac
23705 if test "X$found_dir" != "X"; then
23706 break
23707 fi
23708 done
23709 fi
23710 if test "X$found_dir" != "X"; then
23711 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
23712 if test "X$found_so" != "X"; then
23713 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
23714 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
23715 else
23716 haveit=
23717 for x in $ltrpathdirs; do
23718 if test "X$x" = "X$found_dir"; then
23719 haveit=yes
23720 break
23721 fi
23722 done
23723 if test -z "$haveit"; then
23724 ltrpathdirs="$ltrpathdirs $found_dir"
23725 fi
23726 if test "$hardcode_direct" = yes; then
23727 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
23728 else
23729 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
23730 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
23731 haveit=
23732 for x in $rpathdirs; do
23733 if test "X$x" = "X$found_dir"; then
23734 haveit=yes
23735 break
23736 fi
23737 done
23738 if test -z "$haveit"; then
23739 rpathdirs="$rpathdirs $found_dir"
23740 fi
23741 else
23742 haveit=
23743 for x in $LDFLAGS $LIBICONV; do
23744
23745 acl_save_prefix="$prefix"
23746 prefix="$acl_final_prefix"
23747 acl_save_exec_prefix="$exec_prefix"
23748 exec_prefix="$acl_final_exec_prefix"
23749 eval x=\"$x\"
23750 exec_prefix="$acl_save_exec_prefix"
23751 prefix="$acl_save_prefix"
23752
23753 if test "X$x" = "X-L$found_dir"; then
23754 haveit=yes
23755 break
23756 fi
23757 done
23758 if test -z "$haveit"; then
23759 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
23760 fi
23761 if test "$hardcode_minus_L" != no; then
23762 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
23763 else
23764 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
23765 fi
23766 fi
23767 fi
23768 fi
23769 else
23770 if test "X$found_a" != "X"; then
23771 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
23772 else
23773 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
23774 fi
23775 fi
23776 additional_includedir=
23777 case "$found_dir" in
23778 */lib | */lib/)
23779 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
23780 additional_includedir="$basedir/include"
23781 ;;
23782 esac
23783 if test "X$additional_includedir" != "X"; then
23784 if test "X$additional_includedir" != "X/usr/include"; then
23785 haveit=
23786 if test "X$additional_includedir" = "X/usr/local/include"; then
23787 if test -n "$GCC"; then
23788 case $host_os in
23789 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
23790 esac
23791 fi
23792 fi
23793 if test -z "$haveit"; then
23794 for x in $CPPFLAGS $INCICONV; do
23795
23796 acl_save_prefix="$prefix"
23797 prefix="$acl_final_prefix"
23798 acl_save_exec_prefix="$exec_prefix"
23799 exec_prefix="$acl_final_exec_prefix"
23800 eval x=\"$x\"
23801 exec_prefix="$acl_save_exec_prefix"
23802 prefix="$acl_save_prefix"
23803
23804 if test "X$x" = "X-I$additional_includedir"; then
23805 haveit=yes
23806 break
23807 fi
23808 done
23809 if test -z "$haveit"; then
23810 if test -d "$additional_includedir"; then
23811 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
23812 fi
23813 fi
23814 fi
23815 fi
23816 fi
23817 if test -n "$found_la"; then
23818 save_libdir="$libdir"
23819 case "$found_la" in
23820 */* | *\\*) . "$found_la" ;;
23821 *) . "./$found_la" ;;
23822 esac
23823 libdir="$save_libdir"
23824 for dep in $dependency_libs; do
23825 case "$dep" in
23826 -L*)
23827 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
23828 if test "X$additional_libdir" != "X/usr/lib"; then
23829 haveit=
23830 if test "X$additional_libdir" = "X/usr/local/lib"; then
23831 if test -n "$GCC"; then
23832 case $host_os in
23833 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
23834 esac
23835 fi
23836 fi
23837 if test -z "$haveit"; then
23838 haveit=
23839 for x in $LDFLAGS $LIBICONV; do
23840
23841 acl_save_prefix="$prefix"
23842 prefix="$acl_final_prefix"
23843 acl_save_exec_prefix="$exec_prefix"
23844 exec_prefix="$acl_final_exec_prefix"
23845 eval x=\"$x\"
23846 exec_prefix="$acl_save_exec_prefix"
23847 prefix="$acl_save_prefix"
23848
23849 if test "X$x" = "X-L$additional_libdir"; then
23850 haveit=yes
23851 break
23852 fi
23853 done
23854 if test -z "$haveit"; then
23855 if test -d "$additional_libdir"; then
23856 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
23857 fi
23858 fi
23859 haveit=
23860 for x in $LDFLAGS $LTLIBICONV; do
23861
23862 acl_save_prefix="$prefix"
23863 prefix="$acl_final_prefix"
23864 acl_save_exec_prefix="$exec_prefix"
23865 exec_prefix="$acl_final_exec_prefix"
23866 eval x=\"$x\"
23867 exec_prefix="$acl_save_exec_prefix"
23868 prefix="$acl_save_prefix"
23869
23870 if test "X$x" = "X-L$additional_libdir"; then
23871 haveit=yes
23872 break
23873 fi
23874 done
23875 if test -z "$haveit"; then
23876 if test -d "$additional_libdir"; then
23877 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
23878 fi
23879 fi
23880 fi
23881 fi
23882 ;;
23883 -R*)
23884 dir=`echo "X$dep" | sed -e 's/^X-R//'`
23885 if test "$enable_rpath" != no; then
23886 haveit=
23887 for x in $rpathdirs; do
23888 if test "X$x" = "X$dir"; then
23889 haveit=yes
23890 break
23891 fi
23892 done
23893 if test -z "$haveit"; then
23894 rpathdirs="$rpathdirs $dir"
23895 fi
23896 haveit=
23897 for x in $ltrpathdirs; do
23898 if test "X$x" = "X$dir"; then
23899 haveit=yes
23900 break
23901 fi
23902 done
23903 if test -z "$haveit"; then
23904 ltrpathdirs="$ltrpathdirs $dir"
23905 fi
23906 fi
23907 ;;
23908 -l*)
23909 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
23910 ;;
23911 *.la)
23912 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
23913 ;;
23914 *)
23915 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
23916 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
23917 ;;
23918 esac
23919 done
23920 fi
23921 else
23922 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
23923 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
23924 fi
23925 fi
23926 fi
23927 done
23928 done
23929 if test "X$rpathdirs" != "X"; then
23930 if test -n "$hardcode_libdir_separator"; then
23931 alldirs=
23932 for found_dir in $rpathdirs; do
23933 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
23934 done
23935 acl_save_libdir="$libdir"
23936 libdir="$alldirs"
23937 eval flag=\"$hardcode_libdir_flag_spec\"
23938 libdir="$acl_save_libdir"
23939 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
23940 else
23941 for found_dir in $rpathdirs; do
23942 acl_save_libdir="$libdir"
23943 libdir="$found_dir"
23944 eval flag=\"$hardcode_libdir_flag_spec\"
23945 libdir="$acl_save_libdir"
23946 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
23947 done
23948 fi
23949 fi
23950 if test "X$ltrpathdirs" != "X"; then
23951 for found_dir in $ltrpathdirs; do
23952 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
23953 done
23954 fi
23955
23956
23957
23958
23959
23960
23961
23962
23963 echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
23964 echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
23965 if test "${ac_cv_type_ptrdiff_t+set}" = set; then
23966 echo $ECHO_N "(cached) $ECHO_C" >&6
23967 else
23968 cat >conftest.$ac_ext <<_ACEOF
23969 /* confdefs.h. */
23970 _ACEOF
23971 cat confdefs.h >>conftest.$ac_ext
23972 cat >>conftest.$ac_ext <<_ACEOF
23973 /* end confdefs.h. */
23974 $ac_includes_default
23975 int
23976 main ()
23977 {
23978 if ((ptrdiff_t *) 0)
23979 return 0;
23980 if (sizeof (ptrdiff_t))
23981 return 0;
23982 ;
23983 return 0;
23984 }
23985 _ACEOF
23986 rm -f conftest.$ac_objext
23987 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23988 (eval $ac_compile) 2>conftest.er1
23989 ac_status=$?
23990 grep -v '^ *+' conftest.er1 >conftest.err
23991 rm -f conftest.er1
23992 cat conftest.err >&5
23993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23994 (exit $ac_status); } &&
23995 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23997 (eval $ac_try) 2>&5
23998 ac_status=$?
23999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24000 (exit $ac_status); }; } &&
24001 { ac_try='test -s conftest.$ac_objext'
24002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24003 (eval $ac_try) 2>&5
24004 ac_status=$?
24005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24006 (exit $ac_status); }; }; then
24007 ac_cv_type_ptrdiff_t=yes
24008 else
24009 echo "$as_me: failed program was:" >&5
24010 sed 's/^/| /' conftest.$ac_ext >&5
24011
24012 ac_cv_type_ptrdiff_t=no
24013 fi
24014 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24015 fi
24016 echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
24017 echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
24018 if test $ac_cv_type_ptrdiff_t = yes; then
24019 :
24020 else
24021
24022 cat >>confdefs.h <<\_ACEOF
24023 #define ptrdiff_t long
24024 _ACEOF
24025
24026
24027 fi
24028
24029
24030
24031
24032
24033
24034
24035
24036
24037
24038
24039 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
24040 stdlib.h string.h unistd.h sys/param.h
24041 do
24042 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24043 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24044 echo "$as_me:$LINENO: checking for $ac_header" >&5
24045 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24046 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24047 echo $ECHO_N "(cached) $ECHO_C" >&6
24048 fi
24049 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
24050 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24051 else
24052 # Is the header compilable?
24053 echo "$as_me:$LINENO: checking $ac_header usability" >&5
24054 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
24055 cat >conftest.$ac_ext <<_ACEOF
24056 /* confdefs.h. */
24057 _ACEOF
24058 cat confdefs.h >>conftest.$ac_ext
24059 cat >>conftest.$ac_ext <<_ACEOF
24060 /* end confdefs.h. */
24061 $ac_includes_default
24062 #include <$ac_header>
24063 _ACEOF
24064 rm -f conftest.$ac_objext
24065 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
24066 (eval $ac_compile) 2>conftest.er1
24067 ac_status=$?
24068 grep -v '^ *+' conftest.er1 >conftest.err
24069 rm -f conftest.er1
24070 cat conftest.err >&5
24071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24072 (exit $ac_status); } &&
24073 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24075 (eval $ac_try) 2>&5
24076 ac_status=$?
24077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24078 (exit $ac_status); }; } &&
24079 { ac_try='test -s conftest.$ac_objext'
24080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24081 (eval $ac_try) 2>&5
24082 ac_status=$?
24083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24084 (exit $ac_status); }; }; then
24085 ac_header_compiler=yes
24086 else
24087 echo "$as_me: failed program was:" >&5
24088 sed 's/^/| /' conftest.$ac_ext >&5
24089
24090 ac_header_compiler=no
24091 fi
24092 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24093 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24094 echo "${ECHO_T}$ac_header_compiler" >&6
24095
24096 # Is the header present?
24097 echo "$as_me:$LINENO: checking $ac_header presence" >&5
24098 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
24099 cat >conftest.$ac_ext <<_ACEOF
24100 /* confdefs.h. */
24101 _ACEOF
24102 cat confdefs.h >>conftest.$ac_ext
24103 cat >>conftest.$ac_ext <<_ACEOF
24104 /* end confdefs.h. */
24105 #include <$ac_header>
24106 _ACEOF
24107 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
24108 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24109 ac_status=$?
24110 grep -v '^ *+' conftest.er1 >conftest.err
24111 rm -f conftest.er1
24112 cat conftest.err >&5
24113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24114 (exit $ac_status); } >/dev/null; then
24115 if test -s conftest.err; then
24116 ac_cpp_err=$ac_c_preproc_warn_flag
24117 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
24118 else
24119 ac_cpp_err=
24120 fi
24121 else
24122 ac_cpp_err=yes
24123 fi
24124 if test -z "$ac_cpp_err"; then
24125 ac_header_preproc=yes
24126 else
24127 echo "$as_me: failed program was:" >&5
24128 sed 's/^/| /' conftest.$ac_ext >&5
24129
24130 ac_header_preproc=no
24131 fi
24132 rm -f conftest.err conftest.$ac_ext
24133 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24134 echo "${ECHO_T}$ac_header_preproc" >&6
24135
24136 # So? What about this header?
24137 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24138 yes:no: )
24139 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
24140 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
24141 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
24142 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
24143 ac_header_preproc=yes
24144 ;;
24145 no:yes:* )
24146 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
24147 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
24148 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
24149 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
24150 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
24151 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
24152 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
24153 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
24154 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
24155 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
24156 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
24157 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
24158 (
24159 cat <<\_ASBOX
24160 ## ------------------------------------------ ##
24161 ## Report this to the AC_PACKAGE_NAME lists. ##
24162 ## ------------------------------------------ ##
24163 _ASBOX
24164 ) |
24165 sed "s/^/$as_me: WARNING: /" >&2
24166 ;;
24167 esac
24168 echo "$as_me:$LINENO: checking for $ac_header" >&5
24169 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24170 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24171 echo $ECHO_N "(cached) $ECHO_C" >&6
24172 else
24173 eval "$as_ac_Header=\$ac_header_preproc"
24174 fi
24175 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
24176 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24177
24178 fi
24179 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24180 cat >>confdefs.h <<_ACEOF
24181 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24182 _ACEOF
24183
24184 fi
24185
24186 done
24187
24188
24189
24190
24191
24192
24193
24194
24195
24196
24197
24198
24199
24200
24201
24202
24203
24204
24205
24206
24207
24208
24209
24210
24211 for ac_func in asprintf fwprintf getcwd getegid geteuid getgid getuid \
24212 mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
24213 strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
24214 __fsetlocking
24215 do
24216 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24217 echo "$as_me:$LINENO: checking for $ac_func" >&5
24218 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24219 if eval "test \"\${$as_ac_var+set}\" = set"; then
24220 echo $ECHO_N "(cached) $ECHO_C" >&6
24221 else
24222 cat >conftest.$ac_ext <<_ACEOF
24223 /* confdefs.h. */
24224 _ACEOF
24225 cat confdefs.h >>conftest.$ac_ext
24226 cat >>conftest.$ac_ext <<_ACEOF
24227 /* end confdefs.h. */
24228 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24229 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24230 #define $ac_func innocuous_$ac_func
24231
24232 /* System header to define __stub macros and hopefully few prototypes,
24233 which can conflict with char $ac_func (); below.
24234 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24235 <limits.h> exists even on freestanding compilers. */
24236
24237 #ifdef __STDC__
24238 # include <limits.h>
24239 #else
24240 # include <assert.h>
24241 #endif
24242
24243 #undef $ac_func
24244
24245 /* Override any gcc2 internal prototype to avoid an error. */
24246 #ifdef __cplusplus
24247 extern "C"
24248 {
24249 #endif
24250 /* We use char because int might match the return type of a gcc2
24251 builtin and then its argument prototype would still apply. */
24252 char $ac_func ();
24253 /* The GNU C library defines this for functions which it implements
24254 to always fail with ENOSYS. Some functions are actually named
24255 something starting with __ and the normal name is an alias. */
24256 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24257 choke me
24258 #else
24259 char (*f) () = $ac_func;
24260 #endif
24261 #ifdef __cplusplus
24262 }
24263 #endif
24264
24265 int
24266 main ()
24267 {
24268 return f != $ac_func;
24269 ;
24270 return 0;
24271 }
24272 _ACEOF
24273 rm -f conftest.$ac_objext conftest$ac_exeext
24274 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24275 (eval $ac_link) 2>conftest.er1
24276 ac_status=$?
24277 grep -v '^ *+' conftest.er1 >conftest.err
24278 rm -f conftest.er1
24279 cat conftest.err >&5
24280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24281 (exit $ac_status); } &&
24282 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24284 (eval $ac_try) 2>&5
24285 ac_status=$?
24286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24287 (exit $ac_status); }; } &&
24288 { ac_try='test -s conftest$ac_exeext'
24289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24290 (eval $ac_try) 2>&5
24291 ac_status=$?
24292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24293 (exit $ac_status); }; }; then
24294 eval "$as_ac_var=yes"
24295 else
24296 echo "$as_me: failed program was:" >&5
24297 sed 's/^/| /' conftest.$ac_ext >&5
24298
24299 eval "$as_ac_var=no"
24300 fi
24301 rm -f conftest.err conftest.$ac_objext \
24302 conftest$ac_exeext conftest.$ac_ext
24303 fi
24304 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24305 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24306 if test `eval echo '${'$as_ac_var'}'` = yes; then
24307 cat >>confdefs.h <<_ACEOF
24308 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24309 _ACEOF
24310
24311 fi
24312 done
24313
24314
24315
24316 echo "$as_me:$LINENO: checking whether _snprintf is declared" >&5
24317 echo $ECHO_N "checking whether _snprintf is declared... $ECHO_C" >&6
24318 if test "${ac_cv_have_decl__snprintf+set}" = set; then
24319 echo $ECHO_N "(cached) $ECHO_C" >&6
24320 else
24321 cat >conftest.$ac_ext <<_ACEOF
24322 /* confdefs.h. */
24323 _ACEOF
24324 cat confdefs.h >>conftest.$ac_ext
24325 cat >>conftest.$ac_ext <<_ACEOF
24326 /* end confdefs.h. */
24327 #include <stdio.h>
24328 int
24329 main ()
24330 {
24331
24332 #ifndef _snprintf
24333 char *p = (char *) _snprintf;
24334 #endif
24335
24336 ;
24337 return 0;
24338 }
24339 _ACEOF
24340 rm -f conftest.$ac_objext
24341 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
24342 (eval $ac_compile) 2>conftest.er1
24343 ac_status=$?
24344 grep -v '^ *+' conftest.er1 >conftest.err
24345 rm -f conftest.er1
24346 cat conftest.err >&5
24347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24348 (exit $ac_status); } &&
24349 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24351 (eval $ac_try) 2>&5
24352 ac_status=$?
24353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24354 (exit $ac_status); }; } &&
24355 { ac_try='test -s conftest.$ac_objext'
24356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24357 (eval $ac_try) 2>&5
24358 ac_status=$?
24359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24360 (exit $ac_status); }; }; then
24361 ac_cv_have_decl__snprintf=yes
24362 else
24363 echo "$as_me: failed program was:" >&5
24364 sed 's/^/| /' conftest.$ac_ext >&5
24365
24366 ac_cv_have_decl__snprintf=no
24367 fi
24368 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24369 fi
24370 echo "$as_me:$LINENO: result: $ac_cv_have_decl__snprintf" >&5
24371 echo "${ECHO_T}$ac_cv_have_decl__snprintf" >&6
24372 if test $ac_cv_have_decl__snprintf = yes; then
24373 gt_value=1
24374 else
24375 gt_value=0
24376 fi
24377
24378 cat >>confdefs.h <<_ACEOF
24379 #define HAVE_DECL__SNPRINTF $gt_value
24380 _ACEOF
24381
24382
24383
24384 echo "$as_me:$LINENO: checking whether _snwprintf is declared" >&5
24385 echo $ECHO_N "checking whether _snwprintf is declared... $ECHO_C" >&6
24386 if test "${ac_cv_have_decl__snwprintf+set}" = set; then
24387 echo $ECHO_N "(cached) $ECHO_C" >&6
24388 else
24389 cat >conftest.$ac_ext <<_ACEOF
24390 /* confdefs.h. */
24391 _ACEOF
24392 cat confdefs.h >>conftest.$ac_ext
24393 cat >>conftest.$ac_ext <<_ACEOF
24394 /* end confdefs.h. */
24395 #include <stdio.h>
24396 int
24397 main ()
24398 {
24399
24400 #ifndef _snwprintf
24401 char *p = (char *) _snwprintf;
24402 #endif
24403
24404 ;
24405 return 0;
24406 }
24407 _ACEOF
24408 rm -f conftest.$ac_objext
24409 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
24410 (eval $ac_compile) 2>conftest.er1
24411 ac_status=$?
24412 grep -v '^ *+' conftest.er1 >conftest.err
24413 rm -f conftest.er1
24414 cat conftest.err >&5
24415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24416 (exit $ac_status); } &&
24417 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24419 (eval $ac_try) 2>&5
24420 ac_status=$?
24421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24422 (exit $ac_status); }; } &&
24423 { ac_try='test -s conftest.$ac_objext'
24424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24425 (eval $ac_try) 2>&5
24426 ac_status=$?
24427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24428 (exit $ac_status); }; }; then
24429 ac_cv_have_decl__snwprintf=yes
24430 else
24431 echo "$as_me: failed program was:" >&5
24432 sed 's/^/| /' conftest.$ac_ext >&5
24433
24434 ac_cv_have_decl__snwprintf=no
24435 fi
24436 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24437 fi
24438 echo "$as_me:$LINENO: result: $ac_cv_have_decl__snwprintf" >&5
24439 echo "${ECHO_T}$ac_cv_have_decl__snwprintf" >&6
24440 if test $ac_cv_have_decl__snwprintf = yes; then
24441 gt_value=1
24442 else
24443 gt_value=0
24444 fi
24445
24446 cat >>confdefs.h <<_ACEOF
24447 #define HAVE_DECL__SNWPRINTF $gt_value
24448 _ACEOF
24449
24450
24451
24452
24453 echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5
24454 echo $ECHO_N "checking whether feof_unlocked is declared... $ECHO_C" >&6
24455 if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then
24456 echo $ECHO_N "(cached) $ECHO_C" >&6
24457 else
24458 cat >conftest.$ac_ext <<_ACEOF
24459 /* confdefs.h. */
24460 _ACEOF
24461 cat confdefs.h >>conftest.$ac_ext
24462 cat >>conftest.$ac_ext <<_ACEOF
24463 /* end confdefs.h. */
24464 #include <stdio.h>
24465 int
24466 main ()
24467 {
24468
24469 #ifndef feof_unlocked
24470 char *p = (char *) feof_unlocked;
24471 #endif
24472
24473 ;
24474 return 0;
24475 }
24476 _ACEOF
24477 rm -f conftest.$ac_objext
24478 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
24479 (eval $ac_compile) 2>conftest.er1
24480 ac_status=$?
24481 grep -v '^ *+' conftest.er1 >conftest.err
24482 rm -f conftest.er1
24483 cat conftest.err >&5
24484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24485 (exit $ac_status); } &&
24486 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24488 (eval $ac_try) 2>&5
24489 ac_status=$?
24490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24491 (exit $ac_status); }; } &&
24492 { ac_try='test -s conftest.$ac_objext'
24493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24494 (eval $ac_try) 2>&5
24495 ac_status=$?
24496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24497 (exit $ac_status); }; }; then
24498 ac_cv_have_decl_feof_unlocked=yes
24499 else
24500 echo "$as_me: failed program was:" >&5
24501 sed 's/^/| /' conftest.$ac_ext >&5
24502
24503 ac_cv_have_decl_feof_unlocked=no
24504 fi
24505 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24506 fi
24507 echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5
24508 echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6
24509 if test $ac_cv_have_decl_feof_unlocked = yes; then
24510 gt_value=1
24511 else
24512 gt_value=0
24513 fi
24514
24515 cat >>confdefs.h <<_ACEOF
24516 #define HAVE_DECL_FEOF_UNLOCKED $gt_value
24517 _ACEOF
24518
24519
24520
24521 echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5
24522 echo $ECHO_N "checking whether fgets_unlocked is declared... $ECHO_C" >&6
24523 if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then
24524 echo $ECHO_N "(cached) $ECHO_C" >&6
24525 else
24526 cat >conftest.$ac_ext <<_ACEOF
24527 /* confdefs.h. */
24528 _ACEOF
24529 cat confdefs.h >>conftest.$ac_ext
24530 cat >>conftest.$ac_ext <<_ACEOF
24531 /* end confdefs.h. */
24532 #include <stdio.h>
24533 int
24534 main ()
24535 {
24536
24537 #ifndef fgets_unlocked
24538 char *p = (char *) fgets_unlocked;
24539 #endif
24540
24541 ;
24542 return 0;
24543 }
24544 _ACEOF
24545 rm -f conftest.$ac_objext
24546 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
24547 (eval $ac_compile) 2>conftest.er1
24548 ac_status=$?
24549 grep -v '^ *+' conftest.er1 >conftest.err
24550 rm -f conftest.er1
24551 cat conftest.err >&5
24552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24553 (exit $ac_status); } &&
24554 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24556 (eval $ac_try) 2>&5
24557 ac_status=$?
24558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24559 (exit $ac_status); }; } &&
24560 { ac_try='test -s conftest.$ac_objext'
24561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24562 (eval $ac_try) 2>&5
24563 ac_status=$?
24564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24565 (exit $ac_status); }; }; then
24566 ac_cv_have_decl_fgets_unlocked=yes
24567 else
24568 echo "$as_me: failed program was:" >&5
24569 sed 's/^/| /' conftest.$ac_ext >&5
24570
24571 ac_cv_have_decl_fgets_unlocked=no
24572 fi
24573 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24574 fi
24575 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5
24576 echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6
24577 if test $ac_cv_have_decl_fgets_unlocked = yes; then
24578 gt_value=1
24579 else
24580 gt_value=0
24581 fi
24582
24583 cat >>confdefs.h <<_ACEOF
24584 #define HAVE_DECL_FGETS_UNLOCKED $gt_value
24585 _ACEOF
24586
24587
24588
24589 echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5
24590 echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6
24591 if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then
24592 echo $ECHO_N "(cached) $ECHO_C" >&6
24593 else
24594 cat >conftest.$ac_ext <<_ACEOF
24595 /* confdefs.h. */
24596 _ACEOF
24597 cat confdefs.h >>conftest.$ac_ext
24598 cat >>conftest.$ac_ext <<_ACEOF
24599 /* end confdefs.h. */
24600 #include <stdio.h>
24601 int
24602 main ()
24603 {
24604
24605 #ifndef getc_unlocked
24606 char *p = (char *) getc_unlocked;
24607 #endif
24608
24609 ;
24610 return 0;
24611 }
24612 _ACEOF
24613 rm -f conftest.$ac_objext
24614 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
24615 (eval $ac_compile) 2>conftest.er1
24616 ac_status=$?
24617 grep -v '^ *+' conftest.er1 >conftest.err
24618 rm -f conftest.er1
24619 cat conftest.err >&5
24620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24621 (exit $ac_status); } &&
24622 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24624 (eval $ac_try) 2>&5
24625 ac_status=$?
24626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24627 (exit $ac_status); }; } &&
24628 { ac_try='test -s conftest.$ac_objext'
24629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24630 (eval $ac_try) 2>&5
24631 ac_status=$?
24632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24633 (exit $ac_status); }; }; then
24634 ac_cv_have_decl_getc_unlocked=yes
24635 else
24636 echo "$as_me: failed program was:" >&5
24637 sed 's/^/| /' conftest.$ac_ext >&5
24638
24639 ac_cv_have_decl_getc_unlocked=no
24640 fi
24641 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24642 fi
24643 echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5
24644 echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6
24645 if test $ac_cv_have_decl_getc_unlocked = yes; then
24646 gt_value=1
24647 else
24648 gt_value=0
24649 fi
24650
24651 cat >>confdefs.h <<_ACEOF
24652 #define HAVE_DECL_GETC_UNLOCKED $gt_value
24653 _ACEOF
24654
24655
24656
24657 case $gt_cv_func_printf_posix in
24658 *yes) HAVE_POSIX_PRINTF=1 ;;
24659 *) HAVE_POSIX_PRINTF=0 ;;
24660 esac
24661
24662 if test "$ac_cv_func_asprintf" = yes; then
24663 HAVE_ASPRINTF=1
24664 else
24665 HAVE_ASPRINTF=0
24666 fi
24667
24668 if test "$ac_cv_func_snprintf" = yes; then
24669 HAVE_SNPRINTF=1
24670 else
24671 HAVE_SNPRINTF=0
24672 fi
24673
24674 if test "$ac_cv_func_wprintf" = yes; then
24675 HAVE_WPRINTF=1
24676 else
24677 HAVE_WPRINTF=0
24678 fi
24679
24680
24681
24682
24683
24684
24685
24686 am_save_CPPFLAGS="$CPPFLAGS"
24687
24688 for element in $INCICONV; do
24689 haveit=
24690 for x in $CPPFLAGS; do
24691
24692 acl_save_prefix="$prefix"
24693 prefix="$acl_final_prefix"
24694 acl_save_exec_prefix="$exec_prefix"
24695 exec_prefix="$acl_final_exec_prefix"
24696 eval x=\"$x\"
24697 exec_prefix="$acl_save_exec_prefix"
24698 prefix="$acl_save_prefix"
24699
24700 if test "X$x" = "X$element"; then
24701 haveit=yes
24702 break
24703 fi
24704 done
24705 if test -z "$haveit"; then
24706 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
24707 fi
24708 done
24709
24710
24711 echo "$as_me:$LINENO: checking for iconv" >&5
24712 echo $ECHO_N "checking for iconv... $ECHO_C" >&6
24713 if test "${am_cv_func_iconv+set}" = set; then
24714 echo $ECHO_N "(cached) $ECHO_C" >&6
24715 else
24716
24717 am_cv_func_iconv="no, consider installing GNU libiconv"
24718 am_cv_lib_iconv=no
24719 cat >conftest.$ac_ext <<_ACEOF
24720 /* confdefs.h. */
24721 _ACEOF
24722 cat confdefs.h >>conftest.$ac_ext
24723 cat >>conftest.$ac_ext <<_ACEOF
24724 /* end confdefs.h. */
24725 #include <stdlib.h>
24726 #include <iconv.h>
24727 int
24728 main ()
24729 {
24730 iconv_t cd = iconv_open("","");
24731 iconv(cd,NULL,NULL,NULL,NULL);
24732 iconv_close(cd);
24733 ;
24734 return 0;
24735 }
24736 _ACEOF
24737 rm -f conftest.$ac_objext conftest$ac_exeext
24738 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24739 (eval $ac_link) 2>conftest.er1
24740 ac_status=$?
24741 grep -v '^ *+' conftest.er1 >conftest.err
24742 rm -f conftest.er1
24743 cat conftest.err >&5
24744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24745 (exit $ac_status); } &&
24746 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24748 (eval $ac_try) 2>&5
24749 ac_status=$?
24750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24751 (exit $ac_status); }; } &&
24752 { ac_try='test -s conftest$ac_exeext'
24753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24754 (eval $ac_try) 2>&5
24755 ac_status=$?
24756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24757 (exit $ac_status); }; }; then
24758 am_cv_func_iconv=yes
24759 else
24760 echo "$as_me: failed program was:" >&5
24761 sed 's/^/| /' conftest.$ac_ext >&5
24762
24763 fi
24764 rm -f conftest.err conftest.$ac_objext \
24765 conftest$ac_exeext conftest.$ac_ext
24766 if test "$am_cv_func_iconv" != yes; then
24767 am_save_LIBS="$LIBS"
24768 LIBS="$LIBS $LIBICONV"
24769 cat >conftest.$ac_ext <<_ACEOF
24770 /* confdefs.h. */
24771 _ACEOF
24772 cat confdefs.h >>conftest.$ac_ext
24773 cat >>conftest.$ac_ext <<_ACEOF
24774 /* end confdefs.h. */
24775 #include <stdlib.h>
24776 #include <iconv.h>
24777 int
24778 main ()
24779 {
24780 iconv_t cd = iconv_open("","");
24781 iconv(cd,NULL,NULL,NULL,NULL);
24782 iconv_close(cd);
24783 ;
24784 return 0;
24785 }
24786 _ACEOF
24787 rm -f conftest.$ac_objext conftest$ac_exeext
24788 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24789 (eval $ac_link) 2>conftest.er1
24790 ac_status=$?
24791 grep -v '^ *+' conftest.er1 >conftest.err
24792 rm -f conftest.er1
24793 cat conftest.err >&5
24794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24795 (exit $ac_status); } &&
24796 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24798 (eval $ac_try) 2>&5
24799 ac_status=$?
24800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24801 (exit $ac_status); }; } &&
24802 { ac_try='test -s conftest$ac_exeext'
24803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24804 (eval $ac_try) 2>&5
24805 ac_status=$?
24806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24807 (exit $ac_status); }; }; then
24808 am_cv_lib_iconv=yes
24809 am_cv_func_iconv=yes
24810 else
24811 echo "$as_me: failed program was:" >&5
24812 sed 's/^/| /' conftest.$ac_ext >&5
24813
24814 fi
24815 rm -f conftest.err conftest.$ac_objext \
24816 conftest$ac_exeext conftest.$ac_ext
24817 LIBS="$am_save_LIBS"
24818 fi
24819
24820 fi
24821 echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
24822 echo "${ECHO_T}$am_cv_func_iconv" >&6
24823 if test "$am_cv_func_iconv" = yes; then
24824
24825 cat >>confdefs.h <<\_ACEOF
24826 #define HAVE_ICONV 1
24827 _ACEOF
24828
24829 fi
24830 if test "$am_cv_lib_iconv" = yes; then
24831 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
24832 echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
24833 echo "$as_me:$LINENO: result: $LIBICONV" >&5
24834 echo "${ECHO_T}$LIBICONV" >&6
24835 else
24836 CPPFLAGS="$am_save_CPPFLAGS"
24837 LIBICONV=
24838 LTLIBICONV=
24839 fi
24840
24841
24842
24843 if test "$am_cv_func_iconv" = yes; then
24844 echo "$as_me:$LINENO: checking for iconv declaration" >&5
24845 echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
24846 if test "${am_cv_proto_iconv+set}" = set; then
24847 echo $ECHO_N "(cached) $ECHO_C" >&6
24848 else
24849
24850 cat >conftest.$ac_ext <<_ACEOF
24851 /* confdefs.h. */
24852 _ACEOF
24853 cat confdefs.h >>conftest.$ac_ext
24854 cat >>conftest.$ac_ext <<_ACEOF
24855 /* end confdefs.h. */
24856
24857 #include <stdlib.h>
24858 #include <iconv.h>
24859 extern
24860 #ifdef __cplusplus
24861 "C"
24862 #endif
24863 #if defined(__STDC__) || defined(__cplusplus)
24864 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
24865 #else
24866 size_t iconv();
24867 #endif
24868
24869 int
24870 main ()
24871 {
24872
24873 ;
24874 return 0;
24875 }
24876 _ACEOF
24877 rm -f conftest.$ac_objext
24878 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
24879 (eval $ac_compile) 2>conftest.er1
24880 ac_status=$?
24881 grep -v '^ *+' conftest.er1 >conftest.err
24882 rm -f conftest.er1
24883 cat conftest.err >&5
24884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24885 (exit $ac_status); } &&
24886 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24888 (eval $ac_try) 2>&5
24889 ac_status=$?
24890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24891 (exit $ac_status); }; } &&
24892 { ac_try='test -s conftest.$ac_objext'
24893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24894 (eval $ac_try) 2>&5
24895 ac_status=$?
24896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24897 (exit $ac_status); }; }; then
24898 am_cv_proto_iconv_arg1=""
24899 else
24900 echo "$as_me: failed program was:" >&5
24901 sed 's/^/| /' conftest.$ac_ext >&5
24902
24903 am_cv_proto_iconv_arg1="const"
24904 fi
24905 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24906 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
24907 fi
24908
24909 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
24910 echo "$as_me:$LINENO: result: ${ac_t:-
24911 }$am_cv_proto_iconv" >&5
24912 echo "${ECHO_T}${ac_t:-
24913 }$am_cv_proto_iconv" >&6
24914
24915 cat >>confdefs.h <<_ACEOF
24916 #define ICONV_CONST $am_cv_proto_iconv_arg1
24917 _ACEOF
24918
24919 fi
24920
24921
24922 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
24923 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
24924 if test "${am_cv_langinfo_codeset+set}" = set; then
24925 echo $ECHO_N "(cached) $ECHO_C" >&6
24926 else
24927 cat >conftest.$ac_ext <<_ACEOF
24928 /* confdefs.h. */
24929 _ACEOF
24930 cat confdefs.h >>conftest.$ac_ext
24931 cat >>conftest.$ac_ext <<_ACEOF
24932 /* end confdefs.h. */
24933 #include <langinfo.h>
24934 int
24935 main ()
24936 {
24937 char* cs = nl_langinfo(CODESET);
24938 ;
24939 return 0;
24940 }
24941 _ACEOF
24942 rm -f conftest.$ac_objext conftest$ac_exeext
24943 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24944 (eval $ac_link) 2>conftest.er1
24945 ac_status=$?
24946 grep -v '^ *+' conftest.er1 >conftest.err
24947 rm -f conftest.er1
24948 cat conftest.err >&5
24949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24950 (exit $ac_status); } &&
24951 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24953 (eval $ac_try) 2>&5
24954 ac_status=$?
24955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24956 (exit $ac_status); }; } &&
24957 { ac_try='test -s conftest$ac_exeext'
24958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24959 (eval $ac_try) 2>&5
24960 ac_status=$?
24961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24962 (exit $ac_status); }; }; then
24963 am_cv_langinfo_codeset=yes
24964 else
24965 echo "$as_me: failed program was:" >&5
24966 sed 's/^/| /' conftest.$ac_ext >&5
24967
24968 am_cv_langinfo_codeset=no
24969 fi
24970 rm -f conftest.err conftest.$ac_objext \
24971 conftest$ac_exeext conftest.$ac_ext
24972
24973 fi
24974 echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
24975 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
24976 if test $am_cv_langinfo_codeset = yes; then
24977
24978 cat >>confdefs.h <<\_ACEOF
24979 #define HAVE_LANGINFO_CODESET 1
24980 _ACEOF
24981
24982 fi
24983
24984 if test $ac_cv_header_locale_h = yes; then
24985
24986 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
24987 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
24988 if test "${gt_cv_val_LC_MESSAGES+set}" = set; then
24989 echo $ECHO_N "(cached) $ECHO_C" >&6
24990 else
24991 cat >conftest.$ac_ext <<_ACEOF
24992 /* confdefs.h. */
24993 _ACEOF
24994 cat confdefs.h >>conftest.$ac_ext
24995 cat >>conftest.$ac_ext <<_ACEOF
24996 /* end confdefs.h. */
24997 #include <locale.h>
24998 int
24999 main ()
25000 {
25001 return LC_MESSAGES
25002 ;
25003 return 0;
25004 }
25005 _ACEOF
25006 rm -f conftest.$ac_objext conftest$ac_exeext
25007 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25008 (eval $ac_link) 2>conftest.er1
25009 ac_status=$?
25010 grep -v '^ *+' conftest.er1 >conftest.err
25011 rm -f conftest.er1
25012 cat conftest.err >&5
25013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25014 (exit $ac_status); } &&
25015 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25017 (eval $ac_try) 2>&5
25018 ac_status=$?
25019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25020 (exit $ac_status); }; } &&
25021 { ac_try='test -s conftest$ac_exeext'
25022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25023 (eval $ac_try) 2>&5
25024 ac_status=$?
25025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25026 (exit $ac_status); }; }; then
25027 gt_cv_val_LC_MESSAGES=yes
25028 else
25029 echo "$as_me: failed program was:" >&5
25030 sed 's/^/| /' conftest.$ac_ext >&5
25031
25032 gt_cv_val_LC_MESSAGES=no
25033 fi
25034 rm -f conftest.err conftest.$ac_objext \
25035 conftest$ac_exeext conftest.$ac_ext
25036 fi
25037 echo "$as_me:$LINENO: result: $gt_cv_val_LC_MESSAGES" >&5
25038 echo "${ECHO_T}$gt_cv_val_LC_MESSAGES" >&6
25039 if test $gt_cv_val_LC_MESSAGES = yes; then
25040
25041 cat >>confdefs.h <<\_ACEOF
25042 #define HAVE_LC_MESSAGES 1
25043 _ACEOF
25044
25045 fi
25046
25047 fi
25048
25049 if test -n "$INTL_MACOSX_LIBS"; then
25050 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
25051 fi
25052
25053 for ac_prog in bison
25054 do
25055 # Extract the first word of "$ac_prog", so it can be a program name with args.
25056 set dummy $ac_prog; ac_word=$2
25057 echo "$as_me:$LINENO: checking for $ac_word" >&5
25058 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
25059 if test "${ac_cv_prog_INTLBISON+set}" = set; then
25060 echo $ECHO_N "(cached) $ECHO_C" >&6
25061 else
25062 if test -n "$INTLBISON"; then
25063 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
25064 else
25065 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25066 for as_dir in $PATH
25067 do
25068 IFS=$as_save_IFS
25069 test -z "$as_dir" && as_dir=.
25070 for ac_exec_ext in '' $ac_executable_extensions; do
25071 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25072 ac_cv_prog_INTLBISON="$ac_prog"
25073 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25074 break 2
25075 fi
25076 done
25077 done
25078
25079 fi
25080 fi
25081 INTLBISON=$ac_cv_prog_INTLBISON
25082 if test -n "$INTLBISON"; then
25083 echo "$as_me:$LINENO: result: $INTLBISON" >&5
25084 echo "${ECHO_T}$INTLBISON" >&6
25085 else
25086 echo "$as_me:$LINENO: result: no" >&5
25087 echo "${ECHO_T}no" >&6
25088 fi
25089
25090 test -n "$INTLBISON" && break
25091 done
25092
25093 if test -z "$INTLBISON"; then
25094 ac_verc_fail=yes
25095 else
25096 echo "$as_me:$LINENO: checking version of bison" >&5
25097 echo $ECHO_N "checking version of bison... $ECHO_C" >&6
25098 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
25099 case $ac_prog_version in
25100 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
25101 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
25102 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
25103 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
25104 esac
25105 echo "$as_me:$LINENO: result: $ac_prog_version" >&5
25106 echo "${ECHO_T}$ac_prog_version" >&6
25107 fi
25108 if test $ac_verc_fail = yes; then
25109 INTLBISON=:
25110 fi
25111
25112
25113
25114
25115
25116
25117
25118
25119
25120
25121
25122
25123
25124
25125
25126
25127 echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5
25128 echo $ECHO_N "checking for CFPreferencesCopyAppValue... $ECHO_C" >&6
25129 if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then
25130 echo $ECHO_N "(cached) $ECHO_C" >&6
25131 else
25132 gt_save_CPPFLAGS="$CPPFLAGS"
25133 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
25134 gt_save_LIBS="$LIBS"
25135 LIBS="$LIBS -framework CoreFoundation"
25136 cat >conftest.$ac_ext <<_ACEOF
25137 /* confdefs.h. */
25138 _ACEOF
25139 cat confdefs.h >>conftest.$ac_ext
25140 cat >>conftest.$ac_ext <<_ACEOF
25141 /* end confdefs.h. */
25142 #include <CFPreferences.h>
25143 int
25144 main ()
25145 {
25146 CFPreferencesCopyAppValue(NULL, NULL)
25147 ;
25148 return 0;
25149 }
25150 _ACEOF
25151 rm -f conftest.$ac_objext conftest$ac_exeext
25152 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25153 (eval $ac_link) 2>conftest.er1
25154 ac_status=$?
25155 grep -v '^ *+' conftest.er1 >conftest.err
25156 rm -f conftest.er1
25157 cat conftest.err >&5
25158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25159 (exit $ac_status); } &&
25160 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25162 (eval $ac_try) 2>&5
25163 ac_status=$?
25164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25165 (exit $ac_status); }; } &&
25166 { ac_try='test -s conftest$ac_exeext'
25167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25168 (eval $ac_try) 2>&5
25169 ac_status=$?
25170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25171 (exit $ac_status); }; }; then
25172 gt_cv_func_CFPreferencesCopyAppValue=yes
25173 else
25174 echo "$as_me: failed program was:" >&5
25175 sed 's/^/| /' conftest.$ac_ext >&5
25176
25177 gt_cv_func_CFPreferencesCopyAppValue=no
25178 fi
25179 rm -f conftest.err conftest.$ac_objext \
25180 conftest$ac_exeext conftest.$ac_ext
25181 CPPFLAGS="$gt_save_CPPFLAGS"
25182 LIBS="$gt_save_LIBS"
25183 fi
25184 echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
25185 echo "${ECHO_T}$gt_cv_func_CFPreferencesCopyAppValue" >&6
25186 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
25187
25188 cat >>confdefs.h <<\_ACEOF
25189 #define HAVE_CFPREFERENCESCOPYAPPVALUE 1
25190 _ACEOF
25191
25192 fi
25193 echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5
25194 echo $ECHO_N "checking for CFLocaleCopyCurrent... $ECHO_C" >&6
25195 if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then
25196 echo $ECHO_N "(cached) $ECHO_C" >&6
25197 else
25198 gt_save_CPPFLAGS="$CPPFLAGS"
25199 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
25200 gt_save_LIBS="$LIBS"
25201 LIBS="$LIBS -framework CoreFoundation"
25202 cat >conftest.$ac_ext <<_ACEOF
25203 /* confdefs.h. */
25204 _ACEOF
25205 cat confdefs.h >>conftest.$ac_ext
25206 cat >>conftest.$ac_ext <<_ACEOF
25207 /* end confdefs.h. */
25208 #include <CFLocale.h>
25209 int
25210 main ()
25211 {
25212 CFLocaleCopyCurrent();
25213 ;
25214 return 0;
25215 }
25216 _ACEOF
25217 rm -f conftest.$ac_objext conftest$ac_exeext
25218 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25219 (eval $ac_link) 2>conftest.er1
25220 ac_status=$?
25221 grep -v '^ *+' conftest.er1 >conftest.err
25222 rm -f conftest.er1
25223 cat conftest.err >&5
25224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25225 (exit $ac_status); } &&
25226 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25228 (eval $ac_try) 2>&5
25229 ac_status=$?
25230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25231 (exit $ac_status); }; } &&
25232 { ac_try='test -s conftest$ac_exeext'
25233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25234 (eval $ac_try) 2>&5
25235 ac_status=$?
25236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25237 (exit $ac_status); }; }; then
25238 gt_cv_func_CFLocaleCopyCurrent=yes
25239 else
25240 echo "$as_me: failed program was:" >&5
25241 sed 's/^/| /' conftest.$ac_ext >&5
25242
25243 gt_cv_func_CFLocaleCopyCurrent=no
25244 fi
25245 rm -f conftest.err conftest.$ac_objext \
25246 conftest$ac_exeext conftest.$ac_ext
25247 CPPFLAGS="$gt_save_CPPFLAGS"
25248 LIBS="$gt_save_LIBS"
25249 fi
25250 echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
25251 echo "${ECHO_T}$gt_cv_func_CFLocaleCopyCurrent" >&6
25252 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
25253
25254 cat >>confdefs.h <<\_ACEOF
25255 #define HAVE_CFLOCALECOPYCURRENT 1
25256 _ACEOF
25257
25258 fi
25259 INTL_MACOSX_LIBS=
25260 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
25261 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
25262 fi
25263
25264
25265
25266
25267 echo "$as_me:$LINENO: checking whether NLS is requested" >&5
25268 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
25269 # Check whether --enable-nls or --disable-nls was given.
25270 if test "${enable_nls+set}" = set; then
25271 enableval="$enable_nls"
25272 USE_NLS=$enableval
25273 else
25274 USE_NLS=yes
25275 fi;
25276 echo "$as_me:$LINENO: result: $USE_NLS" >&5
25277 echo "${ECHO_T}$USE_NLS" >&6
25278
25279
25280
25281
25282 BUILD_INCLUDED_LIBINTL=no
25283 USE_INCLUDED_LIBINTL=no
25284
25285 LIBINTL=
25286 LTLIBINTL=
25287 POSUB=
25288
25289 if test "$USE_NLS" = "yes"; then
25290 gt_use_preinstalled_gnugettext=no
25291
25292 echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
25293 echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
25294
25295 # Check whether --with-included-gettext or --without-included-gettext was given.
25296 if test "${with_included_gettext+set}" = set; then
25297 withval="$with_included_gettext"
25298 nls_cv_force_use_gnu_gettext=$withval
25299 else
25300 nls_cv_force_use_gnu_gettext=no
25301 fi;
25302 echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
25303 echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
25304
25305 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
25306 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
25307
25308
25309
25310
25311
25312
25313 echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5
25314 echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6
25315 if test "${gt_cv_func_gnugettext1_libc+set}" = set; then
25316 echo $ECHO_N "(cached) $ECHO_C" >&6
25317 else
25318 cat >conftest.$ac_ext <<_ACEOF
25319 /* confdefs.h. */
25320 _ACEOF
25321 cat confdefs.h >>conftest.$ac_ext
25322 cat >>conftest.$ac_ext <<_ACEOF
25323 /* end confdefs.h. */
25324 #include <libintl.h>
25325 extern int _nl_msg_cat_cntr;
25326 extern int *_nl_domain_bindings;
25327 int
25328 main ()
25329 {
25330 bindtextdomain ("", "");
25331 return * gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings
25332 ;
25333 return 0;
25334 }
25335 _ACEOF
25336 rm -f conftest.$ac_objext conftest$ac_exeext
25337 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25338 (eval $ac_link) 2>conftest.er1
25339 ac_status=$?
25340 grep -v '^ *+' conftest.er1 >conftest.err
25341 rm -f conftest.er1
25342 cat conftest.err >&5
25343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25344 (exit $ac_status); } &&
25345 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25347 (eval $ac_try) 2>&5
25348 ac_status=$?
25349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25350 (exit $ac_status); }; } &&
25351 { ac_try='test -s conftest$ac_exeext'
25352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25353 (eval $ac_try) 2>&5
25354 ac_status=$?
25355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25356 (exit $ac_status); }; }; then
25357 gt_cv_func_gnugettext1_libc=yes
25358 else
25359 echo "$as_me: failed program was:" >&5
25360 sed 's/^/| /' conftest.$ac_ext >&5
25361
25362 gt_cv_func_gnugettext1_libc=no
25363 fi
25364 rm -f conftest.err conftest.$ac_objext \
25365 conftest$ac_exeext conftest.$ac_ext
25366 fi
25367 echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libc" >&5
25368 echo "${ECHO_T}$gt_cv_func_gnugettext1_libc" >&6
25369
25370 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
25371
25372
25373
25374 use_additional=yes
25375
25376 acl_save_prefix="$prefix"
25377 prefix="$acl_final_prefix"
25378 acl_save_exec_prefix="$exec_prefix"
25379 exec_prefix="$acl_final_exec_prefix"
25380
25381 eval additional_includedir=\"$includedir\"
25382 eval additional_libdir=\"$libdir\"
25383
25384 exec_prefix="$acl_save_exec_prefix"
25385 prefix="$acl_save_prefix"
25386
25387
25388 # Check whether --with-libintl-prefix or --without-libintl-prefix was given.
25389 if test "${with_libintl_prefix+set}" = set; then
25390 withval="$with_libintl_prefix"
25391
25392 if test "X$withval" = "Xno"; then
25393 use_additional=no
25394 else
25395 if test "X$withval" = "X"; then
25396
25397 acl_save_prefix="$prefix"
25398 prefix="$acl_final_prefix"
25399 acl_save_exec_prefix="$exec_prefix"
25400 exec_prefix="$acl_final_exec_prefix"
25401
25402 eval additional_includedir=\"$includedir\"
25403 eval additional_libdir=\"$libdir\"
25404
25405 exec_prefix="$acl_save_exec_prefix"
25406 prefix="$acl_save_prefix"
25407
25408 else
25409 additional_includedir="$withval/include"
25410 additional_libdir="$withval/lib"
25411 fi
25412 fi
25413
25414 fi;
25415 LIBINTL=
25416 LTLIBINTL=
25417 INCINTL=
25418 rpathdirs=
25419 ltrpathdirs=
25420 names_already_handled=
25421 names_next_round='intl '
25422 while test -n "$names_next_round"; do
25423 names_this_round="$names_next_round"
25424 names_next_round=
25425 for name in $names_this_round; do
25426 already_handled=
25427 for n in $names_already_handled; do
25428 if test "$n" = "$name"; then
25429 already_handled=yes
25430 break
25431 fi
25432 done
25433 if test -z "$already_handled"; then
25434 names_already_handled="$names_already_handled $name"
25435 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
25436 eval value=\"\$HAVE_LIB$uppername\"
25437 if test -n "$value"; then
25438 if test "$value" = yes; then
25439 eval value=\"\$LIB$uppername\"
25440 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
25441 eval value=\"\$LTLIB$uppername\"
25442 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
25443 else
25444 :
25445 fi
25446 else
25447 found_dir=
25448 found_la=
25449 found_so=
25450 found_a=
25451 if test $use_additional = yes; then
25452 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
25453 found_dir="$additional_libdir"
25454 found_so="$additional_libdir/lib$name.$shlibext"
25455 if test -f "$additional_libdir/lib$name.la"; then
25456 found_la="$additional_libdir/lib$name.la"
25457 fi
25458 else
25459 if test -f "$additional_libdir/lib$name.$libext"; then
25460 found_dir="$additional_libdir"
25461 found_a="$additional_libdir/lib$name.$libext"
25462 if test -f "$additional_libdir/lib$name.la"; then
25463 found_la="$additional_libdir/lib$name.la"
25464 fi
25465 fi
25466 fi
25467 fi
25468 if test "X$found_dir" = "X"; then
25469 for x in $LDFLAGS $LTLIBINTL; do
25470
25471 acl_save_prefix="$prefix"
25472 prefix="$acl_final_prefix"
25473 acl_save_exec_prefix="$exec_prefix"
25474 exec_prefix="$acl_final_exec_prefix"
25475 eval x=\"$x\"
25476 exec_prefix="$acl_save_exec_prefix"
25477 prefix="$acl_save_prefix"
25478
25479 case "$x" in
25480 -L*)
25481 dir=`echo "X$x" | sed -e 's/^X-L//'`
25482 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
25483 found_dir="$dir"
25484 found_so="$dir/lib$name.$shlibext"
25485 if test -f "$dir/lib$name.la"; then
25486 found_la="$dir/lib$name.la"
25487 fi
25488 else
25489 if test -f "$dir/lib$name.$libext"; then
25490 found_dir="$dir"
25491 found_a="$dir/lib$name.$libext"
25492 if test -f "$dir/lib$name.la"; then
25493 found_la="$dir/lib$name.la"
25494 fi
25495 fi
25496 fi
25497 ;;
25498 esac
25499 if test "X$found_dir" != "X"; then
25500 break
25501 fi
25502 done
25503 fi
25504 if test "X$found_dir" != "X"; then
25505 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
25506 if test "X$found_so" != "X"; then
25507 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
25508 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
25509 else
25510 haveit=
25511 for x in $ltrpathdirs; do
25512 if test "X$x" = "X$found_dir"; then
25513 haveit=yes
25514 break
25515 fi
25516 done
25517 if test -z "$haveit"; then
25518 ltrpathdirs="$ltrpathdirs $found_dir"
25519 fi
25520 if test "$hardcode_direct" = yes; then
25521 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
25522 else
25523 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
25524 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
25525 haveit=
25526 for x in $rpathdirs; do
25527 if test "X$x" = "X$found_dir"; then
25528 haveit=yes
25529 break
25530 fi
25531 done
25532 if test -z "$haveit"; then
25533 rpathdirs="$rpathdirs $found_dir"
25534 fi
25535 else
25536 haveit=
25537 for x in $LDFLAGS $LIBINTL; do
25538
25539 acl_save_prefix="$prefix"
25540 prefix="$acl_final_prefix"
25541 acl_save_exec_prefix="$exec_prefix"
25542 exec_prefix="$acl_final_exec_prefix"
25543 eval x=\"$x\"
25544 exec_prefix="$acl_save_exec_prefix"
25545 prefix="$acl_save_prefix"
25546
25547 if test "X$x" = "X-L$found_dir"; then
25548 haveit=yes
25549 break
25550 fi
25551 done
25552 if test -z "$haveit"; then
25553 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
25554 fi
25555 if test "$hardcode_minus_L" != no; then
25556 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
25557 else
25558 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
25559 fi
25560 fi
25561 fi
25562 fi
25563 else
25564 if test "X$found_a" != "X"; then
25565 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
25566 else
25567 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
25568 fi
25569 fi
25570 additional_includedir=
25571 case "$found_dir" in
25572 */lib | */lib/)
25573 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
25574 additional_includedir="$basedir/include"
25575 ;;
25576 esac
25577 if test "X$additional_includedir" != "X"; then
25578 if test "X$additional_includedir" != "X/usr/include"; then
25579 haveit=
25580 if test "X$additional_includedir" = "X/usr/local/include"; then
25581 if test -n "$GCC"; then
25582 case $host_os in
25583 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
25584 esac
25585 fi
25586 fi
25587 if test -z "$haveit"; then
25588 for x in $CPPFLAGS $INCINTL; do
25589
25590 acl_save_prefix="$prefix"
25591 prefix="$acl_final_prefix"
25592 acl_save_exec_prefix="$exec_prefix"
25593 exec_prefix="$acl_final_exec_prefix"
25594 eval x=\"$x\"
25595 exec_prefix="$acl_save_exec_prefix"
25596 prefix="$acl_save_prefix"
25597
25598 if test "X$x" = "X-I$additional_includedir"; then
25599 haveit=yes
25600 break
25601 fi
25602 done
25603 if test -z "$haveit"; then
25604 if test -d "$additional_includedir"; then
25605 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
25606 fi
25607 fi
25608 fi
25609 fi
25610 fi
25611 if test -n "$found_la"; then
25612 save_libdir="$libdir"
25613 case "$found_la" in
25614 */* | *\\*) . "$found_la" ;;
25615 *) . "./$found_la" ;;
25616 esac
25617 libdir="$save_libdir"
25618 for dep in $dependency_libs; do
25619 case "$dep" in
25620 -L*)
25621 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
25622 if test "X$additional_libdir" != "X/usr/lib"; then
25623 haveit=
25624 if test "X$additional_libdir" = "X/usr/local/lib"; then
25625 if test -n "$GCC"; then
25626 case $host_os in
25627 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
25628 esac
25629 fi
25630 fi
25631 if test -z "$haveit"; then
25632 haveit=
25633 for x in $LDFLAGS $LIBINTL; do
25634
25635 acl_save_prefix="$prefix"
25636 prefix="$acl_final_prefix"
25637 acl_save_exec_prefix="$exec_prefix"
25638 exec_prefix="$acl_final_exec_prefix"
25639 eval x=\"$x\"
25640 exec_prefix="$acl_save_exec_prefix"
25641 prefix="$acl_save_prefix"
25642
25643 if test "X$x" = "X-L$additional_libdir"; then
25644 haveit=yes
25645 break
25646 fi
25647 done
25648 if test -z "$haveit"; then
25649 if test -d "$additional_libdir"; then
25650 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
25651 fi
25652 fi
25653 haveit=
25654 for x in $LDFLAGS $LTLIBINTL; do
25655
25656 acl_save_prefix="$prefix"
25657 prefix="$acl_final_prefix"
25658 acl_save_exec_prefix="$exec_prefix"
25659 exec_prefix="$acl_final_exec_prefix"
25660 eval x=\"$x\"
25661 exec_prefix="$acl_save_exec_prefix"
25662 prefix="$acl_save_prefix"
25663
25664 if test "X$x" = "X-L$additional_libdir"; then
25665 haveit=yes
25666 break
25667 fi
25668 done
25669 if test -z "$haveit"; then
25670 if test -d "$additional_libdir"; then
25671 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
25672 fi
25673 fi
25674 fi
25675 fi
25676 ;;
25677 -R*)
25678 dir=`echo "X$dep" | sed -e 's/^X-R//'`
25679 if test "$enable_rpath" != no; then
25680 haveit=
25681 for x in $rpathdirs; do
25682 if test "X$x" = "X$dir"; then
25683 haveit=yes
25684 break
25685 fi
25686 done
25687 if test -z "$haveit"; then
25688 rpathdirs="$rpathdirs $dir"
25689 fi
25690 haveit=
25691 for x in $ltrpathdirs; do
25692 if test "X$x" = "X$dir"; then
25693 haveit=yes
25694 break
25695 fi
25696 done
25697 if test -z "$haveit"; then
25698 ltrpathdirs="$ltrpathdirs $dir"
25699 fi
25700 fi
25701 ;;
25702 -l*)
25703 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
25704 ;;
25705 *.la)
25706 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
25707 ;;
25708 *)
25709 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
25710 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
25711 ;;
25712 esac
25713 done
25714 fi
25715 else
25716 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
25717 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
25718 fi
25719 fi
25720 fi
25721 done
25722 done
25723 if test "X$rpathdirs" != "X"; then
25724 if test -n "$hardcode_libdir_separator"; then
25725 alldirs=
25726 for found_dir in $rpathdirs; do
25727 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
25728 done
25729 acl_save_libdir="$libdir"
25730 libdir="$alldirs"
25731 eval flag=\"$hardcode_libdir_flag_spec\"
25732 libdir="$acl_save_libdir"
25733 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
25734 else
25735 for found_dir in $rpathdirs; do
25736 acl_save_libdir="$libdir"
25737 libdir="$found_dir"
25738 eval flag=\"$hardcode_libdir_flag_spec\"
25739 libdir="$acl_save_libdir"
25740 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
25741 done
25742 fi
25743 fi
25744 if test "X$ltrpathdirs" != "X"; then
25745 for found_dir in $ltrpathdirs; do
25746 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
25747 done
25748 fi
25749
25750 echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5
25751 echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6
25752 if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then
25753 echo $ECHO_N "(cached) $ECHO_C" >&6
25754 else
25755 gt_save_CPPFLAGS="$CPPFLAGS"
25756 CPPFLAGS="$CPPFLAGS $INCINTL"
25757 gt_save_LIBS="$LIBS"
25758 LIBS="$LIBS $LIBINTL"
25759 cat >conftest.$ac_ext <<_ACEOF
25760 /* confdefs.h. */
25761 _ACEOF
25762 cat confdefs.h >>conftest.$ac_ext
25763 cat >>conftest.$ac_ext <<_ACEOF
25764 /* end confdefs.h. */
25765 #include <libintl.h>
25766 extern int _nl_msg_cat_cntr;
25767 extern
25768 #ifdef __cplusplus
25769 "C"
25770 #endif
25771 const char *_nl_expand_alias (const char *);
25772 int
25773 main ()
25774 {
25775 bindtextdomain ("", "");
25776 return * gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias ("")
25777 ;
25778 return 0;
25779 }
25780 _ACEOF
25781 rm -f conftest.$ac_objext conftest$ac_exeext
25782 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25783 (eval $ac_link) 2>conftest.er1
25784 ac_status=$?
25785 grep -v '^ *+' conftest.er1 >conftest.err
25786 rm -f conftest.er1
25787 cat conftest.err >&5
25788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25789 (exit $ac_status); } &&
25790 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25792 (eval $ac_try) 2>&5
25793 ac_status=$?
25794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25795 (exit $ac_status); }; } &&
25796 { ac_try='test -s conftest$ac_exeext'
25797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25798 (eval $ac_try) 2>&5
25799 ac_status=$?
25800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25801 (exit $ac_status); }; }; then
25802 gt_cv_func_gnugettext1_libintl=yes
25803 else
25804 echo "$as_me: failed program was:" >&5
25805 sed 's/^/| /' conftest.$ac_ext >&5
25806
25807 gt_cv_func_gnugettext1_libintl=no
25808 fi
25809 rm -f conftest.err conftest.$ac_objext \
25810 conftest$ac_exeext conftest.$ac_ext
25811 if test "$gt_cv_func_gnugettext1_libintl" != yes && test -n "$LIBICONV"; then
25812 LIBS="$LIBS $LIBICONV"
25813 cat >conftest.$ac_ext <<_ACEOF
25814 /* confdefs.h. */
25815 _ACEOF
25816 cat confdefs.h >>conftest.$ac_ext
25817 cat >>conftest.$ac_ext <<_ACEOF
25818 /* end confdefs.h. */
25819 #include <libintl.h>
25820 extern int _nl_msg_cat_cntr;
25821 extern
25822 #ifdef __cplusplus
25823 "C"
25824 #endif
25825 const char *_nl_expand_alias (const char *);
25826 int
25827 main ()
25828 {
25829 bindtextdomain ("", "");
25830 return * gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias ("")
25831 ;
25832 return 0;
25833 }
25834 _ACEOF
25835 rm -f conftest.$ac_objext conftest$ac_exeext
25836 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25837 (eval $ac_link) 2>conftest.er1
25838 ac_status=$?
25839 grep -v '^ *+' conftest.er1 >conftest.err
25840 rm -f conftest.er1
25841 cat conftest.err >&5
25842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25843 (exit $ac_status); } &&
25844 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25846 (eval $ac_try) 2>&5
25847 ac_status=$?
25848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25849 (exit $ac_status); }; } &&
25850 { ac_try='test -s conftest$ac_exeext'
25851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25852 (eval $ac_try) 2>&5
25853 ac_status=$?
25854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25855 (exit $ac_status); }; }; then
25856 LIBINTL="$LIBINTL $LIBICONV"
25857 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
25858 gt_cv_func_gnugettext1_libintl=yes
25859
25860 else
25861 echo "$as_me: failed program was:" >&5
25862 sed 's/^/| /' conftest.$ac_ext >&5
25863
25864 fi
25865 rm -f conftest.err conftest.$ac_objext \
25866 conftest$ac_exeext conftest.$ac_ext
25867 fi
25868 CPPFLAGS="$gt_save_CPPFLAGS"
25869 LIBS="$gt_save_LIBS"
25870 fi
25871 echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libintl" >&5
25872 echo "${ECHO_T}$gt_cv_func_gnugettext1_libintl" >&6
25873 fi
25874
25875 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
25876 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
25877 && test "$PACKAGE" != gettext-runtime \
25878 && test "$PACKAGE" != gettext-tools; }; then
25879 gt_use_preinstalled_gnugettext=yes
25880 else
25881 LIBINTL=
25882 LTLIBINTL=
25883 INCINTL=
25884 fi
25885
25886
25887 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
25888 nls_cv_use_gnu_gettext=yes
25889 fi
25890 fi
25891
25892 if test "$nls_cv_use_gnu_gettext" = "yes"; then
25893 BUILD_INCLUDED_LIBINTL=yes
25894 USE_INCLUDED_LIBINTL=yes
25895 LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV"
25896 LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV"
25897 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
25898 fi
25899
25900 CATOBJEXT=
25901 if test "$gt_use_preinstalled_gnugettext" = "yes" \
25902 || test "$nls_cv_use_gnu_gettext" = "yes"; then
25903 CATOBJEXT=.gmo
25904 fi
25905
25906
25907 if test -n "$INTL_MACOSX_LIBS"; then
25908 if test "$gt_use_preinstalled_gnugettext" = "yes" \
25909 || test "$nls_cv_use_gnu_gettext" = "yes"; then
25910 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
25911 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
25912 fi
25913 fi
25914
25915 if test "$gt_use_preinstalled_gnugettext" = "yes" \
25916 || test "$nls_cv_use_gnu_gettext" = "yes"; then
25917
25918 cat >>confdefs.h <<\_ACEOF
25919 #define ENABLE_NLS 1
25920 _ACEOF
25921
25922 else
25923 USE_NLS=no
25924 fi
25925 fi
25926
25927 echo "$as_me:$LINENO: checking whether to use NLS" >&5
25928 echo $ECHO_N "checking whether to use NLS... $ECHO_C" >&6
25929 echo "$as_me:$LINENO: result: $USE_NLS" >&5
25930 echo "${ECHO_T}$USE_NLS" >&6
25931 if test "$USE_NLS" = "yes"; then
25932 echo "$as_me:$LINENO: checking where the gettext function comes from" >&5
25933 echo $ECHO_N "checking where the gettext function comes from... $ECHO_C" >&6
25934 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
25935 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
25936 gt_source="external libintl"
25937 else
25938 gt_source="libc"
25939 fi
25940 else
25941 gt_source="included intl directory"
25942 fi
25943 echo "$as_me:$LINENO: result: $gt_source" >&5
25944 echo "${ECHO_T}$gt_source" >&6
25945 fi
25946
25947 if test "$USE_NLS" = "yes"; then
25948
25949 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
25950 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
25951 echo "$as_me:$LINENO: checking how to link with libintl" >&5
25952 echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6
25953 echo "$as_me:$LINENO: result: $LIBINTL" >&5
25954 echo "${ECHO_T}$LIBINTL" >&6
25955
25956 for element in $INCINTL; do
25957 haveit=
25958 for x in $CPPFLAGS; do
25959
25960 acl_save_prefix="$prefix"
25961 prefix="$acl_final_prefix"
25962 acl_save_exec_prefix="$exec_prefix"
25963 exec_prefix="$acl_final_exec_prefix"
25964 eval x=\"$x\"
25965 exec_prefix="$acl_save_exec_prefix"
25966 prefix="$acl_save_prefix"
25967
25968 if test "X$x" = "X$element"; then
25969 haveit=yes
25970 break
25971 fi
25972 done
25973 if test -z "$haveit"; then
25974 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
25975 fi
25976 done
25977
25978 fi
25979
25980
25981 cat >>confdefs.h <<\_ACEOF
25982 #define HAVE_GETTEXT 1
25983 _ACEOF
25984
25985
25986 cat >>confdefs.h <<\_ACEOF
25987 #define HAVE_DCGETTEXT 1
25988 _ACEOF
25989
25990 fi
25991
25992 POSUB=po
25993 fi
25994
25995
25996 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
25997 BUILD_INCLUDED_LIBINTL=yes
25998 fi
25999
26000
26001
26002
26003
26004 nls_cv_header_intl=
26005 nls_cv_header_libgt=
26006
26007 DATADIRNAME=share
26008
26009
26010 INSTOBJEXT=.mo
26011
26012
26013 GENCAT=gencat
26014
26015
26016 INTLOBJS=
26017 if test "$USE_INCLUDED_LIBINTL" = yes; then
26018 INTLOBJS="\$(GETTOBJS)"
26019 fi
26020
26021
26022 INTL_LIBTOOL_SUFFIX_PREFIX=
26023
26024
26025
26026 INTLLIBS="$LIBINTL"
26027
26028
26029
26030
26031
26032
26033
26034
26035 if test "x${prefix}" = "xNONE"; then
26036 cat >>confdefs.h <<_ACEOF
26037 #define PACKAGE_LOCALE_DIR "${ac_default_prefix}/${DATADIRNAME}/locale"
26038 _ACEOF
26039
26040 else
26041 cat >>confdefs.h <<_ACEOF
26042 #define PACKAGE_LOCALE_DIR "${prefix}/${DATADIRNAME}/locale"
26043 _ACEOF
26044
26045 fi
26046
26047
26048 build_examples=no
26049
26050 # Check whether --enable-examples or --disable-examples was given.
26051 if test "${enable_examples+set}" = set; then
26052 enableval="$enable_examples"
26053 build_examples="$enableval"
26054 else
26055 build_examples=no
26056 fi;
26057
26058
26059
26060 if test "x$build_examples" = "xyes"; then
26061 WITH_EXAMPLES_TRUE=
26062 WITH_EXAMPLES_FALSE='#'
26063 else
26064 WITH_EXAMPLES_TRUE='#'
26065 WITH_EXAMPLES_FALSE=
26066 fi
26067
26068
26069 build_hcal=yes
26070
26071 # Check whether --enable-hcal or --disable-hcal was given.
26072 if test "${enable_hcal+set}" = set; then
26073 enableval="$enable_hcal"
26074 build_hcal="$enableval"
26075 else
26076 build_hcal=yes
26077 fi;
26078
26079
26080
26081 if test "x$build_hcal" = "xyes"; then
26082 WITH_HCAL_TRUE=
26083 WITH_HCAL_FALSE='#'
26084 else
26085 WITH_HCAL_TRUE='#'
26086 WITH_HCAL_FALSE=
26087 fi
26088
26089
26090
26091
26092
26093
26094 ac_config_files="$ac_config_files Makefile libhdate.spec libhdate.pc intl/Makefile po/Makefile.in src/Makefile examples/Makefile examples/hcal/Makefile examples/ical/Makefile examples/html/Makefile examples/hebcal/Makefile examples/bindings/Makefile bindings/Makefile bindings/python/Makefile bindings/perl/Makefile bindings/pascal/Makefile"
26095 cat >confcache <<\_ACEOF
26096 # This file is a shell script that caches the results of configure
26097 # tests run on this system so they can be shared between configure
26098 # scripts and configure runs, see configure's option --config-cache.
26099 # It is not useful on other systems. If it contains results you don't
26100 # want to keep, you may remove or edit it.
26101 #
26102 # config.status only pays attention to the cache file if you give it
26103 # the --recheck option to rerun configure.
26104 #
26105 # `ac_cv_env_foo' variables (set or unset) will be overridden when
26106 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26107 # following values.
26108
26109 _ACEOF
26110
26111 # The following way of writing the cache mishandles newlines in values,
26112 # but we know of no workaround that is simple, portable, and efficient.
26113 # So, don't put newlines in cache variables' values.
26114 # Ultrix sh set writes to stderr and can't be redirected directly,
26115 # and sets the high bit in the cache file unless we assign to the vars.
26116 {
26117 (set) 2>&1 |
26118 case `(ac_space=' '; set | grep ac_space) 2>&1` in
26119 *ac_space=\ *)
26120 # `set' does not quote correctly, so add quotes (double-quote
26121 # substitution turns \\\\ into \\, and sed turns \\ into \).
26122 sed -n \
26123 "s/'/'\\\\''/g;
26124 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26125 ;;
26126 *)
26127 # `set' quotes correctly as required by POSIX, so do not add quotes.
26128 sed -n \
26129 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26130 ;;
26131 esac;
26132 } |
26133 sed '
26134 t clear
26135 : clear
26136 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26137 t end
26138 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26139 : end' >>confcache
26140 if diff $cache_file confcache >/dev/null 2>&1; then :; else
26141 if test -w $cache_file; then
26142 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26143 cat confcache >$cache_file
26144 else
26145 echo "not updating unwritable cache $cache_file"
26146 fi
26147 fi
26148 rm -f confcache
26149
26150 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26151 # Let make expand exec_prefix.
26152 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26153
26154 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26155 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26156 # trailing colons and then remove the whole line if VPATH becomes empty
26157 # (actually we leave an empty line to preserve line numbers).
26158 if test "x$srcdir" = x.; then
26159 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26160 s/:*\$(srcdir):*/:/;
26161 s/:*\${srcdir}:*/:/;
26162 s/:*@srcdir@:*/:/;
26163 s/^\([^=]*=[ ]*\):*/\1/;
26164 s/:*$//;
26165 s/^[^=]*=[ ]*$//;
26166 }'
26167 fi
26168
26169 # Transform confdefs.h into DEFS.
26170 # Protect against shell expansion while executing Makefile rules.
26171 # Protect against Makefile macro expansion.
26172 #
26173 # If the first sed substitution is executed (which looks for macros that
26174 # take arguments), then we branch to the quote section. Otherwise,
26175 # look for a macro that doesn't take arguments.
26176 cat >confdef2opt.sed <<\_ACEOF
26177 t clear
26178 : clear
26179 s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
26180 t quote
26181 s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
26182 t quote
26183 d
26184 : quote
26185 s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
26186 s,\[,\\&,g
26187 s,\],\\&,g
26188 s,\$,$$,g
26189 p
26190 _ACEOF
26191 # We use echo to avoid assuming a particular line-breaking character.
26192 # The extra dot is to prevent the shell from consuming trailing
26193 # line-breaks from the sub-command output. A line-break within
26194 # single-quotes doesn't work because, if this script is created in a
26195 # platform that uses two characters for line-breaks (e.g., DOS), tr
26196 # would break.
26197 ac_LF_and_DOT=`echo; echo .`
26198 DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
26199 rm -f confdef2opt.sed
26200
26201
26202 ac_libobjs=
26203 ac_ltlibobjs=
26204 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26205 # 1. Remove the extension, and $U if already installed.
26206 ac_i=`echo "$ac_i" |
26207 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
26208 # 2. Add them.
26209 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
26210 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
26211 done
26212 LIBOBJS=$ac_libobjs
26213
26214 LTLIBOBJS=$ac_ltlibobjs
26215
26216
26217
26218 : ${CONFIG_STATUS=./config.status}
26219 ac_clean_files_save=$ac_clean_files
26220 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26221 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26222 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26223 cat >$CONFIG_STATUS <<_ACEOF
26224 #! $SHELL
26225 # Generated by $as_me.
26226 # Run this file to recreate the current configuration.
26227 # Compiler output produced by configure, useful for debugging
26228 # configure, is in config.log if it exists.
26229
26230 debug=false
26231 ac_cs_recheck=false
26232 ac_cs_silent=false
26233 SHELL=\${CONFIG_SHELL-$SHELL}
26234 _ACEOF
26235
26236 cat >>$CONFIG_STATUS <<\_ACEOF
26237 ## --------------------- ##
26238 ## M4sh Initialization. ##
26239 ## --------------------- ##
26240
26241 # Be Bourne compatible
26242 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26243 emulate sh
26244 NULLCMD=:
26245 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
26246 # is contrary to our usage. Disable this feature.
26247 alias -g '${1+"$@"}'='"$@"'
26248 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26249 set -o posix
26250 fi
26251 DUALCASE=1; export DUALCASE # for MKS sh
26252
26253 # Support unset when possible.
26254 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26255 as_unset=unset
26256 else
26257 as_unset=false
26258 fi
26259
26260
26261 # Work around bugs in pre-3.0 UWIN ksh.
26262 $as_unset ENV MAIL MAILPATH
26263 PS1='$ '
26264 PS2='> '
26265 PS4='+ '
26266
26267 # NLS nuisances.
26268 for as_var in \
26269 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26270 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26271 LC_TELEPHONE LC_TIME
26272 do
26273 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26274 eval $as_var=C; export $as_var
26275 else
26276 $as_unset $as_var
26277 fi
26278 done
26279
26280 # Required to use basename.
26281 if expr a : '\(a\)' >/dev/null 2>&1; then
26282 as_expr=expr
26283 else
26284 as_expr=false
26285 fi
26286
26287 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
26288 as_basename=basename
26289 else
26290 as_basename=false
26291 fi
26292
26293
26294 # Name of the executable.
26295 as_me=`$as_basename "$0" ||
26296 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26297 X"$0" : 'X\(//\)$' \| \
26298 X"$0" : 'X\(/\)$' \| \
26299 . : '\(.\)' 2>/dev/null ||
26300 echo X/"$0" |
26301 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
26302 /^X\/\(\/\/\)$/{ s//\1/; q; }
26303 /^X\/\(\/\).*/{ s//\1/; q; }
26304 s/.*/./; q'`
26305
26306
26307 # PATH needs CR, and LINENO needs CR and PATH.
26308 # Avoid depending upon Character Ranges.
26309 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26310 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26311 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26312 as_cr_digits='0123456789'
26313 as_cr_alnum=$as_cr_Letters$as_cr_digits
26314
26315 # The user is always right.
26316 if test "${PATH_SEPARATOR+set}" != set; then
26317 echo "#! /bin/sh" >conf$$.sh
26318 echo "exit 0" >>conf$$.sh
26319 chmod +x conf$$.sh
26320 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26321 PATH_SEPARATOR=';'
26322 else
26323 PATH_SEPARATOR=:
26324 fi
26325 rm -f conf$$.sh
26326 fi
26327
26328
26329 as_lineno_1=$LINENO
26330 as_lineno_2=$LINENO
26331 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
26332 test "x$as_lineno_1" != "x$as_lineno_2" &&
26333 test "x$as_lineno_3" = "x$as_lineno_2" || {
26334 # Find who we are. Look in the path if we contain no path at all
26335 # relative or not.
26336 case $0 in
26337 *[\\/]* ) as_myself=$0 ;;
26338 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26339 for as_dir in $PATH
26340 do
26341 IFS=$as_save_IFS
26342 test -z "$as_dir" && as_dir=.
26343 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26344 done
26345
26346 ;;
26347 esac
26348 # We did not find ourselves, most probably we were run as `sh COMMAND'
26349 # in which case we are not to be found in the path.
26350 if test "x$as_myself" = x; then
26351 as_myself=$0
26352 fi
26353 if test ! -f "$as_myself"; then
26354 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
26355 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
26356 { (exit 1); exit 1; }; }
26357 fi
26358 case $CONFIG_SHELL in
26359 '')
26360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26361 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
26362 do
26363 IFS=$as_save_IFS
26364 test -z "$as_dir" && as_dir=.
26365 for as_base in sh bash ksh sh5; do
26366 case $as_dir in
26367 /*)
26368 if ("$as_dir/$as_base" -c '
26369 as_lineno_1=$LINENO
26370 as_lineno_2=$LINENO
26371 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
26372 test "x$as_lineno_1" != "x$as_lineno_2" &&
26373 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
26374 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
26375 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
26376 CONFIG_SHELL=$as_dir/$as_base
26377 export CONFIG_SHELL
26378 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
26379 fi;;
26380 esac
26381 done
26382 done
26383 ;;
26384 esac
26385
26386 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26387 # uniformly replaced by the line number. The first 'sed' inserts a
26388 # line-number line before each line; the second 'sed' does the real
26389 # work. The second script uses 'N' to pair each line-number line
26390 # with the numbered line, and appends trailing '-' during
26391 # substitution so that $LINENO is not a special case at line end.
26392 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
26393 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
26394 sed '=' <$as_myself |
26395 sed '
26396 N
26397 s,$,-,
26398 : loop
26399 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
26400 t loop
26401 s,-$,,
26402 s,^['$as_cr_digits']*\n,,
26403 ' >$as_me.lineno &&
26404 chmod +x $as_me.lineno ||
26405 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
26406 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
26407 { (exit 1); exit 1; }; }
26408
26409 # Don't try to exec as it changes $[0], causing all sort of problems
26410 # (the dirname of $[0] is not the place where we might find the
26411 # original and so on. Autoconf is especially sensible to this).
26412 . ./$as_me.lineno
26413 # Exit status is that of the last command.
26414 exit
26415 }
26416
26417
26418 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
26419 *c*,-n*) ECHO_N= ECHO_C='
26420 ' ECHO_T=' ' ;;
26421 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
26422 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
26423 esac
26424
26425 if expr a : '\(a\)' >/dev/null 2>&1; then
26426 as_expr=expr
26427 else
26428 as_expr=false
26429 fi
26430
26431 rm -f conf$$ conf$$.exe conf$$.file
26432 echo >conf$$.file
26433 if ln -s conf$$.file conf$$ 2>/dev/null; then
26434 # We could just check for DJGPP; but this test a) works b) is more generic
26435 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26436 if test -f conf$$.exe; then
26437 # Don't use ln at all; we don't have any links
26438 as_ln_s='cp -p'
26439 else
26440 as_ln_s='ln -s'
26441 fi
26442 elif ln conf$$.file conf$$ 2>/dev/null; then
26443 as_ln_s=ln
26444 else
26445 as_ln_s='cp -p'
26446 fi
26447 rm -f conf$$ conf$$.exe conf$$.file
26448
26449 if mkdir -p . 2>/dev/null; then
26450 as_mkdir_p=:
26451 else
26452 test -d ./-p && rmdir ./-p
26453 as_mkdir_p=false
26454 fi
26455
26456 as_executable_p="test -f"
26457
26458 # Sed expression to map a string onto a valid CPP name.
26459 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
26460
26461 # Sed expression to map a string onto a valid variable name.
26462 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
26463
26464
26465 # IFS
26466 # We need space, tab and new line, in precisely that order.
26467 as_nl='
26468 '
26469 IFS=" $as_nl"
26470
26471 # CDPATH.
26472 $as_unset CDPATH
26473
26474 exec 6>&1
26475
26476 # Open the log real soon, to keep \$[0] and so on meaningful, and to
26477 # report actual input values of CONFIG_FILES etc. instead of their
26478 # values after options handling. Logging --version etc. is OK.
26479 exec 5>>config.log
26480 {
26481 echo
26482 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26483 ## Running $as_me. ##
26484 _ASBOX
26485 } >&5
26486 cat >&5 <<_CSEOF
26487
26488 This file was extended by $as_me, which was
26489 generated by GNU Autoconf 2.59. Invocation command line was
26490
26491 CONFIG_FILES = $CONFIG_FILES
26492 CONFIG_HEADERS = $CONFIG_HEADERS
26493 CONFIG_LINKS = $CONFIG_LINKS
26494 CONFIG_COMMANDS = $CONFIG_COMMANDS
26495 $ $0 $@
26496
26497 _CSEOF
26498 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
26499 echo >&5
26500 _ACEOF
26501
26502 # Files that config.status was made for.
26503 if test -n "$ac_config_files"; then
26504 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26505 fi
26506
26507 if test -n "$ac_config_headers"; then
26508 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
26509 fi
26510
26511 if test -n "$ac_config_links"; then
26512 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
26513 fi
26514
26515 if test -n "$ac_config_commands"; then
26516 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
26517 fi
26518
26519 cat >>$CONFIG_STATUS <<\_ACEOF
26520
26521 ac_cs_usage="\
26522 \`$as_me' instantiates files from templates according to the
26523 current configuration.
26524
26525 Usage: $0 [OPTIONS] [FILE]...
26526
26527 -h, --help print this help, then exit
26528 -V, --version print version number, then exit
26529 -q, --quiet do not print progress messages
26530 -d, --debug don't remove temporary files
26531 --recheck update $as_me by reconfiguring in the same conditions
26532 --file=FILE[:TEMPLATE]
26533 instantiate the configuration file FILE
26534
26535 Configuration files:
26536 $config_files
26537
26538 Configuration commands:
26539 $config_commands
26540
26541 Report bugs to <bug-autoconf@gnu.org>."
26542 _ACEOF
26543
26544 cat >>$CONFIG_STATUS <<_ACEOF
26545 ac_cs_version="\\
26546 config.status
26547 configured by $0, generated by GNU Autoconf 2.59,
26548 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26549
26550 Copyright (C) 2003 Free Software Foundation, Inc.
26551 This config.status script is free software; the Free Software Foundation
26552 gives unlimited permission to copy, distribute and modify it."
26553 srcdir=$srcdir
26554 INSTALL="$INSTALL"
26555 _ACEOF
26556
26557 cat >>$CONFIG_STATUS <<\_ACEOF
26558 # If no file are specified by the user, then we need to provide default
26559 # value. By we need to know if files were specified by the user.
26560 ac_need_defaults=:
26561 while test $# != 0
26562 do
26563 case $1 in
26564 --*=*)
26565 ac_option=`expr "x$1" : 'x\([^=]*\)='`
26566 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
26567 ac_shift=:
26568 ;;
26569 -*)
26570 ac_option=$1
26571 ac_optarg=$2
26572 ac_shift=shift
26573 ;;
26574 *) # This is not an option, so the user has probably given explicit
26575 # arguments.
26576 ac_option=$1
26577 ac_need_defaults=false;;
26578 esac
26579
26580 case $ac_option in
26581 # Handling of the options.
26582 _ACEOF
26583 cat >>$CONFIG_STATUS <<\_ACEOF
26584 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26585 ac_cs_recheck=: ;;
26586 --version | --vers* | -V )
26587 echo "$ac_cs_version"; exit 0 ;;
26588 --he | --h)
26589 # Conflict between --help and --header
26590 { { echo "$as_me:$LINENO: error: ambiguous option: $1
26591 Try \`$0 --help' for more information." >&5
26592 echo "$as_me: error: ambiguous option: $1
26593 Try \`$0 --help' for more information." >&2;}
26594 { (exit 1); exit 1; }; };;
26595 --help | --hel | -h )
26596 echo "$ac_cs_usage"; exit 0 ;;
26597 --debug | --d* | -d )
26598 debug=: ;;
26599 --file | --fil | --fi | --f )
26600 $ac_shift
26601 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
26602 ac_need_defaults=false;;
26603 --header | --heade | --head | --hea )
26604 $ac_shift
26605 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
26606 ac_need_defaults=false;;
26607 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26608 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26609 ac_cs_silent=: ;;
26610
26611 # This is an error.
26612 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
26613 Try \`$0 --help' for more information." >&5
26614 echo "$as_me: error: unrecognized option: $1
26615 Try \`$0 --help' for more information." >&2;}
26616 { (exit 1); exit 1; }; } ;;
26617
26618 *) ac_config_targets="$ac_config_targets $1" ;;
26619
26620 esac
26621 shift
26622 done
26623
26624 ac_configure_extra_args=
26625
26626 if $ac_cs_silent; then
26627 exec 6>/dev/null
26628 ac_configure_extra_args="$ac_configure_extra_args --silent"
26629 fi
26630
26631 _ACEOF
26632 cat >>$CONFIG_STATUS <<_ACEOF
26633 if \$ac_cs_recheck; then
26634 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
26635 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
26636 fi
26637
26638 _ACEOF
26639
26640 cat >>$CONFIG_STATUS <<_ACEOF
26641 #
26642 # INIT-COMMANDS section.
26643 #
26644
26645 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
26646 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
26647 # from automake.
26648 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
26649 # Capture the value of LINGUAS because we need it to compute CATALOGS.
26650 LINGUAS="${LINGUAS-%UNSET%}"
26651
26652
26653 _ACEOF
26654
26655
26656
26657 cat >>$CONFIG_STATUS <<\_ACEOF
26658 for ac_config_target in $ac_config_targets
26659 do
26660 case "$ac_config_target" in
26661 # Handling of arguments.
26662 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26663 "libhdate.spec" ) CONFIG_FILES="$CONFIG_FILES libhdate.spec" ;;
26664 "libhdate.pc" ) CONFIG_FILES="$CONFIG_FILES libhdate.pc" ;;
26665 "intl/Makefile" ) CONFIG_FILES="$CONFIG_FILES intl/Makefile" ;;
26666 "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
26667 "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
26668 "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
26669 "examples/hcal/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/hcal/Makefile" ;;
26670 "examples/ical/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/ical/Makefile" ;;
26671 "examples/html/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/html/Makefile" ;;
26672 "examples/hebcal/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/hebcal/Makefile" ;;
26673 "examples/bindings/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/bindings/Makefile" ;;
26674 "bindings/Makefile" ) CONFIG_FILES="$CONFIG_FILES bindings/Makefile" ;;
26675 "bindings/python/Makefile" ) CONFIG_FILES="$CONFIG_FILES bindings/python/Makefile" ;;
26676 "bindings/perl/Makefile" ) CONFIG_FILES="$CONFIG_FILES bindings/perl/Makefile" ;;
26677 "bindings/pascal/Makefile" ) CONFIG_FILES="$CONFIG_FILES bindings/pascal/Makefile" ;;
26678 "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
26679 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26680 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26681 { (exit 1); exit 1; }; };;
26682 esac
26683 done
26684
26685 # If the user did not use the arguments to specify the items to instantiate,
26686 # then the envvar interface is used. Set only those that are not.
26687 # We use the long form for the default assignment because of an extremely
26688 # bizarre bug on SunOS 4.1.3.
26689 if $ac_need_defaults; then
26690 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26691 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26692 fi
26693
26694 # Have a temporary directory for convenience. Make it in the build tree
26695 # simply because there is no reason to put it here, and in addition,
26696 # creating and moving files from /tmp can sometimes cause problems.
26697 # Create a temporary directory, and hook for its removal unless debugging.
26698 $debug ||
26699 {
26700 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
26701 trap '{ (exit 1); exit 1; }' 1 2 13 15
26702 }
26703
26704 # Create a (secure) tmp directory for tmp files.
26705
26706 {
26707 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
26708 test -n "$tmp" && test -d "$tmp"
26709 } ||
26710 {
26711 tmp=./confstat$$-$RANDOM
26712 (umask 077 && mkdir $tmp)
26713 } ||
26714 {
26715 echo "$me: cannot create a temporary directory in ." >&2
26716 { (exit 1); exit 1; }
26717 }
26718
26719 _ACEOF
26720
26721 cat >>$CONFIG_STATUS <<_ACEOF
26722
26723 #
26724 # CONFIG_FILES section.
26725 #
26726
26727 # No need to generate the scripts if there are no CONFIG_FILES.
26728 # This happens for instance when ./config.status config.h
26729 if test -n "\$CONFIG_FILES"; then
26730 # Protect against being on the right side of a sed subst in config.status.
26731 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
26732 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
26733 s,@SHELL@,$SHELL,;t t
26734 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
26735 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
26736 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
26737 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
26738 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
26739 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
26740 s,@exec_prefix@,$exec_prefix,;t t
26741 s,@prefix@,$prefix,;t t
26742 s,@program_transform_name@,$program_transform_name,;t t
26743 s,@bindir@,$bindir,;t t
26744 s,@sbindir@,$sbindir,;t t
26745 s,@libexecdir@,$libexecdir,;t t
26746 s,@datadir@,$datadir,;t t
26747 s,@sysconfdir@,$sysconfdir,;t t
26748 s,@sharedstatedir@,$sharedstatedir,;t t
26749 s,@localstatedir@,$localstatedir,;t t
26750 s,@libdir@,$libdir,;t t
26751 s,@includedir@,$includedir,;t t
26752 s,@oldincludedir@,$oldincludedir,;t t
26753 s,@infodir@,$infodir,;t t
26754 s,@mandir@,$mandir,;t t
26755 s,@build_alias@,$build_alias,;t t
26756 s,@host_alias@,$host_alias,;t t
26757 s,@target_alias@,$target_alias,;t t
26758 s,@DEFS@,$DEFS,;t t
26759 s,@ECHO_C@,$ECHO_C,;t t
26760 s,@ECHO_N@,$ECHO_N,;t t
26761 s,@ECHO_T@,$ECHO_T,;t t
26762 s,@LIBS@,$LIBS,;t t
26763 s,@VERSION_INFO@,$VERSION_INFO,;t t
26764 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
26765 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
26766 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
26767 s,@PACKAGE@,$PACKAGE,;t t
26768 s,@VERSION@,$VERSION,;t t
26769 s,@ACLOCAL@,$ACLOCAL,;t t
26770 s,@AUTOCONF@,$AUTOCONF,;t t
26771 s,@AUTOMAKE@,$AUTOMAKE,;t t
26772 s,@AUTOHEADER@,$AUTOHEADER,;t t
26773 s,@MAKEINFO@,$MAKEINFO,;t t
26774 s,@SET_MAKE@,$SET_MAKE,;t t
26775 s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
26776 s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
26777 s,@MAINT@,$MAINT,;t t
26778 s,@CC@,$CC,;t t
26779 s,@CFLAGS@,$CFLAGS,;t t
26780 s,@LDFLAGS@,$LDFLAGS,;t t
26781 s,@CPPFLAGS@,$CPPFLAGS,;t t
26782 s,@ac_ct_CC@,$ac_ct_CC,;t t
26783 s,@EXEEXT@,$EXEEXT,;t t
26784 s,@OBJEXT@,$OBJEXT,;t t
26785 s,@LN_S@,$LN_S,;t t
26786 s,@CPP@,$CPP,;t t
26787 s,@EGREP@,$EGREP,;t t
26788 s,@build@,$build,;t t
26789 s,@build_cpu@,$build_cpu,;t t
26790 s,@build_vendor@,$build_vendor,;t t
26791 s,@build_os@,$build_os,;t t
26792 s,@host@,$host,;t t
26793 s,@host_cpu@,$host_cpu,;t t
26794 s,@host_vendor@,$host_vendor,;t t
26795 s,@host_os@,$host_os,;t t
26796 s,@ECHO@,$ECHO,;t t
26797 s,@AR@,$AR,;t t
26798 s,@ac_ct_AR@,$ac_ct_AR,;t t
26799 s,@RANLIB@,$RANLIB,;t t
26800 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
26801 s,@STRIP@,$STRIP,;t t
26802 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
26803 s,@CXX@,$CXX,;t t
26804 s,@CXXFLAGS@,$CXXFLAGS,;t t
26805 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
26806 s,@CXXCPP@,$CXXCPP,;t t
26807 s,@F77@,$F77,;t t
26808 s,@FFLAGS@,$FFLAGS,;t t
26809 s,@ac_ct_F77@,$ac_ct_F77,;t t
26810 s,@LIBTOOL@,$LIBTOOL,;t t
26811 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
26812 s,@have_swig@,$have_swig,;t t
26813 s,@have_pascal@,$have_pascal,;t t
26814 s,@PA_VERSION@,$PA_VERSION,;t t
26815 s,@PA_MODULES_PATH@,$PA_MODULES_PATH,;t t
26816 s,@WITH_PASCAL_TRUE@,$WITH_PASCAL_TRUE,;t t
26817 s,@WITH_PASCAL_FALSE@,$WITH_PASCAL_FALSE,;t t
26818 s,@have_python@,$have_python,;t t
26819 s,@PY_VERSION@,$PY_VERSION,;t t
26820 s,@PY_CFLAGS@,$PY_CFLAGS,;t t
26821 s,@PY_MODULES_PATH@,$PY_MODULES_PATH,;t t
26822 s,@WITH_PYTHON_TRUE@,$WITH_PYTHON_TRUE,;t t
26823 s,@WITH_PYTHON_FALSE@,$WITH_PYTHON_FALSE,;t t
26824 s,@have_perl@,$have_perl,;t t
26825 s,@PE_CFLAGS@,$PE_CFLAGS,;t t
26826 s,@PE_MODULES_PATH@,$PE_MODULES_PATH,;t t
26827 s,@WITH_PERL_TRUE@,$WITH_PERL_TRUE,;t t
26828 s,@WITH_PERL_FALSE@,$WITH_PERL_FALSE,;t t
26829 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
26830 s,@USE_NLS@,$USE_NLS,;t t
26831 s,@MSGFMT@,$MSGFMT,;t t
26832 s,@GMSGFMT@,$GMSGFMT,;t t
26833 s,@XGETTEXT@,$XGETTEXT,;t t
26834 s,@MSGMERGE@,$MSGMERGE,;t t
26835 s,@GLIBC2@,$GLIBC2,;t t
26836 s,@ALLOCA@,$ALLOCA,;t t
26837 s,@GLIBC21@,$GLIBC21,;t t
26838 s,@INTL_MACOSX_LIBS@,$INTL_MACOSX_LIBS,;t t
26839 s,@HAVE_POSIX_PRINTF@,$HAVE_POSIX_PRINTF,;t t
26840 s,@HAVE_ASPRINTF@,$HAVE_ASPRINTF,;t t
26841 s,@HAVE_SNPRINTF@,$HAVE_SNPRINTF,;t t
26842 s,@HAVE_WPRINTF@,$HAVE_WPRINTF,;t t
26843 s,@LIBICONV@,$LIBICONV,;t t
26844 s,@LTLIBICONV@,$LTLIBICONV,;t t
26845 s,@INTLBISON@,$INTLBISON,;t t
26846 s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t
26847 s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
26848 s,@CATOBJEXT@,$CATOBJEXT,;t t
26849 s,@DATADIRNAME@,$DATADIRNAME,;t t
26850 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
26851 s,@GENCAT@,$GENCAT,;t t
26852 s,@INTLOBJS@,$INTLOBJS,;t t
26853 s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t
26854 s,@INTLLIBS@,$INTLLIBS,;t t
26855 s,@LIBINTL@,$LIBINTL,;t t
26856 s,@LTLIBINTL@,$LTLIBINTL,;t t
26857 s,@POSUB@,$POSUB,;t t
26858 s,@WITH_EXAMPLES_TRUE@,$WITH_EXAMPLES_TRUE,;t t
26859 s,@WITH_EXAMPLES_FALSE@,$WITH_EXAMPLES_FALSE,;t t
26860 s,@WITH_HCAL_TRUE@,$WITH_HCAL_TRUE,;t t
26861 s,@WITH_HCAL_FALSE@,$WITH_HCAL_FALSE,;t t
26862 s,@LIBOBJS@,$LIBOBJS,;t t
26863 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
26864 CEOF
26865
26866 _ACEOF
26867
26868 cat >>$CONFIG_STATUS <<\_ACEOF
26869 # Split the substitutions into bite-sized pieces for seds with
26870 # small command number limits, like on Digital OSF/1 and HP-UX.
26871 ac_max_sed_lines=48
26872 ac_sed_frag=1 # Number of current file.
26873 ac_beg=1 # First line for current file.
26874 ac_end=$ac_max_sed_lines # Line after last line for current file.
26875 ac_more_lines=:
26876 ac_sed_cmds=
26877 while $ac_more_lines; do
26878 if test $ac_beg -gt 1; then
26879 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26880 else
26881 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26882 fi
26883 if test ! -s $tmp/subs.frag; then
26884 ac_more_lines=false
26885 else
26886 # The purpose of the label and of the branching condition is to
26887 # speed up the sed processing (if there are no `@' at all, there
26888 # is no need to browse any of the substitutions).
26889 # These are the two extra sed commands mentioned above.
26890 (echo ':t
26891 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
26892 if test -z "$ac_sed_cmds"; then
26893 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
26894 else
26895 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
26896 fi
26897 ac_sed_frag=`expr $ac_sed_frag + 1`
26898 ac_beg=$ac_end
26899 ac_end=`expr $ac_end + $ac_max_sed_lines`
26900 fi
26901 done
26902 if test -z "$ac_sed_cmds"; then
26903 ac_sed_cmds=cat
26904 fi
26905 fi # test -n "$CONFIG_FILES"
26906
26907 _ACEOF
26908 cat >>$CONFIG_STATUS <<\_ACEOF
26909 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
26910 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26911 case $ac_file in
26912 - | *:- | *:-:* ) # input from stdin
26913 cat >$tmp/stdin
26914 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26915 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26916 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26917 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26918 * ) ac_file_in=$ac_file.in ;;
26919 esac
26920
26921 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
26922 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
26923 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26924 X"$ac_file" : 'X\(//\)[^/]' \| \
26925 X"$ac_file" : 'X\(//\)$' \| \
26926 X"$ac_file" : 'X\(/\)' \| \
26927 . : '\(.\)' 2>/dev/null ||
26928 echo X"$ac_file" |
26929 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26930 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26931 /^X\(\/\/\)$/{ s//\1/; q; }
26932 /^X\(\/\).*/{ s//\1/; q; }
26933 s/.*/./; q'`
26934 { if $as_mkdir_p; then
26935 mkdir -p "$ac_dir"
26936 else
26937 as_dir="$ac_dir"
26938 as_dirs=
26939 while test ! -d "$as_dir"; do
26940 as_dirs="$as_dir $as_dirs"
26941 as_dir=`(dirname "$as_dir") 2>/dev/null ||
26942 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26943 X"$as_dir" : 'X\(//\)[^/]' \| \
26944 X"$as_dir" : 'X\(//\)$' \| \
26945 X"$as_dir" : 'X\(/\)' \| \
26946 . : '\(.\)' 2>/dev/null ||
26947 echo X"$as_dir" |
26948 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26949 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26950 /^X\(\/\/\)$/{ s//\1/; q; }
26951 /^X\(\/\).*/{ s//\1/; q; }
26952 s/.*/./; q'`
26953 done
26954 test ! -n "$as_dirs" || mkdir $as_dirs
26955 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
26956 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
26957 { (exit 1); exit 1; }; }; }
26958
26959 ac_builddir=.
26960
26961 if test "$ac_dir" != .; then
26962 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
26963 # A "../" for each directory in $ac_dir_suffix.
26964 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
26965 else
26966 ac_dir_suffix= ac_top_builddir=
26967 fi
26968
26969 case $srcdir in
26970 .) # No --srcdir option. We are building in place.
26971 ac_srcdir=.
26972 if test -z "$ac_top_builddir"; then
26973 ac_top_srcdir=.
26974 else
26975 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
26976 fi ;;
26977 [\\/]* | ?:[\\/]* ) # Absolute path.
26978 ac_srcdir=$srcdir$ac_dir_suffix;
26979 ac_top_srcdir=$srcdir ;;
26980 *) # Relative path.
26981 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
26982 ac_top_srcdir=$ac_top_builddir$srcdir ;;
26983 esac
26984
26985 # Do not use `cd foo && pwd` to compute absolute paths, because
26986 # the directories may not exist.
26987 case `pwd` in
26988 .) ac_abs_builddir="$ac_dir";;
26989 *)
26990 case "$ac_dir" in
26991 .) ac_abs_builddir=`pwd`;;
26992 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
26993 *) ac_abs_builddir=`pwd`/"$ac_dir";;
26994 esac;;
26995 esac
26996 case $ac_abs_builddir in
26997 .) ac_abs_top_builddir=${ac_top_builddir}.;;
26998 *)
26999 case ${ac_top_builddir}. in
27000 .) ac_abs_top_builddir=$ac_abs_builddir;;
27001 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
27002 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
27003 esac;;
27004 esac
27005 case $ac_abs_builddir in
27006 .) ac_abs_srcdir=$ac_srcdir;;
27007 *)
27008 case $ac_srcdir in
27009 .) ac_abs_srcdir=$ac_abs_builddir;;
27010 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
27011 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
27012 esac;;
27013 esac
27014 case $ac_abs_builddir in
27015 .) ac_abs_top_srcdir=$ac_top_srcdir;;
27016 *)
27017 case $ac_top_srcdir in
27018 .) ac_abs_top_srcdir=$ac_abs_builddir;;
27019 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
27020 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
27021 esac;;
27022 esac
27023
27024
27025 case $INSTALL in
27026 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27027 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
27028 esac
27029
27030 # Let's still pretend it is `configure' which instantiates (i.e., don't
27031 # use $as_me), people would be surprised to read:
27032 # /* config.h. Generated by config.status. */
27033 if test x"$ac_file" = x-; then
27034 configure_input=
27035 else
27036 configure_input="$ac_file. "
27037 fi
27038 configure_input=$configure_input"Generated from `echo $ac_file_in |
27039 sed 's,.*/,,'` by configure."
27040
27041 # First look for the input files in the build tree, otherwise in the
27042 # src tree.
27043 ac_file_inputs=`IFS=:
27044 for f in $ac_file_in; do
27045 case $f in
27046 -) echo $tmp/stdin ;;
27047 [\\/$]*)
27048 # Absolute (can't be DOS-style, as IFS=:)
27049 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
27050 echo "$as_me: error: cannot find input file: $f" >&2;}
27051 { (exit 1); exit 1; }; }
27052 echo "$f";;
27053 *) # Relative
27054 if test -f "$f"; then
27055 # Build tree
27056 echo "$f"
27057 elif test -f "$srcdir/$f"; then
27058 # Source tree
27059 echo "$srcdir/$f"
27060 else
27061 # /dev/null tree
27062 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
27063 echo "$as_me: error: cannot find input file: $f" >&2;}
27064 { (exit 1); exit 1; }; }
27065 fi;;
27066 esac
27067 done` || { (exit 1); exit 1; }
27068
27069 if test x"$ac_file" != x-; then
27070 { echo "$as_me:$LINENO: creating $ac_file" >&5
27071 echo "$as_me: creating $ac_file" >&6;}
27072 rm -f "$ac_file"
27073 fi
27074 _ACEOF
27075 cat >>$CONFIG_STATUS <<_ACEOF
27076 sed "$ac_vpsub
27077 $extrasub
27078 _ACEOF
27079 cat >>$CONFIG_STATUS <<\_ACEOF
27080 :t
27081 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27082 s,@configure_input@,$configure_input,;t t
27083 s,@srcdir@,$ac_srcdir,;t t
27084 s,@abs_srcdir@,$ac_abs_srcdir,;t t
27085 s,@top_srcdir@,$ac_top_srcdir,;t t
27086 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
27087 s,@builddir@,$ac_builddir,;t t
27088 s,@abs_builddir@,$ac_abs_builddir,;t t
27089 s,@top_builddir@,$ac_top_builddir,;t t
27090 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
27091 s,@INSTALL@,$ac_INSTALL,;t t
27092 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27093 rm -f $tmp/stdin
27094 if test x"$ac_file" != x-; then
27095 mv $tmp/out $ac_file
27096 else
27097 cat $tmp/out
27098 rm -f $tmp/out
27099 fi
27100
27101 done
27102 _ACEOF
27103 cat >>$CONFIG_STATUS <<\_ACEOF
27104
27105 #
27106 # CONFIG_COMMANDS section.
27107 #
27108 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27109 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27110 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27111 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
27112 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27113 X"$ac_dest" : 'X\(//\)[^/]' \| \
27114 X"$ac_dest" : 'X\(//\)$' \| \
27115 X"$ac_dest" : 'X\(/\)' \| \
27116 . : '\(.\)' 2>/dev/null ||
27117 echo X"$ac_dest" |
27118 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27119 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27120 /^X\(\/\/\)$/{ s//\1/; q; }
27121 /^X\(\/\).*/{ s//\1/; q; }
27122 s/.*/./; q'`
27123 { if $as_mkdir_p; then
27124 mkdir -p "$ac_dir"
27125 else
27126 as_dir="$ac_dir"
27127 as_dirs=
27128 while test ! -d "$as_dir"; do
27129 as_dirs="$as_dir $as_dirs"
27130 as_dir=`(dirname "$as_dir") 2>/dev/null ||
27131 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27132 X"$as_dir" : 'X\(//\)[^/]' \| \
27133 X"$as_dir" : 'X\(//\)$' \| \
27134 X"$as_dir" : 'X\(/\)' \| \
27135 . : '\(.\)' 2>/dev/null ||
27136 echo X"$as_dir" |
27137 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27138 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27139 /^X\(\/\/\)$/{ s//\1/; q; }
27140 /^X\(\/\).*/{ s//\1/; q; }
27141 s/.*/./; q'`
27142 done
27143 test ! -n "$as_dirs" || mkdir $as_dirs
27144 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
27145 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
27146 { (exit 1); exit 1; }; }; }
27147
27148 ac_builddir=.
27149
27150 if test "$ac_dir" != .; then
27151 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
27152 # A "../" for each directory in $ac_dir_suffix.
27153 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
27154 else
27155 ac_dir_suffix= ac_top_builddir=
27156 fi
27157
27158 case $srcdir in
27159 .) # No --srcdir option. We are building in place.
27160 ac_srcdir=.
27161 if test -z "$ac_top_builddir"; then
27162 ac_top_srcdir=.
27163 else
27164 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
27165 fi ;;
27166 [\\/]* | ?:[\\/]* ) # Absolute path.
27167 ac_srcdir=$srcdir$ac_dir_suffix;
27168 ac_top_srcdir=$srcdir ;;
27169 *) # Relative path.
27170 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
27171 ac_top_srcdir=$ac_top_builddir$srcdir ;;
27172 esac
27173
27174 # Do not use `cd foo && pwd` to compute absolute paths, because
27175 # the directories may not exist.
27176 case `pwd` in
27177 .) ac_abs_builddir="$ac_dir";;
27178 *)
27179 case "$ac_dir" in
27180 .) ac_abs_builddir=`pwd`;;
27181 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
27182 *) ac_abs_builddir=`pwd`/"$ac_dir";;
27183 esac;;
27184 esac
27185 case $ac_abs_builddir in
27186 .) ac_abs_top_builddir=${ac_top_builddir}.;;
27187 *)
27188 case ${ac_top_builddir}. in
27189 .) ac_abs_top_builddir=$ac_abs_builddir;;
27190 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
27191 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
27192 esac;;
27193 esac
27194 case $ac_abs_builddir in
27195 .) ac_abs_srcdir=$ac_srcdir;;
27196 *)
27197 case $ac_srcdir in
27198 .) ac_abs_srcdir=$ac_abs_builddir;;
27199 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
27200 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
27201 esac;;
27202 esac
27203 case $ac_abs_builddir in
27204 .) ac_abs_top_srcdir=$ac_top_srcdir;;
27205 *)
27206 case $ac_top_srcdir in
27207 .) ac_abs_top_srcdir=$ac_abs_builddir;;
27208 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
27209 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
27210 esac;;
27211 esac
27212
27213
27214 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
27215 echo "$as_me: executing $ac_dest commands" >&6;}
27216 case $ac_dest in
27217 default-1 )
27218 for ac_file in $CONFIG_FILES; do
27219 # Support "outfile[:infile[:infile...]]"
27220 case "$ac_file" in
27221 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
27222 esac
27223 # PO directories have a Makefile.in generated from Makefile.in.in.
27224 case "$ac_file" in */Makefile.in)
27225 # Adjust a relative srcdir.
27226 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
27227 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
27228 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
27229 # In autoconf-2.13 it is called $ac_given_srcdir.
27230 # In autoconf-2.50 it is called $srcdir.
27231 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
27232 case "$ac_given_srcdir" in
27233 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
27234 /*) top_srcdir="$ac_given_srcdir" ;;
27235 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
27236 esac
27237 # Treat a directory as a PO directory if and only if it has a
27238 # POTFILES.in file. This allows packages to have multiple PO
27239 # directories under different names or in different locations.
27240 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
27241 rm -f "$ac_dir/POTFILES"
27242 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
27243 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
27244 POMAKEFILEDEPS="POTFILES.in"
27245 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
27246 # on $ac_dir but don't depend on user-specified configuration
27247 # parameters.
27248 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
27249 # The LINGUAS file contains the set of available languages.
27250 if test -n "$OBSOLETE_ALL_LINGUAS"; then
27251 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
27252 fi
27253 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
27254 # Hide the ALL_LINGUAS assigment from automake.
27255 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
27256 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
27257 else
27258 # The set of available languages was given in configure.in.
27259 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
27260 fi
27261 # Compute POFILES
27262 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
27263 # Compute UPDATEPOFILES
27264 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
27265 # Compute DUMMYPOFILES
27266 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
27267 # Compute GMOFILES
27268 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
27269 case "$ac_given_srcdir" in
27270 .) srcdirpre= ;;
27271 *) srcdirpre='$(srcdir)/' ;;
27272 esac
27273 POFILES=
27274 UPDATEPOFILES=
27275 DUMMYPOFILES=
27276 GMOFILES=
27277 for lang in $ALL_LINGUAS; do
27278 POFILES="$POFILES $srcdirpre$lang.po"
27279 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
27280 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
27281 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
27282 done
27283 # CATALOGS depends on both $ac_dir and the user's LINGUAS
27284 # environment variable.
27285 INST_LINGUAS=
27286 if test -n "$ALL_LINGUAS"; then
27287 for presentlang in $ALL_LINGUAS; do
27288 useit=no
27289 if test "%UNSET%" != "$LINGUAS"; then
27290 desiredlanguages="$LINGUAS"
27291 else
27292 desiredlanguages="$ALL_LINGUAS"
27293 fi
27294 for desiredlang in $desiredlanguages; do
27295 # Use the presentlang catalog if desiredlang is
27296 # a. equal to presentlang, or
27297 # b. a variant of presentlang (because in this case,
27298 # presentlang can be used as a fallback for messages
27299 # which are not translated in the desiredlang catalog).
27300 case "$desiredlang" in
27301 "$presentlang"*) useit=yes;;
27302 esac
27303 done
27304 if test $useit = yes; then
27305 INST_LINGUAS="$INST_LINGUAS $presentlang"
27306 fi
27307 done
27308 fi
27309 CATALOGS=
27310 if test -n "$INST_LINGUAS"; then
27311 for lang in $INST_LINGUAS; do
27312 CATALOGS="$CATALOGS $lang.gmo"
27313 done
27314 fi
27315 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
27316 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
27317 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
27318 if test -f "$f"; then
27319 case "$f" in
27320 *.orig | *.bak | *~) ;;
27321 *) cat "$f" >> "$ac_dir/Makefile" ;;
27322 esac
27323 fi
27324 done
27325 fi
27326 ;;
27327 esac
27328 done ;;
27329 esac
27330 done
27331 _ACEOF
27332
27333 cat >>$CONFIG_STATUS <<\_ACEOF
27334
27335 { (exit 0); exit 0; }
27336 _ACEOF
27337 chmod +x $CONFIG_STATUS
27338 ac_clean_files=$ac_clean_files_save
27339
27340
27341 # configure is writing to config.log, and then calls config.status.
27342 # config.status does its own redirection, appending to config.log.
27343 # Unfortunately, on DOS this fails, as config.log is still kept open
27344 # by configure, so config.status won't be able to write to it; its
27345 # output is simply discarded. So we exec the FD to /dev/null,
27346 # effectively closing config.log, so it can be properly (re)opened and
27347 # appended to by config.status. When coming back to configure, we
27348 # need to make the FD available again.
27349 if test "$no_create" != yes; then
27350 ac_cs_success=:
27351 ac_config_status_args=
27352 test "$silent" = yes &&
27353 ac_config_status_args="$ac_config_status_args --quiet"
27354 exec 5>/dev/null
27355 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
27356 exec 5>>config.log
27357 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27358 # would make configure fail if this is the last instruction.
27359 $ac_cs_success || { (exit 1); exit 1; }
27360 fi
27361
27362
27363 echo "
27364 $PACKAGE-$VERSION
27365
27366 prefix: ${prefix}
27367 compiler: ${CC}
27368
27369 have swig ${have_swig}
27370 have free pascal ${have_pascal}
27371 have python ${have_python}
27372 have perl ${have_perl}
27373
27374 build hcal ${build_hcal}
27375 build examples ${build_examples}
27376
27377 build python binding ${build_python}
27378 build perl binding ${build_perl}
27379 puild pascal binding ${build_pascal}
27380
27381 perl site lib path: $PE_MODULES_PATH
27382 python site lib path: $PY_MODULES_PATH
27383 pascal site lib path: $PA_MODULES_PATH
27384 "
0 AC_INIT(src/hdate.h)
1
2 dnl Set release number
3 PACKAGE=libhdate
4 LIBHDATE_MAJOR_VERSION=1
5 LIBHDATE_MINOR_VERSION=4
6 LIBHDATE_MICRO_VERSION=8
7
8 VERSION=$LIBHDATE_MAJOR_VERSION.$LIBHDATE_MINOR_VERSION.$LIBHDATE_MICRO_VERSION
9 VERSION_INFO=$LIBHDATE_MAJOR_VERSION:$LIBHDATE_MINOR_VERSION:0
10
11 AC_SUBST(VERSION_INFO)
12
13 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
14 AM_MAINTAINER_MODE
15
16 dnl Checks for programs.
17 AC_ISC_POSIX
18 AC_PROG_CC
19 AC_PROG_INSTALL
20 AC_PROG_LN_S
21 AC_PROG_MAKE_SET
22 AC_STDC_HEADERS
23 AM_PROG_LIBTOOL
24
25 AM_MAINTAINER_MODE
26
27 AC_C_CONST
28
29 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
30
31 CFLAGS=
32 LIBS=-lm
33
34 dnl =======================================================================================
35
36 AC_CHECK_PROG(have_swig, "swig", yes, no)
37
38 dnl =======================================================================================
39
40 build_pascal=no
41
42 AC_CHECK_PROG(have_pascal, "fpc", yes, no)
43
44 AC_ARG_ENABLE(pascal, [ --enable-pascal build pascal binding [default=no]], build_pascal="$enableval", build_pascal=no)
45
46 if test "x$have_pascal" = "xno"; then
47 build_pascal=no
48 else
49 PA_VERSION=`fpc -iV`
50 PA_TPR=`fpc -iTP`
51 PA_TOS=`fpc -iTO`
52 PA_MODULES_PATH="/usr/lib/fpc/$PA_VERSION/units/$PA_TPR-$PA_TOS"
53 AC_SUBST([PA_VERSION])
54 AC_SUBST([PA_MODULES_PATH])
55 fi
56
57 AM_CONDITIONAL(WITH_PASCAL, test "x$build_pascal" = "xyes")
58
59 dnl =======================================================================================
60
61 build_python=no
62
63 AC_ARG_ENABLE(python, [ --enable-python build python binding [default=no]], build_python="$enableval", build_python=no)
64
65 AC_ARG_WITH(python-sitelib-dir, [ --with-python-sitelib-dir=PATH path to python site lib ])
66
67 AC_CHECK_PROG(have_python, "python", yes, no)
68
69 if test "x$have_python" = "xyes"; then
70 PY_PREFIX=`python -c 'import sys ; print sys.prefix'`
71 PY_VERSION=`python -c 'import sys ; print sys.version[[0:3]]'`
72 AC_MSG_CHECKING(for $PY_PREFIX/include/python$PY_VERSION/Python.h)
73 if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h; then
74 AC_MSG_RESULT(yes)
75 PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
76
77 if test "x$with_python_sitelib_dir" = "x" ; then
78 PY_MODULES_PATH="$PY_PREFIX/lib/python$PY_VERSION/site-packages"
79 else
80 PY_MODULES_PATH=$with_python_sitelib_dir
81 fi
82
83 AC_SUBST([PY_VERSION])
84 AC_SUBST([PY_CFLAGS])
85 AC_SUBST([PY_MODULES_PATH])
86 if test "x$have_swig" = "xno"; then
87 build_python=no
88 fi
89 else
90 AC_MSG_RESULT(no)
91 build_python=no
92 fi
93 fi
94
95 AM_CONDITIONAL(WITH_PYTHON, test "x$build_python" = "xyes")
96
97 dnl =======================================================================================
98
99 build_perl=no
100
101 AC_ARG_ENABLE(perl, [ --enable-perl build perl binding [default=no]], build_perl="$enableval", build_perl=no)
102
103 AC_ARG_WITH(perl-sitelib-dir, [ --with-perl-sitelib-dir=PATH path to perl site lib ])
104
105 AC_CHECK_PROG(have_perl, "perl", yes, no)
106
107 if test "x$have_perl" = "xyes"; then
108 PE_PREFIX=`(perl -e 'use Config; print $Config{archlib};')`
109 AC_MSG_CHECKING(for $PE_PREFIX/CORE/perl.h)
110 if test -f $PE_PREFIX/CORE/perl.h; then
111 AC_MSG_RESULT(yes)
112 PE_CFLAGS="-I$PE_PREFIX/CORE "
113 PE_CFLAGS=$PE_CFLAGS`(perl -e 'use Config; print $Config{cppflags};')`
114
115 if test "x$with_perl_sitelib_dir" = "x" ; then
116 PE_MODULES_PATH=`(perl -e 'use Config; print $Config{sitelib};')`
117 else
118 PE_MODULES_PATH=$with_perl_sitelib_dir
119 fi
120
121 AC_SUBST([PE_CFLAGS])
122 AC_SUBST([PE_MODULES_PATH])
123 if test "x$have_swig" = "xno"; then
124 build_perl=no
125 fi
126 else
127 AC_MSG_RESULT(no)
128 build_perl=no
129 fi
130 fi
131
132 dnl FIXME: on fedora PE_MODULES_PATH="/usr/lib/perl5/site_perl"
133
134 AM_CONDITIONAL(WITH_PERL, test "x$build_perl" = "xyes")
135
136 dnl =======================================================================================
137
138 dnl gettext
139
140 dnl Languages which your application supports
141 ALL_LINGUAS="he es_MX ru fr sv"
142 AM_GNU_GETTEXT
143 AM_GNU_GETTEXT_VERSION(0.10.40)
144
145 if test "x${prefix}" = "xNONE"; then
146 AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale")
147 else
148 AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale")
149 fi
150
151 dnl =======================================================================================
152
153 build_examples=no
154
155 AC_ARG_ENABLE(examples, [ --enable-examples build examples [default=no]], build_examples="$enableval", build_examples=no)
156
157 AM_CONDITIONAL(WITH_EXAMPLES, test "x$build_examples" = "xyes")
158
159 dnl =======================================================================================
160
161 build_hcal=yes
162
163 AC_ARG_ENABLE(hcal, [ --disable-hcal build hcal/hdate [default=yes]], build_hcal="$enableval", build_hcal=yes)
164
165 AM_CONDITIONAL(WITH_HCAL, test "x$build_hcal" = "xyes")
166
167 dnl =======================================================================================
168
169 AC_SUBST(CFLAGS)
170 AC_SUBST(LIBS)
171
172 dnl =======================================================================================
173
174 AC_OUTPUT([
175 Makefile
176 libhdate.spec
177 libhdate.pc
178 intl/Makefile
179 po/Makefile.in
180 src/Makefile
181 examples/Makefile
182 examples/hcal/Makefile
183 examples/ical/Makefile
184 examples/html/Makefile
185 examples/hebcal/Makefile
186 examples/bindings/Makefile
187 bindings/Makefile
188 bindings/python/Makefile
189 bindings/perl/Makefile
190 bindings/pascal/Makefile
191 ])
192
193 dnl ===========================================================================================
194 echo "
195 $PACKAGE-$VERSION
196
197 prefix: ${prefix}
198 compiler: ${CC}
199
200 have swig ${have_swig}
201 have free pascal ${have_pascal}
202 have python ${have_python}
203 have perl ${have_perl}
204
205 build hcal ${build_hcal}
206 build examples ${build_examples}
207
208 build python binding ${build_python}
209 build perl binding ${build_perl}
210 puild pascal binding ${build_pascal}
211
212 perl site lib path: $PE_MODULES_PATH
213 python site lib path: $PY_MODULES_PATH
214 pascal site lib path: $PA_MODULES_PATH
215 "
0 SUBDIRS = hcal ical html hebcal bindings
0 # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
1
2 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
3 # This Makefile.in is free software; the Free Software Foundation
4 # gives unlimited permission to copy and/or distribute it,
5 # with or without modifications, as long as this notice is preserved.
6
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
9 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 # PARTICULAR PURPOSE.
11
12
13 SHELL = @SHELL@
14
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 VPATH = @srcdir@
18 prefix = @prefix@
19 exec_prefix = @exec_prefix@
20
21 bindir = @bindir@
22 sbindir = @sbindir@
23 libexecdir = @libexecdir@
24 datadir = @datadir@
25 sysconfdir = @sysconfdir@
26 sharedstatedir = @sharedstatedir@
27 localstatedir = @localstatedir@
28 libdir = @libdir@
29 infodir = @infodir@
30 mandir = @mandir@
31 includedir = @includedir@
32 oldincludedir = /usr/include
33
34 DESTDIR =
35
36 pkgdatadir = $(datadir)/@PACKAGE@
37 pkglibdir = $(libdir)/@PACKAGE@
38 pkgincludedir = $(includedir)/@PACKAGE@
39
40 top_builddir = ..
41
42 ACLOCAL = @ACLOCAL@
43 AUTOCONF = @AUTOCONF@
44 AUTOMAKE = @AUTOMAKE@
45 AUTOHEADER = @AUTOHEADER@
46
47 INSTALL = @INSTALL@
48 INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
49 INSTALL_DATA = @INSTALL_DATA@
50 INSTALL_SCRIPT = @INSTALL_SCRIPT@
51 transform = @program_transform_name@
52
53 NORMAL_INSTALL = :
54 PRE_INSTALL = :
55 POST_INSTALL = :
56 NORMAL_UNINSTALL = :
57 PRE_UNINSTALL = :
58 POST_UNINSTALL = :
59 host_alias = @host_alias@
60 host_triplet = @host@
61 AR = @AR@
62 AS = @AS@
63 BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
64 CATOBJEXT = @CATOBJEXT@
65 CC = @CC@
66 CFLAGS = @CFLAGS@
67 CXX = @CXX@
68 CXXCPP = @CXXCPP@
69 DATADIRNAME = @DATADIRNAME@
70 DLLTOOL = @DLLTOOL@
71 ECHO = @ECHO@
72 EGREP = @EGREP@
73 EXEEXT = @EXEEXT@
74 F77 = @F77@
75 GCJ = @GCJ@
76 GCJFLAGS = @GCJFLAGS@
77 GENCAT = @GENCAT@
78 GLIBC2 = @GLIBC2@
79 GLIBC21 = @GLIBC21@
80 GMSGFMT = @GMSGFMT@
81 HAVE_ASPRINTF = @HAVE_ASPRINTF@
82 HAVE_LIB = @HAVE_LIB@
83 HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
84 HAVE_SNPRINTF = @HAVE_SNPRINTF@
85 HAVE_WPRINTF = @HAVE_WPRINTF@
86 INSTOBJEXT = @INSTOBJEXT@
87 INTLBISON = @INTLBISON@
88 INTLLIBS = @INTLLIBS@
89 INTLOBJS = @INTLOBJS@
90 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
91 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
92 LIB = @LIB@
93 LIBICONV = @LIBICONV@
94 LIBINTL = @LIBINTL@
95 LIBS = @LIBS@
96 LIBTOOL = @LIBTOOL@
97 LN_S = @LN_S@
98 LTLIB = @LTLIB@
99 LTLIBICONV = @LTLIBICONV@
100 LTLIBINTL = @LTLIBINTL@
101 MAINT = @MAINT@
102 MAKEINFO = @MAKEINFO@
103 MKINSTALLDIRS = @MKINSTALLDIRS@
104 OBJDUMP = @OBJDUMP@
105 OBJEXT = @OBJEXT@
106 PACKAGE = @PACKAGE@
107 PA_MODULES_PATH = @PA_MODULES_PATH@
108 PA_VERSION = @PA_VERSION@
109 PE_CFLAGS = @PE_CFLAGS@
110 PE_MODULES_PATH = @PE_MODULES_PATH@
111 PKG_CONFIG = @PKG_CONFIG@
112 POSUB = @POSUB@
113 PY_CFLAGS = @PY_CFLAGS@
114 PY_MODULES_PATH = @PY_MODULES_PATH@
115 PY_VERSION = @PY_VERSION@
116 RANLIB = @RANLIB@
117 RC = @RC@
118 STRIP = @STRIP@
119 USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
120 USE_NLS = @USE_NLS@
121 VERSION = @VERSION@
122 VERSION_INFO = @VERSION_INFO@
123 have_pascal = @have_pascal@
124 have_perl = @have_perl@
125 have_python = @have_python@
126 have_swig = @have_swig@
127
128 SUBDIRS = hcal ical html hebcal bindings
129 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
130 CONFIG_CLEAN_FILES =
131 DIST_COMMON = Makefile.am Makefile.in
132
133
134 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
135
136 TAR = tar
137 GZIP_ENV = --best
138 all: all-redirect
139 .SUFFIXES:
140 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
141 cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps examples/Makefile
142
143 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
144 cd $(top_builddir) \
145 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
146
147
148 # This directory's subdirectories are mostly independent; you can cd
149 # into them and run `make' without going through this Makefile.
150 # To change the values of `make' variables: instead of editing Makefiles,
151 # (1) if the variable is set in `config.status', edit `config.status'
152 # (which will cause the Makefiles to be regenerated when you run `make');
153 # (2) otherwise, pass the desired values on the `make' command line.
154
155 @SET_MAKE@
156
157 all-recursive install-data-recursive install-exec-recursive \
158 installdirs-recursive install-recursive uninstall-recursive \
159 check-recursive installcheck-recursive info-recursive dvi-recursive:
160 @set fnord $(MAKEFLAGS); amf=$$2; \
161 dot_seen=no; \
162 target=`echo $@ | sed s/-recursive//`; \
163 list='$(SUBDIRS)'; for subdir in $$list; do \
164 echo "Making $$target in $$subdir"; \
165 if test "$$subdir" = "."; then \
166 dot_seen=yes; \
167 local_target="$$target-am"; \
168 else \
169 local_target="$$target"; \
170 fi; \
171 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
172 || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
173 done; \
174 if test "$$dot_seen" = "no"; then \
175 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
176 fi; test -z "$$fail"
177
178 mostlyclean-recursive clean-recursive distclean-recursive \
179 maintainer-clean-recursive:
180 @set fnord $(MAKEFLAGS); amf=$$2; \
181 dot_seen=no; \
182 rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
183 rev="$$subdir $$rev"; \
184 test "$$subdir" != "." || dot_seen=yes; \
185 done; \
186 test "$$dot_seen" = "no" && rev=". $$rev"; \
187 target=`echo $@ | sed s/-recursive//`; \
188 for subdir in $$rev; do \
189 echo "Making $$target in $$subdir"; \
190 if test "$$subdir" = "."; then \
191 local_target="$$target-am"; \
192 else \
193 local_target="$$target"; \
194 fi; \
195 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
196 || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
197 done && test -z "$$fail"
198 tags-recursive:
199 list='$(SUBDIRS)'; for subdir in $$list; do \
200 test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
201 done
202
203 tags: TAGS
204
205 ID: $(HEADERS) $(SOURCES) $(LISP)
206 list='$(SOURCES) $(HEADERS)'; \
207 unique=`for i in $$list; do echo $$i; done | \
208 awk ' { files[$$0] = 1; } \
209 END { for (i in files) print i; }'`; \
210 here=`pwd` && cd $(srcdir) \
211 && mkid -f$$here/ID $$unique $(LISP)
212
213 TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
214 tags=; \
215 here=`pwd`; \
216 list='$(SUBDIRS)'; for subdir in $$list; do \
217 if test "$$subdir" = .; then :; else \
218 test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
219 fi; \
220 done; \
221 list='$(SOURCES) $(HEADERS)'; \
222 unique=`for i in $$list; do echo $$i; done | \
223 awk ' { files[$$0] = 1; } \
224 END { for (i in files) print i; }'`; \
225 test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
226 || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
227
228 mostlyclean-tags:
229
230 clean-tags:
231
232 distclean-tags:
233 -rm -f TAGS ID
234
235 maintainer-clean-tags:
236
237 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
238
239 subdir = examples
240
241 distdir: $(DISTFILES)
242 @for file in $(DISTFILES); do \
243 d=$(srcdir); \
244 if test -d $$d/$$file; then \
245 cp -pr $$d/$$file $(distdir)/$$file; \
246 else \
247 test -f $(distdir)/$$file \
248 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
249 || cp -p $$d/$$file $(distdir)/$$file || :; \
250 fi; \
251 done
252 for subdir in $(SUBDIRS); do \
253 if test "$$subdir" = .; then :; else \
254 test -d $(distdir)/$$subdir \
255 || mkdir $(distdir)/$$subdir \
256 || exit 1; \
257 chmod 777 $(distdir)/$$subdir; \
258 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
259 || exit 1; \
260 fi; \
261 done
262 info-am:
263 info: info-recursive
264 dvi-am:
265 dvi: dvi-recursive
266 check-am: all-am
267 check: check-recursive
268 installcheck-am:
269 installcheck: installcheck-recursive
270 install-exec-am:
271 install-exec: install-exec-recursive
272
273 install-data-am:
274 install-data: install-data-recursive
275
276 install-am: all-am
277 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
278 install: install-recursive
279 uninstall-am:
280 uninstall: uninstall-recursive
281 all-am: Makefile
282 all-redirect: all-recursive
283 install-strip:
284 $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
285 installdirs: installdirs-recursive
286 installdirs-am:
287
288
289 mostlyclean-generic:
290
291 clean-generic:
292
293 distclean-generic:
294 -rm -f Makefile $(CONFIG_CLEAN_FILES)
295 -rm -f config.cache config.log stamp-h stamp-h[0-9]*
296
297 maintainer-clean-generic:
298 mostlyclean-am: mostlyclean-tags mostlyclean-generic
299
300 mostlyclean: mostlyclean-recursive
301
302 clean-am: clean-tags clean-generic mostlyclean-am
303
304 clean: clean-recursive
305
306 distclean-am: distclean-tags distclean-generic clean-am
307 -rm -f libtool
308
309 distclean: distclean-recursive
310
311 maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
312 distclean-am
313 @echo "This command is intended for maintainers to use;"
314 @echo "it deletes files that may require special tools to rebuild."
315
316 maintainer-clean: maintainer-clean-recursive
317
318 .PHONY: install-data-recursive uninstall-data-recursive \
319 install-exec-recursive uninstall-exec-recursive installdirs-recursive \
320 uninstalldirs-recursive all-recursive check-recursive \
321 installcheck-recursive info-recursive dvi-recursive \
322 mostlyclean-recursive distclean-recursive clean-recursive \
323 maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
324 distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
325 dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
326 install-exec install-data-am install-data install-am install \
327 uninstall-am uninstall all-redirect all-am all installdirs-am \
328 installdirs mostlyclean-generic distclean-generic clean-generic \
329 maintainer-clean-generic clean mostlyclean distclean maintainer-clean
330
331
332 # Tell versions [3.59,3.63) of GNU make to not export all variables.
333 # Otherwise a system limit (for SysV at least) may be exceeded.
334 .NOEXPORT:
0
1 EXTRA_DIST = hdate_cpp.cpp hdate_python.py hdate_perl.pl hdate_pascal.pp
2
3 libhdatedocdir = ${prefix}/share/doc/libhdate/examples/bindings
4 libhdatedoc_DATA = hdate_cpp.cpp hdate_python.py hdate_perl.pl hdate_pascal.pp
0 # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
1
2 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
3 # This Makefile.in is free software; the Free Software Foundation
4 # gives unlimited permission to copy and/or distribute it,
5 # with or without modifications, as long as this notice is preserved.
6
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
9 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 # PARTICULAR PURPOSE.
11
12
13 SHELL = @SHELL@
14
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 VPATH = @srcdir@
18 prefix = @prefix@
19 exec_prefix = @exec_prefix@
20
21 bindir = @bindir@
22 sbindir = @sbindir@
23 libexecdir = @libexecdir@
24 datadir = @datadir@
25 sysconfdir = @sysconfdir@
26 sharedstatedir = @sharedstatedir@
27 localstatedir = @localstatedir@
28 libdir = @libdir@
29 infodir = @infodir@
30 mandir = @mandir@
31 includedir = @includedir@
32 oldincludedir = /usr/include
33
34 DESTDIR =
35
36 pkgdatadir = $(datadir)/@PACKAGE@
37 pkglibdir = $(libdir)/@PACKAGE@
38 pkgincludedir = $(includedir)/@PACKAGE@
39
40 top_builddir = ../..
41
42 ACLOCAL = @ACLOCAL@
43 AUTOCONF = @AUTOCONF@
44 AUTOMAKE = @AUTOMAKE@
45 AUTOHEADER = @AUTOHEADER@
46
47 INSTALL = @INSTALL@
48 INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
49 INSTALL_DATA = @INSTALL_DATA@
50 INSTALL_SCRIPT = @INSTALL_SCRIPT@
51 transform = @program_transform_name@
52
53 NORMAL_INSTALL = :
54 PRE_INSTALL = :
55 POST_INSTALL = :
56 NORMAL_UNINSTALL = :
57 PRE_UNINSTALL = :
58 POST_UNINSTALL = :
59 host_alias = @host_alias@
60 host_triplet = @host@
61 AR = @AR@
62 AS = @AS@
63 BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
64 CATOBJEXT = @CATOBJEXT@
65 CC = @CC@
66 CFLAGS = @CFLAGS@
67 CXX = @CXX@
68 CXXCPP = @CXXCPP@
69 DATADIRNAME = @DATADIRNAME@
70 DLLTOOL = @DLLTOOL@
71 ECHO = @ECHO@
72 EGREP = @EGREP@
73 EXEEXT = @EXEEXT@
74 F77 = @F77@
75 GCJ = @GCJ@
76 GCJFLAGS = @GCJFLAGS@
77 GENCAT = @GENCAT@
78 GLIBC2 = @GLIBC2@
79 GLIBC21 = @GLIBC21@
80 GMSGFMT = @GMSGFMT@
81 HAVE_ASPRINTF = @HAVE_ASPRINTF@
82 HAVE_LIB = @HAVE_LIB@
83 HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
84 HAVE_SNPRINTF = @HAVE_SNPRINTF@
85 HAVE_WPRINTF = @HAVE_WPRINTF@
86 INSTOBJEXT = @INSTOBJEXT@
87 INTLBISON = @INTLBISON@
88 INTLLIBS = @INTLLIBS@
89 INTLOBJS = @INTLOBJS@
90 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
91 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
92 LIB = @LIB@
93 LIBICONV = @LIBICONV@
94 LIBINTL = @LIBINTL@
95 LIBS = @LIBS@
96 LIBTOOL = @LIBTOOL@
97 LN_S = @LN_S@
98 LTLIB = @LTLIB@
99 LTLIBICONV = @LTLIBICONV@
100 LTLIBINTL = @LTLIBINTL@
101 MAINT = @MAINT@
102 MAKEINFO = @MAKEINFO@
103 MKINSTALLDIRS = @MKINSTALLDIRS@
104 OBJDUMP = @OBJDUMP@
105 OBJEXT = @OBJEXT@
106 PACKAGE = @PACKAGE@
107 PA_MODULES_PATH = @PA_MODULES_PATH@
108 PA_VERSION = @PA_VERSION@
109 PE_CFLAGS = @PE_CFLAGS@
110 PE_MODULES_PATH = @PE_MODULES_PATH@
111 PKG_CONFIG = @PKG_CONFIG@
112 POSUB = @POSUB@
113 PY_CFLAGS = @PY_CFLAGS@
114 PY_MODULES_PATH = @PY_MODULES_PATH@
115 PY_VERSION = @PY_VERSION@
116 RANLIB = @RANLIB@
117 RC = @RC@
118 STRIP = @STRIP@
119 USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
120 USE_NLS = @USE_NLS@
121 VERSION = @VERSION@
122 VERSION_INFO = @VERSION_INFO@
123 have_pascal = @have_pascal@
124 have_perl = @have_perl@
125 have_python = @have_python@
126 have_swig = @have_swig@
127
128 EXTRA_DIST = hdate_cpp.cpp hdate_python.py hdate_perl.pl hdate_pascal.pp
129
130 libhdatedocdir = ${prefix}/share/doc/libhdate/examples/bindings
131 libhdatedoc_DATA = hdate_cpp.cpp hdate_python.py hdate_perl.pl hdate_pascal.pp
132 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
133 CONFIG_CLEAN_FILES =
134 DATA = $(libhdatedoc_DATA)
135
136 DIST_COMMON = Makefile.am Makefile.in
137
138
139 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
140
141 TAR = tar
142 GZIP_ENV = --best
143 all: all-redirect
144 .SUFFIXES:
145 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
146 cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps examples/bindings/Makefile
147
148 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
149 cd $(top_builddir) \
150 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
151
152
153 install-libhdatedocDATA: $(libhdatedoc_DATA)
154 @$(NORMAL_INSTALL)
155 $(mkinstalldirs) $(DESTDIR)$(libhdatedocdir)
156 @list='$(libhdatedoc_DATA)'; for p in $$list; do \
157 if test -f $(srcdir)/$$p; then \
158 echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(libhdatedocdir)/$$p"; \
159 $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(libhdatedocdir)/$$p; \
160 else if test -f $$p; then \
161 echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libhdatedocdir)/$$p"; \
162 $(INSTALL_DATA) $$p $(DESTDIR)$(libhdatedocdir)/$$p; \
163 fi; fi; \
164 done
165
166 uninstall-libhdatedocDATA:
167 @$(NORMAL_UNINSTALL)
168 list='$(libhdatedoc_DATA)'; for p in $$list; do \
169 rm -f $(DESTDIR)$(libhdatedocdir)/$$p; \
170 done
171 tags: TAGS
172 TAGS:
173
174
175 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
176
177 subdir = examples/bindings
178
179 distdir: $(DISTFILES)
180 @for file in $(DISTFILES); do \
181 d=$(srcdir); \
182 if test -d $$d/$$file; then \
183 cp -pr $$d/$$file $(distdir)/$$file; \
184 else \
185 test -f $(distdir)/$$file \
186 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
187 || cp -p $$d/$$file $(distdir)/$$file || :; \
188 fi; \
189 done
190 info-am:
191 info: info-am
192 dvi-am:
193 dvi: dvi-am
194 check-am: all-am
195 check: check-am
196 installcheck-am:
197 installcheck: installcheck-am
198 install-exec-am:
199 install-exec: install-exec-am
200
201 install-data-am: install-libhdatedocDATA
202 install-data: install-data-am
203
204 install-am: all-am
205 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
206 install: install-am
207 uninstall-am: uninstall-libhdatedocDATA
208 uninstall: uninstall-am
209 all-am: Makefile $(DATA)
210 all-redirect: all-am
211 install-strip:
212 $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
213 installdirs:
214 $(mkinstalldirs) $(DESTDIR)$(libhdatedocdir)
215
216
217 mostlyclean-generic:
218
219 clean-generic:
220
221 distclean-generic:
222 -rm -f Makefile $(CONFIG_CLEAN_FILES)
223 -rm -f config.cache config.log stamp-h stamp-h[0-9]*
224
225 maintainer-clean-generic:
226 mostlyclean-am: mostlyclean-generic
227
228 mostlyclean: mostlyclean-am
229
230 clean-am: clean-generic mostlyclean-am
231
232 clean: clean-am
233
234 distclean-am: distclean-generic clean-am
235 -rm -f libtool
236
237 distclean: distclean-am
238
239 maintainer-clean-am: maintainer-clean-generic distclean-am
240 @echo "This command is intended for maintainers to use;"
241 @echo "it deletes files that may require special tools to rebuild."
242
243 maintainer-clean: maintainer-clean-am
244
245 .PHONY: uninstall-libhdatedocDATA install-libhdatedocDATA tags distdir \
246 info-am info dvi-am dvi check check-am installcheck-am installcheck \
247 install-exec-am install-exec install-data-am install-data install-am \
248 install uninstall-am uninstall all-redirect all-am all installdirs \
249 mostlyclean-generic distclean-generic clean-generic \
250 maintainer-clean-generic clean mostlyclean distclean maintainer-clean
251
252
253 # Tell versions [3.59,3.63) of GNU make to not export all variables.
254 # Otherwise a system limit (for SysV at least) may be exceeded.
255 .NOEXPORT:
0 // hdate_cpp.cpp
1 // example file for libhdate.
2 //
3
4 //
5 // compile: g++ -lm -lhdate -o hdate_cpp hdate_cpp.cpp
6 //
7
8 #include <iostream>
9 #include <hdatepp.h>
10
11 using namespace std;
12 using namespace hdate;
13
14 int
15 main (int argc, char* argv[])
16 {
17 // create a new Hdate object
18 Hdate h;
19
20 // print gregorian date
21 cout << "Today is :\n";
22 cout << h.get_gday () << "," << h.get_gmonth () << "," << h.get_gyear () << "\n";
23
24 // print hebrew date: 0 - long format
25 cout << h.get_format_date (0);
26 cout << "\n";
27
28 return 0;
29 }
0 {$MODE OBJFPC}
1 {$IFDEF MSWINDOWS}
2 {$APPTYPE CONSOLE} //Make sure that in Windows we will be in a console mode
3 {$ENDIF}
4 program hdate_demo;
5 uses hdate_class, hdate;
6
7 var
8 h : THdateClass;
9 diaspora : Integer;
10
11 begin
12 h := THdateClass.Create;
13 diaspora := 0;
14
15 try
16
17 // print gregorian date
18 write ('Today : ', h.GregDay, ',');
19 write (h.GregMonth, ',');
20 writeln (h.GregYear);
21
22 // print hebrew date
23 writeln (h.get_format_date (diaspora));
24 finally
25 h.Free;
26 end;
27 end.
0 #! /usr/bin/perl
1
2 # Use the hdate perl module
3 use hdate;
4
5 # Create a new Hdate object
6 $h = hdatec::new_Hdate();
7
8 # Print gregorian date
9 print "Today is:\n";
10 print hdatec::Hdate_get_gday($h) . "," . hdatec::Hdate_get_gmonth($h) . "," . hdatec::Hdate_get_gyear($h) . "\n";
11
12 # Print hebrew date: 0 - long format
13 print hdatec::Hdate_get_format_date ($h, 0) . "\n";
0 #! /usr/bin/python
1
2 # Import the hdate library
3 from hdate import *;
4
5 # Create a new Hdate object
6 h = Hdate();
7
8 # Print gregorian date
9 print "Today is:"
10 print str (h.get_gday ()) + "," + str (h.get_gmonth()) + "," + str (h.get_gyear ())
11
12 # Print hebrew date: 0 - long format
13 print h.get_format_date (0);
0 EXTRA_DIST = hdate.1 hcal.1
1
2 if WITH_HCAL
3
4 INCLUDES=-I$(top_srcdir)/src
5
6 DEPS= $(top_builddir)/src/libhdate.la
7 ldadd= $(top_builddir)/src/libhdate.la -lm
8
9 bin_PROGRAMS= hdate hcal
10
11 hdate_SOURCES = hdate.c
12 hdate_LDFLAGS =
13 hdate_DEPENDENCIES = $(DEPS)
14 hdate_LDADD = $(ldadd)
15
16 hcal_SOURCES = hcal.c
17 hcal_LDFLAGS =
18 hcal_DEPENDENCIES = $(DEPS)
19 hcal_LDADD = $(ldadd)
20
21 man_MANS = hdate.1 hcal.1
22
23 endif
24
25 libhdatedocdir = ${prefix}/share/doc/libhdate/examples/hcal
26 libhdatedoc_DATA = hcal.c hdate.c
0 # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
1
2 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
3 # This Makefile.in is free software; the Free Software Foundation
4 # gives unlimited permission to copy and/or distribute it,
5 # with or without modifications, as long as this notice is preserved.
6
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
9 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 # PARTICULAR PURPOSE.
11
12
13 SHELL = @SHELL@
14
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 VPATH = @srcdir@
18 prefix = @prefix@
19 exec_prefix = @exec_prefix@
20
21 bindir = @bindir@
22 sbindir = @sbindir@
23 libexecdir = @libexecdir@
24 datadir = @datadir@
25 sysconfdir = @sysconfdir@
26 sharedstatedir = @sharedstatedir@
27 localstatedir = @localstatedir@
28 libdir = @libdir@
29 infodir = @infodir@
30 mandir = @mandir@
31 includedir = @includedir@
32 oldincludedir = /usr/include
33
34 DESTDIR =
35
36 pkgdatadir = $(datadir)/@PACKAGE@
37 pkglibdir = $(libdir)/@PACKAGE@
38 pkgincludedir = $(includedir)/@PACKAGE@
39
40 top_builddir = ../..
41
42 ACLOCAL = @ACLOCAL@
43 AUTOCONF = @AUTOCONF@
44 AUTOMAKE = @AUTOMAKE@
45 AUTOHEADER = @AUTOHEADER@
46
47 INSTALL = @INSTALL@
48 INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
49 INSTALL_DATA = @INSTALL_DATA@
50 INSTALL_SCRIPT = @INSTALL_SCRIPT@
51 transform = @program_transform_name@
52
53 NORMAL_INSTALL = :
54 PRE_INSTALL = :
55 POST_INSTALL = :
56 NORMAL_UNINSTALL = :
57 PRE_UNINSTALL = :
58 POST_UNINSTALL = :
59 host_alias = @host_alias@
60 host_triplet = @host@
61 AR = @AR@
62 AS = @AS@
63 BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
64 CATOBJEXT = @CATOBJEXT@
65 CC = @CC@
66 CFLAGS = @CFLAGS@
67 CXX = @CXX@
68 CXXCPP = @CXXCPP@
69 DATADIRNAME = @DATADIRNAME@
70 DLLTOOL = @DLLTOOL@
71 ECHO = @ECHO@
72 EGREP = @EGREP@
73 EXEEXT = @EXEEXT@
74 F77 = @F77@
75 GCJ = @GCJ@
76 GCJFLAGS = @GCJFLAGS@
77 GENCAT = @GENCAT@
78 GLIBC2 = @GLIBC2@
79 GLIBC21 = @GLIBC21@
80 GMSGFMT = @GMSGFMT@
81 HAVE_ASPRINTF = @HAVE_ASPRINTF@
82 HAVE_LIB = @HAVE_LIB@
83 HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
84 HAVE_SNPRINTF = @HAVE_SNPRINTF@
85 HAVE_WPRINTF = @HAVE_WPRINTF@
86 INSTOBJEXT = @INSTOBJEXT@
87 INTLBISON = @INTLBISON@
88 INTLLIBS = @INTLLIBS@
89 INTLOBJS = @INTLOBJS@
90 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
91 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
92 LIB = @LIB@
93 LIBICONV = @LIBICONV@
94 LIBINTL = @LIBINTL@
95 LIBS = @LIBS@
96 LIBTOOL = @LIBTOOL@
97 LN_S = @LN_S@
98 LTLIB = @LTLIB@
99 LTLIBICONV = @LTLIBICONV@
100 LTLIBINTL = @LTLIBINTL@
101 MAINT = @MAINT@
102 MAKEINFO = @MAKEINFO@
103 MKINSTALLDIRS = @MKINSTALLDIRS@
104 OBJDUMP = @OBJDUMP@
105 OBJEXT = @OBJEXT@
106 PACKAGE = @PACKAGE@
107 PA_MODULES_PATH = @PA_MODULES_PATH@
108 PA_VERSION = @PA_VERSION@
109 PE_CFLAGS = @PE_CFLAGS@
110 PE_MODULES_PATH = @PE_MODULES_PATH@
111 PKG_CONFIG = @PKG_CONFIG@
112 POSUB = @POSUB@
113 PY_CFLAGS = @PY_CFLAGS@
114 PY_MODULES_PATH = @PY_MODULES_PATH@
115 PY_VERSION = @PY_VERSION@
116 RANLIB = @RANLIB@
117 RC = @RC@
118 STRIP = @STRIP@
119 USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
120 USE_NLS = @USE_NLS@
121 VERSION = @VERSION@
122 VERSION_INFO = @VERSION_INFO@
123 have_pascal = @have_pascal@
124 have_perl = @have_perl@
125 have_python = @have_python@
126 have_swig = @have_swig@
127
128 EXTRA_DIST = hdate.1 hcal.1
129
130 @WITH_HCAL_TRUE@INCLUDES = -I$(top_srcdir)/src
131
132 @WITH_HCAL_TRUE@DEPS = $(top_builddir)/src/libhdate.la
133 @WITH_HCAL_TRUE@ldadd = $(top_builddir)/src/libhdate.la -lm
134
135 @WITH_HCAL_TRUE@bin_PROGRAMS = hdate hcal
136
137 @WITH_HCAL_TRUE@hdate_SOURCES = hdate.c
138 @WITH_HCAL_TRUE@hdate_LDFLAGS =
139 @WITH_HCAL_TRUE@hdate_DEPENDENCIES = $(DEPS)
140 @WITH_HCAL_TRUE@hdate_LDADD = $(ldadd)
141
142 @WITH_HCAL_TRUE@hcal_SOURCES = hcal.c
143 @WITH_HCAL_TRUE@hcal_LDFLAGS =
144 @WITH_HCAL_TRUE@hcal_DEPENDENCIES = $(DEPS)
145 @WITH_HCAL_TRUE@hcal_LDADD = $(ldadd)
146
147 @WITH_HCAL_TRUE@man_MANS = hdate.1 hcal.1
148
149 libhdatedocdir = ${prefix}/share/doc/libhdate/examples/hcal
150 libhdatedoc_DATA = hcal.c hdate.c
151 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
152 CONFIG_CLEAN_FILES =
153 @WITH_HCAL_TRUE@bin_PROGRAMS = hdate$(EXEEXT) hcal$(EXEEXT)
154 PROGRAMS = $(bin_PROGRAMS)
155
156
157 DEFS = @DEFS@ -I. -I$(srcdir)
158 CPPFLAGS = @CPPFLAGS@
159 LDFLAGS = @LDFLAGS@
160 @WITH_HCAL_TRUE@hdate_OBJECTS = hdate.$(OBJEXT)
161 @WITH_HCAL_TRUE@hcal_OBJECTS = hcal.$(OBJEXT)
162 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
163 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
164 CCLD = $(CC)
165 LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
166 man1dir = $(mandir)/man1
167 MANS = $(man_MANS)
168
169 NROFF = nroff
170 DATA = $(libhdatedoc_DATA)
171
172 DIST_COMMON = Makefile.am Makefile.in
173
174
175 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
176
177 TAR = tar
178 GZIP_ENV = --best
179 SOURCES = $(hdate_SOURCES) $(hcal_SOURCES)
180 OBJECTS = $(hdate_OBJECTS) $(hcal_OBJECTS)
181
182 all: all-redirect
183 .SUFFIXES:
184 .SUFFIXES: .S .c .lo .o .obj .s
185 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
186 cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps examples/hcal/Makefile
187
188 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
189 cd $(top_builddir) \
190 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
191
192
193 mostlyclean-binPROGRAMS:
194
195 clean-binPROGRAMS:
196 -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
197
198 distclean-binPROGRAMS:
199
200 maintainer-clean-binPROGRAMS:
201
202 install-binPROGRAMS: $(bin_PROGRAMS)
203 @$(NORMAL_INSTALL)
204 $(mkinstalldirs) $(DESTDIR)$(bindir)
205 @list='$(bin_PROGRAMS)'; for p in $$list; do \
206 if test -f $$p; then \
207 echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
208 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
209 else :; fi; \
210 done
211
212 uninstall-binPROGRAMS:
213 @$(NORMAL_UNINSTALL)
214 list='$(bin_PROGRAMS)'; for p in $$list; do \
215 rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
216 done
217
218 .c.o:
219 $(COMPILE) -c $<
220
221 # FIXME: We should only use cygpath when building on Windows,
222 # and only if it is available.
223 .c.obj:
224 $(COMPILE) -c `cygpath -w $<`
225
226 .s.o:
227 $(COMPILE) -c $<
228
229 .S.o:
230 $(COMPILE) -c $<
231
232 mostlyclean-compile:
233 -rm -f *.o core *.core
234 -rm -f *.$(OBJEXT)
235
236 clean-compile:
237
238 distclean-compile:
239 -rm -f *.tab.c
240
241 maintainer-clean-compile:
242
243 .c.lo:
244 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
245
246 .s.lo:
247 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
248
249 .S.lo:
250 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
251
252 mostlyclean-libtool:
253 -rm -f *.lo
254
255 clean-libtool:
256 -rm -rf .libs _libs
257
258 distclean-libtool:
259
260 maintainer-clean-libtool:
261
262 hdate$(EXEEXT): $(hdate_OBJECTS) $(hdate_DEPENDENCIES)
263 @rm -f hdate$(EXEEXT)
264 $(LINK) $(hdate_LDFLAGS) $(hdate_OBJECTS) $(hdate_LDADD) $(LIBS)
265
266 hcal$(EXEEXT): $(hcal_OBJECTS) $(hcal_DEPENDENCIES)
267 @rm -f hcal$(EXEEXT)
268 $(LINK) $(hcal_LDFLAGS) $(hcal_OBJECTS) $(hcal_LDADD) $(LIBS)
269
270 install-man1:
271 $(mkinstalldirs) $(DESTDIR)$(man1dir)
272 @list='$(man1_MANS)'; \
273 l2='$(man_MANS)'; for i in $$l2; do \
274 case "$$i" in \
275 *.1*) list="$$list $$i" ;; \
276 esac; \
277 done; \
278 for i in $$list; do \
279 if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
280 else file=$$i; fi; \
281 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
282 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
283 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
284 echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
285 $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
286 done
287
288 uninstall-man1:
289 @list='$(man1_MANS)'; \
290 l2='$(man_MANS)'; for i in $$l2; do \
291 case "$$i" in \
292 *.1*) list="$$list $$i" ;; \
293 esac; \
294 done; \
295 for i in $$list; do \
296 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
297 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
298 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
299 echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
300 rm -f $(DESTDIR)$(man1dir)/$$inst; \
301 done
302 install-man: $(MANS)
303 @$(NORMAL_INSTALL)
304 $(MAKE) $(AM_MAKEFLAGS) install-man1
305 uninstall-man:
306 @$(NORMAL_UNINSTALL)
307 $(MAKE) $(AM_MAKEFLAGS) uninstall-man1
308
309 install-libhdatedocDATA: $(libhdatedoc_DATA)
310 @$(NORMAL_INSTALL)
311 $(mkinstalldirs) $(DESTDIR)$(libhdatedocdir)
312 @list='$(libhdatedoc_DATA)'; for p in $$list; do \
313 if test -f $(srcdir)/$$p; then \
314 echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(libhdatedocdir)/$$p"; \
315 $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(libhdatedocdir)/$$p; \
316 else if test -f $$p; then \
317 echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libhdatedocdir)/$$p"; \
318 $(INSTALL_DATA) $$p $(DESTDIR)$(libhdatedocdir)/$$p; \
319 fi; fi; \
320 done
321
322 uninstall-libhdatedocDATA:
323 @$(NORMAL_UNINSTALL)
324 list='$(libhdatedoc_DATA)'; for p in $$list; do \
325 rm -f $(DESTDIR)$(libhdatedocdir)/$$p; \
326 done
327
328 tags: TAGS
329
330 ID: $(HEADERS) $(SOURCES) $(LISP)
331 list='$(SOURCES) $(HEADERS)'; \
332 unique=`for i in $$list; do echo $$i; done | \
333 awk ' { files[$$0] = 1; } \
334 END { for (i in files) print i; }'`; \
335 here=`pwd` && cd $(srcdir) \
336 && mkid -f$$here/ID $$unique $(LISP)
337
338 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
339 tags=; \
340 here=`pwd`; \
341 list='$(SOURCES) $(HEADERS)'; \
342 unique=`for i in $$list; do echo $$i; done | \
343 awk ' { files[$$0] = 1; } \
344 END { for (i in files) print i; }'`; \
345 test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
346 || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
347
348 mostlyclean-tags:
349
350 clean-tags:
351
352 distclean-tags:
353 -rm -f TAGS ID
354
355 maintainer-clean-tags:
356
357 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
358
359 subdir = examples/hcal
360
361 distdir: $(DISTFILES)
362 @for file in $(DISTFILES); do \
363 d=$(srcdir); \
364 if test -d $$d/$$file; then \
365 cp -pr $$d/$$file $(distdir)/$$file; \
366 else \
367 test -f $(distdir)/$$file \
368 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
369 || cp -p $$d/$$file $(distdir)/$$file || :; \
370 fi; \
371 done
372 hcal.o: hcal.c ../../src/hdate.h
373 hdate.o: hdate.c ../../src/hdate.h
374
375 info-am:
376 info: info-am
377 dvi-am:
378 dvi: dvi-am
379 check-am: all-am
380 check: check-am
381 installcheck-am:
382 installcheck: installcheck-am
383 install-exec-am: install-binPROGRAMS
384 install-exec: install-exec-am
385
386 install-data-am: install-man install-libhdatedocDATA
387 install-data: install-data-am
388
389 install-am: all-am
390 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
391 install: install-am
392 uninstall-am: uninstall-binPROGRAMS uninstall-man \
393 uninstall-libhdatedocDATA
394 uninstall: uninstall-am
395 all-am: Makefile $(PROGRAMS) $(MANS) $(DATA)
396 all-redirect: all-am
397 install-strip:
398 $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
399 installdirs:
400 $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 \
401 $(DESTDIR)$(libhdatedocdir)
402
403
404 mostlyclean-generic:
405
406 clean-generic:
407
408 distclean-generic:
409 -rm -f Makefile $(CONFIG_CLEAN_FILES)
410 -rm -f config.cache config.log stamp-h stamp-h[0-9]*
411
412 maintainer-clean-generic:
413 mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
414 mostlyclean-libtool mostlyclean-tags \
415 mostlyclean-generic
416
417 mostlyclean: mostlyclean-am
418
419 clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
420 clean-generic mostlyclean-am
421
422 clean: clean-am
423
424 distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
425 distclean-tags distclean-generic clean-am
426 -rm -f libtool
427
428 distclean: distclean-am
429
430 maintainer-clean-am: maintainer-clean-binPROGRAMS \
431 maintainer-clean-compile maintainer-clean-libtool \
432 maintainer-clean-tags maintainer-clean-generic \
433 distclean-am
434 @echo "This command is intended for maintainers to use;"
435 @echo "it deletes files that may require special tools to rebuild."
436
437 maintainer-clean: maintainer-clean-am
438
439 .PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
440 maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
441 mostlyclean-compile distclean-compile clean-compile \
442 maintainer-clean-compile mostlyclean-libtool distclean-libtool \
443 clean-libtool maintainer-clean-libtool install-man1 uninstall-man1 \
444 install-man uninstall-man uninstall-libhdatedocDATA \
445 install-libhdatedocDATA tags mostlyclean-tags distclean-tags clean-tags \
446 maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \
447 installcheck-am installcheck install-exec-am install-exec \
448 install-data-am install-data install-am install uninstall-am uninstall \
449 all-redirect all-am all installdirs mostlyclean-generic \
450 distclean-generic clean-generic maintainer-clean-generic clean \
451 mostlyclean distclean maintainer-clean
452
453
454 # Tell versions [3.59,3.63) of GNU make to not export all variables.
455 # Otherwise a system limit (for SysV at least) may be exceeded.
456 .NOEXPORT:
0 .\" .UC 4
1 .TH "HCAL" "1" "2 Mar 2005" "Yaacov Zamir" "libhdate"
2 .SH "NAME"
3 hcal \- Hebrew date
4 .PP
5 example programs for libhdate, a library that help use hebrew dates.
6 .PP
7 LibHdate is a small C,C++ library for Hebrew dates,
8 holidays, and reading sequence (parasha). It is using
9 the source code from Amos Shapir's "hdate" package fixed and
10 patched by Nadav Har'El. The Torah reading sequence
11 is from tables by Zvi Har'El.
12 .SH "SYNOPSIS"
13 .B hcal
14 [\-hdi]
15 .PP
16 [ [ month ] year ]
17 .SH "DESCRIPTION"
18 .I Hcal
19 prints a calendar with both common and Hebrew dates for the
20 specified month, or the whole year if no month is specified.
21 If no arguments are given, it prints the current month.
22 Major holidays are marked by a `*', other holidays by a `+',
23 fast days by a `\-'.
24 .PP
25 If the year is greater than 3000,
26 .I hcal
27 takes the given date as a Hebrew date, and translates it
28 back to the common calendar.
29 Months are numbered with Tishrey being 1 and Elul 12; Adar I and Adar II are months 13 and 14.
30 .PP
31 .I \-h
32 : Print output in html format.
33 .PP
34 .I \-d
35 : Use diaspora reading and holidays.
36 .PP
37 .I \-i
38 : Use external css file "./hcal.css".
39 .PP
40 .SH "SEE ALSO"
41 date(1), cal(1), hdate(1), hebcal(1), remind(1), hdate.h(3), hdate_struct(3)
42 .SH "AUTHOR"
43 Yaacov Zamir 2005, text copied from Amos Shapir's hdate man file.
0
1 /* hcal.c
2 * Example file for libhdate.
3 *
4 * compile:
5 * gcc `pkg-config --libs --cflags libhdate` hcal.c -o hcal
6 *
7 * Copyright: 2004 (c) Yaacov Zamir
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) 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, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22 * 02111-1307, USA.
23 */
24
25 #include <stdio.h> /* For printf */
26 #include <hdate.h> /* For hebrew date */
27 #include <stdlib.h> /* For atoi */
28 #include <locale.h> /* For setlocale */
29 #include <unistd.h> /* For getopt */
30
31 #define FALSE 0
32 #define TRUE -1
33
34 /* print help */
35 int
36 print_help (char *program)
37 {
38 printf ("hcal - example program for libhdate\n\n");
39
40 printf ("USAGE: %s [-hid] ", program);
41 printf (" [[month] year]\n");
42
43 printf ("OPTIONS:\n");
44 printf (" -h : Print html format.\n");
45 printf (" -d : Use diaspora reading and holidays.\n");
46 printf (" -i : Use external css file \"./hcal.css\".\n");
47
48 return 0;
49 }
50
51 /* print html css part */
52 int
53 print_css (int opt_i)
54 {
55 if (opt_i)
56 {
57 printf ("\n\t@import \"hcal.css\";\n");
58
59 }
60 else
61 {
62 printf ("\n\
63 body {\n\
64 direction: rtl;\n\
65 }\n\
66 \n\
67 img { \n\
68 margin:0;\n\
69 padding: 0;\n\
70 vertical-align: middle;\n\
71 border: 0;\n\
72 }\n\
73 \n\
74 p {\n\
75 \n\
76 }\n\
77 \n\
78 table {\n\
79 width: 80%;\n\
80 table-layout: fixed;\n\
81 font-size: 14pt;\n\
82 border: solid #aaaaaa;\n\
83 }\n\
84 \n\
85 th {\n\
86 background-color: #aaaaaa;\n\
87 text-align: center;\n\
88 }\n\
89 \n\
90 td {\n\
91 text-align: center;\n\
92 }\n\
93 \n\
94 div.today {\n\
95 \n\
96 }\n\
97 \n\
98 div.gmonth {\n\
99 font-size: 16pt;\n\
100 }\n\
101 \n\
102 div.gyear {\n\
103 font-size: 24pt;\n\
104 font-weight: bold;\n\
105 }\n\
106 \n\
107 div.gday {\n\
108 \n\
109 }\n\
110 \n\
111 div.hmonth {\n\
112 font-size: 16pt;\n\
113 }\n\
114 \n\
115 div.hyear {\n\
116 font-size: 24pt;\n\
117 font-weight: bold;\n\
118 }\n\
119 \n\
120 div.hday {\n\
121 \n\
122 }\n\
123 \n\
124 div.holiday_name {\n\
125 \n\
126 }\n\
127 \n\
128 td.sat {\n\
129 border: solid #777777;\n\
130 }\n\
131 \n\
132 td.regular {\n\
133 border: solid #aaaaaa;\n\
134 }\n\
135 \n\
136 td.holiday {\n\
137 color: #990000;\n\
138 border: solid #888888;\n\
139 }\n\
140 \n\
141 td.out_of_month {\n\
142 color: #dddddd;\n\
143 border: solid #dddddd;\n\
144 }\n");
145 }
146
147 return 0;
148 }
149
150 /* print html header */
151 int
152 print_html_header (int opt_i)
153 {
154 printf ("\
155 <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\n\
156 \"http://www.w3.org/TR/html4/strict.dtd\">\n\
157 <html>\n\
158 <head>\n\
159 <meta name=\"generator\" content=\"hcal (libhdate)\">\n\
160 <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n\
161 <style title=\"Normal\" type=\"text/css\" media=\"all\">");
162
163 print_css (opt_i);
164
165 printf ("</style>\n");
166
167 /* some alternative css styles */
168 printf ("<link rel=\"alternate stylesheet\" title=\"High contrast\" \
169 type=\"text/css\" media=\"screen\" href=\"high_contrast.css\">");
170 printf ("</style>\n\
171 <link rel=\"alternate stylesheet\" title=\"Colorful\" \
172 type=\"text/css\" media=\"screen\" href=\"colorful.css\">");
173 printf ("</style>\n\
174 <link rel=\"alternate stylesheet\" title=\"Print\" \
175 type=\"text/css\" media=\"all\" href=\"print.css\">");
176
177 printf ("\
178 <title>Hebrew Calendar</title>\n\
179 </head>\n\
180 <body>\n");
181
182 return 0;
183 }
184
185 int
186 print_html_footer ()
187 {
188 printf ("<!-- <p>\n\
189 <a href=\"http://validator.w3.org/check/referer\">\n<img \
190 src=\"http://www.w3.org/Icons/valid-html401\"\n\
191 alt=\"Valid HTML 4.01!\" height=\"31\" width=\"88\" />\n</a>\n");
192 printf ("<a href=\"http://jigsaw.w3.org/css-validator\">\n\
193 <img src=\"http://www.w3.org/Icons/valid-css\" alt=\"Valid CSS!\">\n\
194 </a>\n</p> -->\n");
195
196 printf ("</body>\n</html>\n");
197
198 return 0;
199 }
200
201 /* print year and month part */
202 int
203 print_header (int month, int year, int opt_h, int opt_d)
204 {
205 hdate_struct h1, h2;
206 int j;
207
208 /* set dates for begining and end of calendar */
209 hdate_set_gdate (&h1, 1, month, year);
210 hdate_set_gdate (&h2, 1, month % 12 + 1, year);
211
212 /* Print Gregorian month and year */
213 if (opt_h)
214 {
215 printf ("<div class=\"gmonth\">\n");
216 printf ("%s\n", hdate_get_month_string (h1.gd_mon, FALSE));
217 printf ("</div>\n");
218
219 printf ("<div class=\"gyear\">\n");
220 printf ("%d\n", h1.gd_year);
221 printf ("</div>\n");
222 }
223 else
224 {
225 printf ("%s %d\n", hdate_get_month_string (h1.gd_mon, FALSE),
226 h1.gd_year);
227 }
228
229 /* Print Hebrew month and year */
230 if (opt_h)
231 {
232 printf ("<div class=\"hmonth\">\n");
233 }
234
235 if (h1.hd_mon != h2.hd_mon)
236 {
237 printf ("%s-",
238 hdate_get_hebrew_month_string (h1.hd_mon, FALSE));
239 }
240 printf ("%s ", hdate_get_hebrew_month_string (h2.hd_mon, FALSE));
241
242 if (opt_h)
243 {
244 printf ("\n</div>\n");
245
246 printf ("<div class=\"hyear\">\n");
247 }
248
249 printf ("%s\n", hdate_get_int_string (h1.hd_year));
250
251 if (opt_h)
252 {
253 printf ("</div>\n");
254
255 printf ("<div class=\"month_table\">\n");
256 printf ("<table>\n");
257 printf ("<tr>\n");
258 }
259
260 for (j = 1; j < 8; j++)
261 {
262 if (opt_h)
263 {
264 printf ("<th>");
265 printf ("%3s", hdate_get_day_string (j, FALSE));
266 printf ("</th>\n");
267 }
268 else
269 {
270 printf ("%3s", hdate_get_day_string (j, TRUE));
271
272 if (j != 7)
273 printf ("\t");
274 }
275 }
276
277 if (opt_h)
278 {
279 printf ("</tr>\n");
280 }
281 else
282 {
283 printf ("\n");
284 }
285
286 return 0;
287 }
288
289 /* print month table */
290 int
291 print_calendar (int month, int year, int opt_h, int opt_d)
292 {
293 hdate_struct h;
294 int jd;
295 int i, j;
296 char type_char[] = { '/', '+', '*', '-' };
297 int holyday_type;
298
299 /* Find day to start calendar with */
300 hdate_set_gdate (&h, 1, month, year);
301
302 /* return print head to sunday */
303 jd = h.hd_jd - h.hd_dw + 1;
304
305 /* Loop over all days in this month */
306 for (i = 0; i < 6; i++)
307 {
308 if (opt_h)
309 {
310 printf ("<tr>\n");
311 }
312
313 for (j = 0; j < 7; j++)
314 {
315 /* Get this day hebrew date */
316 hdate_set_jd (&h, jd);
317
318 /* Get this day holyday type ba harez (diaspora flag =
319 * 0) */
320 holyday_type =
321 hdate_get_holyday_type (hdate_get_holyday
322 (&h, opt_d));
323
324 if (opt_h)
325 {
326 if (h.gd_mon != month)
327 {
328 printf ("<td class=\"out_of_month\">\n");
329 }
330 else if (j == 6)
331 {
332 printf ("<td class=\"sat\">\n");
333 }
334 else if (holyday_type)
335 {
336 printf ("<td class=\"holiday\">\n");
337 }
338 else
339 {
340 printf ("<td class=\"regular\">\n");
341 }
342
343 /* Print a day */
344 printf ("<div class=\"gday\">%2d</div>\n<div class=\"hday\">%3s</div>\n", h.gd_day, hdate_get_int_string (h.hd_day));
345
346 if (holyday_type)
347 {
348 printf ("<div class=\"holiday_name\">%s</div>\n", hdate_get_holyday_string (hdate_get_holyday (&h, opt_d), FALSE));
349 }
350
351 printf ("</td>\n");
352 }
353 else
354 {
355 if (h.gd_mon == month)
356 {
357 /* Print a day */
358 printf ("%2d%c%3s", h.gd_day,
359 type_char[holyday_type],
360 hdate_get_int_string (h.
361 hd_day));
362 }
363 if (j != 6)
364 printf ("\t");
365 }
366 jd++;
367 }
368
369 if (opt_h)
370 {
371 printf ("</tr>\n");
372 }
373 else
374 {
375 printf ("\n");
376 }
377 }
378
379 if (opt_h)
380 {
381 printf ("</table>\n</div>");
382 }
383
384 return 0;
385 }
386
387 /* print month header and month table */
388 int
389 print_month (int month, int year, int opt_h, int opt_d)
390 {
391 hdate_struct h;
392
393 /* check if hebrew year (year > 3000) */
394 if (year > 3000)
395 hdate_set_hdate (&h, 1, month, year);
396 else
397 hdate_set_gdate (&h, 1, month, year);
398
399 /* Print calendar header */
400 print_header (h.gd_mon, h.gd_year, opt_h, opt_d);
401 print_calendar (h.gd_mon, h.gd_year, opt_h, opt_d);
402
403 printf ("\n");
404
405 return 0;
406 }
407
408 int
409 main (int argc, char *argv[])
410 {
411 /* date */
412 int month;
413 int year;
414
415 /* user opts */
416 char c;
417 int opt_h = 0; /* -h html format flag */
418 int opt_d = 0; /* -d Diaspora holidays */
419 int opt_i = 0; /* -i External css file */
420
421 /* hdate struct */
422 hdate_struct h;
423
424 /* init locale */
425 setlocale (LC_ALL, "");
426
427 /* command line parsing */
428 while ((c = getopt (argc, argv, "shdi")) != EOF)
429 {
430 switch (c)
431 {
432 case 'h':
433 opt_h = 1;
434 break;
435 case 'd':
436 opt_d = 1;
437 break;
438 case 'i':
439 opt_i = 1;
440 break;
441 default:
442 print_help (argv[0]);
443 exit (0);
444 break;
445 }
446 }
447
448 /* Get date from user */
449 if (argc == (optind + 2))
450 {
451 month = atoi (argv[optind]);
452 year = atoi (argv[optind + 1]);
453 }
454 else if (argc == (optind + 1))
455 {
456 month = 0;
457 year = atoi (argv[optind]);
458
459 /* Check for valid years */
460 if (year < 1)
461 {
462 /* Print help for user and exit */
463 print_help (argv[0]);
464 exit (0);
465 }
466 }
467 else if (argc == (optind))
468 {
469 hdate_set_gdate (&h, 0, 0, 0); /* get today's year */
470 month = h.gd_mon;
471 year = h.gd_year;
472 }
473 else
474 {
475 /* Print help for user and exit */
476 print_help (argv[0]);
477 exit (0);
478 }
479
480 /* if html print html header */
481 if (opt_h)
482 print_html_header (opt_i);
483
484 /* print all year */
485 if (month == 0)
486 {
487 for (month = 1; month < 13; month++)
488 {
489 print_month (month, year, opt_h, opt_d);
490 }
491 }
492 else /* print only this month */
493 {
494 print_month (month, year, opt_h, opt_d);
495 }
496
497 /* if html print html header */
498 if (opt_h)
499 print_html_footer ();
500
501 return 0;
502 }
0 .\" .UC 4
1 .TH "HDATE" "1" "2 Mar 2005" "Yaacov Zamir" "libhdate"
2 .SH "NAME"
3 hdate \- Hebrew date and calendar
4 .PP
5 example programs for libhdate, a library that help use Hebrew dates.
6 .PP
7 LibHdate is a small C,C++ library for Hebrew dates,
8 holidays, and reading sequence (parasha). It is using
9 the source code from Amos Shapir's "hdate" package fixed and
10 patched by Nadav Har'El. The Torah reading sequence
11 is from tables by Zvi Har'El.
12 .SH "SYNOPSIS"
13 .B hdate
14 [\-sctShHrRdi]
15 .PP
16 [\-L longitude \-l latitude]
17 [\-z timezone]
18 .PP
19 [[[day] month] year]
20 .SH "DESCRIPTION"
21 .I Hdate
22 translates the specified date to the Hebrew calendar.
23 If no arguments are given, it uses today's date.
24 `month' is a number between 1 and 12.
25 .PP
26 If the year is greater than 3000,
27 .I hdate
28 takes the given date as a Hebrew date, and translates it
29 back to the common calendar.
30 Months are numbered with Tishrey being 1 and Elul 12; Adar I and Adar II are months 13 and 14.
31 .PP
32 .I \-s
33 : Print sunrise/sunset times.
34 .PP
35 .I \-c
36 : Print Shabat enter/leave times.
37 Shabat starts 20 min before sunset,
38 and exits when three stars are out.
39 .PP
40 .I \-t
41 : Print day times list.
42 .PP
43 first light, talit, sunrise, mid day, sunset, first stars, three stars.
44 .PP
45 .I \-S
46 : Print using short format.
47 .PP
48 .I \-h
49 : Print holidays.
50 .PP
51 .I \-H
52 : Print just holidays.
53 .PP
54 .I \-r
55 : Print weekly reading on Saturday.
56 .PP
57 .I \-R
58 : Print just weekly reading on Saturday.
59 .PP
60 .I \-d
61 : Use diaspora reading and holidays.
62 .PP
63 .I \-i
64 : Use iCal formatted output.
65 .PP
66 .I \-l
67 xx : Set the latitude for solar calculations to
68 .PP
69 xx degrees. Negative values are south.
70 .PP
71 .I \-L
72 xx : Set the longitude for solar calculations to
73 .PP
74 xx degrees. *Negative values are EAST*.
75 .PP
76 .I \-z
77 : Use specified timezone.
78 .PP
79 ( default location for sunrise/set is Tel Aviv ).
80 .SH "EXAMPLES"
81 .B hdate -Hi 2025
82 .PP
83 Creates an iCal calendar of the holidays of year 2025.
84 .PP
85 .B hdate -sR 4 2031 -l29 -L-34 -z2
86 .PP
87 Print out the weekly readings and sunset/sunrise times in Eilat on April 2031.
88 .PP
89 .PP
90 .B Useful locations and time zones
91 .PP
92 Eilat : 29, -34, 2
93 .PP
94 Haifa : 32, -34, 2
95 .PP
96 Jerusalem : 31, -35, 2
97 .PP
98 Tel Aviv : 32, -34, 2
99 .PP
100 Ashdod : 31, -34, 2
101 .PP
102 Beer Sheva : 31, -34, 2
103 .PP
104 Tiberias : 32, -35, 2
105 .PP
106 .PP
107 London : 51, 0, 0
108 .PP
109 Paris : 48, -2, 1
110 .PP
111 New York : 40, 74, -5
112 .PP
113 Moscow : 55, -37, 3
114 .PP
115 .PP
116 .SH "SEE ALSO"
117 date(1), cal(1), hcal(1), hebcal(1), remind(1), hdate.h(3), hdate_struct(3)
118 .SH "AUTHOR"
119 Yaacov Zamir 2005, text copied from Amos Shapir's hdate man file.
0 /* hdate.c
1 * Example file for libhdate.
2 *
3 * compile:
4 * gcc `pkg-config --libs --cflags libhdate` hdate.c -o hdate
5 *
6 * Copyright: 2004 (c) Yaacov Zamir
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) 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, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 * 02111-1307, USA.
22 */
23
24
25 #include <stdio.h> /* For printf */
26 #include <hdate.h> /* For hebrew date */
27 #include <stdlib.h> /* For atoi */
28 #include <locale.h> /* For setlocale */
29 #include <unistd.h> /* For getopt */
30
31 #define FALSE 0
32 #define TRUE -1
33
34 /* FIXME: global var - ugly ! */
35 int iCal_uid_counter = 0;
36
37 /* some useful time zones
38 * Eilat 29, -34, 2
39 * Haifa 32, -34, 2
40 * Jerusalem 31, -35, 2
41 * Tel Aviv 32, -34, 2
42 */
43
44 /* print help */
45 int
46 print_help (char *program)
47 {
48 printf ("hdate - example program for libhdate\n\n");
49
50 printf ("USAGE: %s [-sShdr]\n", program);
51 printf (" [-L longitude -l latitude]\n");
52 printf (" [-z timezone]\n");
53 printf (" [[[day] month] year]\n");
54
55 printf ("OPTIONS:\n");
56 printf (" -s : Print sunrise/sunset times.\n");
57 printf (" -c : Print Shabat enter/leave times.\n");
58 printf (" Shabat starts 20 min before sunset,\n");
59 printf (" and exits when three stars are out.\n");
60 printf (" -t : Print day times -\n");
61 printf (" first light, talit, sunrise, midday, sunset,\n");
62 printf (" first stars, three stars.\n");
63 printf (" -S : Print using short format.\n");
64 printf (" -h : Print holidays.\n");
65 printf (" -H : Print just holidays.\n");
66 printf (" -r : Print weekly reading on saturday.\n");
67 printf (" -R : Print just weekly reading on saturday.\n");
68
69 printf (" -d : Use diaspora reading and holidays.\n");
70 printf (" -i : Use iCal formated output.\n");
71 printf (" -l xx : Set the latitude for solar calculations to\n");
72 printf (" xx degrees. Negative values are south.\n");
73 printf (" -L xx : Set the longitude for solar calculations to\n");
74 printf (" xx degrees. *Negative values are EAST*.\n");
75 printf (" The -l and -L switches must both be used, or not at all.\n");
76 printf (" -z : Use specified timezone,\n");
77
78 printf (" ( default location for sunrise/set is Tel Aviv winter time ).\n");
79 printf (" some useful locations and time zones:\n");
80 printf (" Eilat : 29, -34, 2\n");
81 printf (" Haifa : 32, -34, 2\n");
82 printf (" Jerusalem : 31, -35, 2\n");
83 printf (" Tel Aviv : 32, -34, 2\n");
84 printf (" Ashdod : 31, -34, 2\n");
85 printf (" Beer Sheva : 31, -34, 2\n");
86 printf (" Tiberias : 32, -35, 2\n");
87 printf (" London : 51, 0, 0\n");
88 printf (" Paris : 48, -2, 1\n");
89 printf (" New York : 40, 74, -5\n");
90 printf (" Moscow : 55, -37, 3\n");
91
92 return 0;
93 }
94
95 /* print ical header */
96 int
97 print_ical_header ()
98 {
99 /* Print start of iCal format */
100 printf ("BEGIN:VCALENDAR\n");
101 printf ("VERSION:2.0\n");
102 printf ("CALSCALE:GREGORIAN\n");
103 printf ("METHOD:PUBLISH\n");
104
105 return 0;
106 }
107
108 /* print ical footer */
109 int
110 print_ical_footer ()
111 {
112 /* Print end of iCal format */
113 printf ("END:VCALENDAR\n");
114
115 return 0;
116 }
117
118 /* print one day - gregorian and hebrew date */
119 int
120 print_date (hdate_struct * h, int opt_S, int opt_i)
121 {
122 if (opt_i)
123 {
124 printf ("%s %s ",
125 hdate_get_int_string (h->hd_day),
126 hdate_get_hebrew_month_string (h->hd_mon, opt_S));
127 printf ("%s", hdate_get_int_string (h->hd_year));
128 }
129 else if (opt_S)
130 {
131 printf ("%d.%d.%d %s ",
132 h->gd_day, h->gd_mon, h->gd_year,
133 hdate_get_int_string (h->hd_day));
134 printf ("%s\n",
135 hdate_get_hebrew_month_string (h->hd_mon, opt_S));
136 }
137 else
138 {
139 printf ("%s, %d %s %d, ",
140 hdate_get_day_string (h->hd_dw, opt_S),
141 h->gd_day,
142 hdate_get_month_string (h->gd_mon, opt_S),
143 h->gd_year);
144 printf ("%s %s ",
145 hdate_get_int_string (h->hd_day),
146 hdate_get_hebrew_month_string (h->hd_mon, opt_S));
147 printf ("%s\n", hdate_get_int_string (h->hd_year));
148 }
149
150 return 0;
151 }
152
153 /* print one day - sunrise/set times */
154 int
155 print_sunrise (hdate_struct * h, double lat, double lon, int tz, int opt_i)
156 {
157 int sunrise, sunset;
158
159 /* get times */
160 hdate_get_utc_sun_time (h->gd_day, h->gd_mon, h->gd_year, lat, lon,
161 &sunrise, &sunset);
162
163 sunset = sunset + tz * 60;
164 sunrise = sunrise + tz * 60;
165
166 /* print sunset/rise times */
167 printf ("%d:%d - %d:%d ",
168 sunrise / 60, sunrise % 60, sunset / 60, sunset % 60);
169
170 return 0;
171 }
172
173 /* print one day - day times */
174 int
175 print_times (hdate_struct * h, double lat, double lon, int tz, int opt_i)
176 {
177 int sun_hour, first_light, talit, sunrise;
178 int midday, sunset, first_stars, three_stars;
179
180 /* get times */
181 hdate_get_utc_sun_time_full (h->gd_day, h->gd_mon, h->gd_year, lat, lon,
182 &sun_hour, &first_light, &talit, &sunrise,
183 &midday, &sunset, &first_stars, &three_stars);
184
185 first_light = first_light + tz * 60;
186 talit = talit + tz * 60;
187 sunrise = sunrise + tz * 60;
188 midday = midday + tz * 60;
189 sunset = sunset + tz * 60;
190 first_stars = first_stars + tz * 60;
191 three_stars = three_stars + tz * 60;
192
193 /* print sunset/rise times */
194 printf ("%d:%d - %d:%d - %d:%d - %d:%d - %d:%d - %d:%d - %d:%d ",
195 first_light / 60, first_light % 60, talit / 60, talit % 60,
196 sunrise / 60, sunrise % 60, midday / 60, midday % 60,
197 sunset / 60, sunset % 60, first_stars / 60, first_stars % 60,
198 three_stars / 60, three_stars % 60);
199
200 return 0;
201 }
202
203 /* print one day - holiday */
204 int
205 print_holiday (hdate_struct * h, int opt_d, int opt_S, int opt_i)
206 {
207 int holyday;
208
209 holyday = hdate_get_holyday (h, opt_d);
210
211 if (holyday)
212 {
213 /* print holyday */
214 printf ("%s ", hdate_get_holyday_string (holyday, opt_S));
215 }
216
217 return 0;
218 }
219
220 /* print one day - reading */
221 int
222 print_reading (hdate_struct * h, int opt_d, int opt_S, int opt_i)
223 {
224 int reading;
225
226 reading = hdate_get_parasha (h, opt_d);
227
228 if (reading)
229 {
230 /* print parash */
231 printf ("%s ", hdate_get_parasha_string (reading, opt_S));
232 }
233
234 return 0;
235 }
236
237 /* print one day - reading */
238 int
239 print_candales (hdate_struct * h, double lat, double lon, int tz, int opt_i)
240 {
241 int sun_hour, first_light, talit, sunrise;
242 int midday, sunset, first_stars, three_stars;
243
244 /* check for friday - print knisat shabat */
245 if (h->hd_dw == 6)
246 {
247 /* get times */
248 hdate_get_utc_sun_time (h->gd_day, h->gd_mon, h->gd_year, lat, lon,
249 &sunrise, &sunset);
250
251 /* FIXME - knisar shabat 20 minutes before shkiaa ? */
252 sunset = sunset + tz * 60 - 20;
253
254 /* print sunset/rise times */
255 printf ("(%d:%d)", sunset / 60, sunset % 60);
256 }
257
258 /* check for saturday - print motzay shabat */
259 else if (h->hd_dw == 7)
260 {
261 /* get times */
262 hdate_get_utc_sun_time_full (h->gd_day, h->gd_mon, h->gd_year, lat, lon,
263 &sun_hour, &first_light, &talit, &sunrise,
264 &midday, &sunset, &first_stars, &three_stars);
265
266 three_stars = three_stars + tz * 60;
267
268 /* print motzay shabat */
269 printf ("(%d:%d)", three_stars / 60, three_stars % 60);
270 }
271
272 return 0;
273 }
274
275 /* print one day - all */
276 int
277 print_day (hdate_struct * h,
278 int opt_d, int opt_S,
279 double lat, double lon, int tz, int opt_s, int opt_h, int opt_r,
280 int opt_R, int opt_H, int opt_i, int opt_c, int opt_t)
281 {
282 /* check for just parasha or holiday flag */
283 if (opt_R && opt_H &&
284 !hdate_get_parasha (h, opt_d) && !hdate_get_holyday (h, opt_d))
285 return 0;
286 if (opt_R && !opt_H && !hdate_get_parasha (h, opt_d))
287 return 0;
288 if (opt_H && !opt_R && !hdate_get_holyday (h, opt_d))
289 return 0;
290
291 /* check for iCal format */
292 if (opt_i)
293 {
294 print_ical_header ();
295
296 printf ("BEGIN:VEVENT\n");
297 printf ("UID:%d\n", ++iCal_uid_counter);
298 printf ("DTSTART;VALUE=DATE:%04d%02d%02d\n", h->gd_year,
299 h->gd_mon, h->gd_day);
300 printf ("SUMMARY:");
301 }
302
303 /* print the day */
304 print_date (h, opt_S, opt_i);
305
306 /* check for iCal format */
307 if (opt_i &&
308 (((opt_h && hdate_get_holyday (h, opt_d)) ||
309 ((opt_r && hdate_get_parasha (h, opt_d)) || opt_c)) || opt_s || opt_t))
310 printf ("\\, ");
311
312 if (opt_s || opt_t)
313 {
314 if (opt_t)
315 print_times (h, lat, lon, tz, opt_i);
316 else if (opt_s)
317 print_sunrise (h, lat, lon, tz, opt_i);
318
319 if (!opt_i && ((opt_h && hdate_get_holyday (h, opt_d)) ||
320 ((opt_r && hdate_get_parasha (h, opt_d)) || opt_c)))
321 printf (", ");
322 if (opt_i && ((opt_h && hdate_get_holyday (h, opt_d)) ||
323 ((opt_r && hdate_get_parasha (h, opt_d)) || opt_c)))
324 printf ("\\, ");
325 }
326 if (opt_h)
327 {
328 print_holiday (h, opt_d, opt_S, opt_i);
329
330 if (!opt_i && ((opt_r && hdate_get_parasha (h, opt_d) || opt_c)
331 && hdate_get_holyday (h, opt_d)))
332 printf (", ");
333 if (opt_i && ((opt_r && hdate_get_parasha (h, opt_d) || opt_c)
334 && hdate_get_holyday (h, opt_d)))
335 printf ("\\, ");
336 }
337 if (opt_r)
338 {
339 print_reading (h, opt_d, opt_S, opt_i);
340 }
341 if (opt_c)
342 {
343 print_candales (h, lat, lon, tz, opt_i);
344 }
345
346 if (opt_r || opt_h || opt_s || opt_t || opt_i || opt_c)
347 {
348 printf ("\n");
349 }
350
351 /* check for iCal format */
352 if (opt_i)
353 {
354 printf ("CLASS:PUBLIC\n");
355 printf ("DTEND;VALUE=DATE:%04d%02d%02d\n", h->gd_year,
356 h->gd_mon, h->gd_day);
357 printf ("CATEGORIES:Holidays\n");
358 printf ("END:VEVENT\n");
359
360 print_ical_footer ();
361 }
362
363 return 0;
364 }
365
366 /* print one month - all */
367 int
368 print_month (int opt_d, int opt_S,
369 double lat, double lon, int tz,
370 int opt_s, int opt_h, int opt_r, int opt_R, int opt_H, int opt_i, int opt_c, int opt_t,
371 int month, int year)
372 {
373 hdate_struct h;
374 int jd;
375
376 /* get date of month start */
377 hdate_set_gdate (&h, 1, month, year);
378 jd = h.hd_jd;
379
380 /* print month header */
381 if (!opt_i)
382 printf ("\n%s:\n", hdate_get_month_string (h.gd_mon, opt_S));
383
384 /* print month days */
385 while (h.gd_mon == month)
386 {
387 print_day (&h, opt_d, opt_S, lat, lon, tz, opt_s, opt_h,
388 opt_r, opt_R, opt_H, opt_i, opt_c, opt_t);
389
390 jd++;
391 hdate_set_jd (&h, jd);
392 }
393
394 return 0;
395 }
396
397 /* print one hebrew month - all */
398 int
399 print_hebrew_month (int opt_d, int opt_S,
400 double lat, double lon, int tz,
401 int opt_s, int opt_h, int opt_r, int opt_R, int opt_H,
402 int opt_i, int opt_c, int opt_t, int month, int year)
403 {
404 hdate_struct h;
405 int jd;
406
407 /* get date of month start */
408 hdate_set_hdate (&h, 1, month, year);
409 jd = h.hd_jd;
410
411 if (h.hd_size_of_year > 365 && month == 6) /* adar of meoberet */
412 {
413 /* print Adar I and Adar II month days */
414 hdate_set_hdate (&h, 1, 13, year);
415 jd = h.hd_jd;
416
417 /* print month header */
418 if (!opt_i)
419 printf ("\n%s:\n",
420 hdate_get_hebrew_month_string (h.hd_mon,
421 opt_S));
422
423 /* print adar I days */
424 while (h.hd_mon == 13)
425 {
426 print_day (&h, opt_d, opt_S, lat, lon, tz, opt_s,
427 opt_h, opt_r, opt_R, opt_H, opt_i, opt_c, opt_t);
428
429 jd++;
430 hdate_set_jd (&h, jd);
431 }
432
433 hdate_set_hdate (&h, 1, 14, year);
434 jd = h.hd_jd;
435
436 /* print month header */
437 if (!opt_i)
438 printf ("\n%s:\n",
439 hdate_get_hebrew_month_string (h.hd_mon,
440 opt_S));
441
442 /* print adar II days */
443 while (h.hd_mon == 14)
444 {
445 print_day (&h, opt_d, opt_S, lat, lon, tz, opt_s,
446 opt_h, opt_r, opt_R, opt_H, opt_i, opt_c, opt_t);
447
448 jd++;
449 hdate_set_jd (&h, jd);
450 }
451 }
452 else
453 {
454 /* print month header */
455 if (!opt_i)
456 printf ("\n%s:\n",
457 hdate_get_hebrew_month_string (h.hd_mon,
458 opt_S));
459
460 /* print month days */
461 while (h.hd_mon == month)
462 {
463 print_day (&h, opt_d, opt_S, lat, lon, tz, opt_s,
464 opt_h, opt_r, opt_R, opt_H, opt_i, opt_c, opt_t);
465
466 jd++;
467 hdate_set_jd (&h, jd);
468 }
469 }
470
471 return 0;
472 }
473
474 /* print one gregorian year - all */
475 int
476 print_year (int opt_d, int opt_S,
477 double lat, double lon, int tz, int opt_s, int opt_h, int opt_r,
478 int opt_R, int opt_H, int opt_i, int opt_c, int opt_t, int year)
479 {
480 int month = 1;
481
482 /* print year header */
483 if (!opt_i)
484 printf ("%d:\n", year);
485
486 /* print year months */
487 while (month < 13)
488 {
489 print_month (opt_d, opt_S, lat, lon, tz, opt_s, opt_h, opt_r,
490 opt_R, opt_H, opt_i, opt_c, opt_t, month, year);
491 month++;
492 }
493
494 return 0;
495 }
496
497 /* print one hebrew year - all */
498 int
499 print_hebrew_year (int opt_d, int opt_S,
500 double lat, double lon, int tz,
501 int opt_s, int opt_h, int opt_r, int opt_R, int opt_H,
502 int opt_i, int opt_c, int opt_t, int year)
503 {
504 int month = 1;
505
506 /* print year header */
507 if (!opt_i)
508 printf ("%s:\n", hdate_get_int_string (year));
509
510 /* print year months */
511 while (month < 13)
512 {
513 print_hebrew_month (opt_d, opt_S, lat, lon, tz, opt_s, opt_h,
514 opt_r, opt_R, opt_H, opt_i, opt_c, opt_t, month, year);
515 month++;
516 }
517
518 return 0;
519 }
520
521 int
522 main (int argc, char *argv[])
523 {
524 hdate_struct h; /* The Hebrew date */
525 char c;
526
527 int day; /* The Gregorian date */
528 int month;
529 int year;
530
531 /* hebcal style command line options */
532 char *progname = argv[0];
533 int opt_s = 0; /* -s option sunrise/set times */
534 int opt_c = 0; /* -c option shabat enter/leave times */
535 int opt_t = 0; /* -t option print times of day */
536 int opt_S = 0; /* -S Short format flag */
537 int opt_h = 0; /* -h option holidays */
538 int opt_H = 0; /* -H option just holidays */
539 int opt_r = 0; /* -r option reading */
540 int opt_R = 0; /* -R option just reading */
541 int opt_d = 0; /* -d option diaspora */
542 int opt_i = 0; /* -i option iCal */
543
544 double lat = 32.0; /* -l option default to Tel aviv latitude */
545 double lon = -34.0; /* -L option default to Tel aviv longitude */
546 int tz = 2; /* -z option default to Tel aviv time zone */
547
548 /* init locale */
549 setlocale (LC_ALL, "");
550
551 /* command line parsing */
552 while ((c = getopt (argc, argv, "sctShHrRdil:L:z:")) != EOF)
553 {
554 switch (c)
555 {
556 case 's':
557 opt_s = 1;
558 break;
559 case 'c':
560 opt_c = 1;
561 break;
562 case 't':
563 opt_t = 1;
564 break;
565 case 'S':
566 opt_S = 1;
567 break;
568 case 'H':
569 opt_H = 1;
570 case 'h':
571 opt_h = 1;
572 break;
573 case 'R':
574 opt_R = 1;
575 case 'r':
576 opt_r = 1;
577 break;
578 case 'd':
579 opt_d = 1;
580 break;
581 case 'i':
582 opt_i = 1;
583 break;
584 case 'l':
585 if (optarg)
586 lat = (double) atof (optarg);
587 break;
588 case 'L':
589 if (optarg)
590 lon = (double) atof (optarg);
591 break;
592 case 'z':
593 if (optarg)
594 tz = atoi (optarg);
595 break;
596 default:
597 print_help (argv[0]);
598 exit (0);
599 break;
600 }
601 }
602
603 /* Get calendar */
604 if (argc == optind) /* no date entered */
605 {
606 /* set date for today */
607 hdate_set_gdate (&h, 0, 0, 0);
608
609 print_day (&h, opt_d, opt_S, lat, lon, tz, opt_s, opt_h,
610 opt_r, opt_R, opt_H, opt_i, opt_c, opt_t);
611
612 exit (0);
613 }
614 else if (argc == (optind + 1)) /*only year */
615 {
616 /* get year */
617 year = atoi (argv[optind]);
618
619 if (year <= 0) /* error */
620 {
621 print_help (argv[0]);
622 exit (0);
623 }
624 if (year > 3000) /* hebrew year */
625 {
626 print_hebrew_year (opt_d, opt_S, lat, lon, tz, opt_s,
627 opt_h, opt_r, opt_R, opt_H, opt_i, opt_c, opt_t,
628 year);
629
630 exit (0);
631 }
632 else
633 {
634 print_year (opt_d, opt_S, lat, lon, tz, opt_s, opt_h,
635 opt_r, opt_R, opt_H, opt_i, opt_c, opt_t, year);
636
637 exit (0);
638 }
639 }
640 else if (argc == (optind + 2)) /*only month and year */
641 {
642 /* get year */
643 year = atoi (argv[optind + 1]);
644 month = atoi (argv[optind]);
645
646 if (year <= 0) /* error */
647 {
648 print_help (argv[0]);
649 exit (0);
650 }
651 if (year > 3000) /* hebrew year */
652 {
653 print_hebrew_month (opt_d, opt_S, lat, lon, tz, opt_s,
654 opt_h, opt_r, opt_R, opt_H, opt_i, opt_c, opt_t,
655 month, year);
656
657 exit (0);
658 }
659 else
660 {
661 print_month (opt_d, opt_S, lat, lon, tz, opt_s, opt_h,
662 opt_r, opt_R, opt_H, opt_i, opt_c, opt_t, month, year);
663
664 exit (0);
665 }
666 }
667 else if (argc == (optind + 3)) /*day month and year */
668 {
669 /* get year */
670 year = atoi (argv[optind + 2]);
671 month = atoi (argv[optind + 1]);
672 day = atoi (argv[optind]);
673
674 if (year <= 0) /* error */
675 {
676 print_help (argv[0]);
677 exit (0);
678 }
679
680 /* set date */
681 if (year > 3000) /* hebrew year */
682 {
683 hdate_set_hdate (&h, day, month, year);
684 }
685 else
686 {
687 hdate_set_gdate (&h, day, month, year);
688 }
689
690 print_day (&h, opt_d, opt_S, lat, lon, tz, opt_s, opt_h,
691 opt_r, opt_R, opt_H, opt_i, opt_c, opt_t);
692
693 exit (0);
694 }
695 else
696 {
697 print_help (argv[0]);
698 exit (0);
699 }
700
701 return 0;
702 }
0 EXTRA_DIST = hdate_hebcal.c
1
2 if WITH_EXAMPLES
3
4 INCLUDES=-I$(top_srcdir)/src
5
6 DEPS= $(top_builddir)/src/libhdate.la
7 ldadd= $(top_builddir)/src/libhdate.la -lm
8
9 bin_PROGRAMS = hdate_hebcal
10 hdate_hebcal_SOURCES = hdate_hebcal.c
11 hdate_hebcal_LDFLAGS =
12 hdate_hebcal_DEPENDENCIES = $(DEPS)
13 hdate_hebcal_LDADD = $(ldadd)
14
15 endif
0 # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
1
2 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
3 # This Makefile.in is free software; the Free Software Foundation
4 # gives unlimited permission to copy and/or distribute it,
5 # with or without modifications, as long as this notice is preserved.
6
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
9 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 # PARTICULAR PURPOSE.
11
12
13 SHELL = @SHELL@
14
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 VPATH = @srcdir@
18 prefix = @prefix@
19 exec_prefix = @exec_prefix@
20
21 bindir = @bindir@
22 sbindir = @sbindir@
23 libexecdir = @libexecdir@
24 datadir = @datadir@
25 sysconfdir = @sysconfdir@
26 sharedstatedir = @sharedstatedir@
27 localstatedir = @localstatedir@
28 libdir = @libdir@
29 infodir = @infodir@
30 mandir = @mandir@
31 includedir = @includedir@
32 oldincludedir = /usr/include
33
34 DESTDIR =
35
36 pkgdatadir = $(datadir)/@PACKAGE@
37 pkglibdir = $(libdir)/@PACKAGE@
38 pkgincludedir = $(includedir)/@PACKAGE@
39
40 top_builddir = ../..
41
42 ACLOCAL = @ACLOCAL@
43 AUTOCONF = @AUTOCONF@
44 AUTOMAKE = @AUTOMAKE@
45 AUTOHEADER = @AUTOHEADER@
46
47 INSTALL = @INSTALL@
48 INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
49 INSTALL_DATA = @INSTALL_DATA@
50 INSTALL_SCRIPT = @INSTALL_SCRIPT@
51 transform = @program_transform_name@
52
53 NORMAL_INSTALL = :
54 PRE_INSTALL = :
55 POST_INSTALL = :
56 NORMAL_UNINSTALL = :
57 PRE_UNINSTALL = :
58 POST_UNINSTALL = :
59 host_alias = @host_alias@
60 host_triplet = @host@
61 AR = @AR@
62 AS = @AS@
63 BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
64 CATOBJEXT = @CATOBJEXT@
65 CC = @CC@
66 CFLAGS = @CFLAGS@
67 CXX = @CXX@
68 CXXCPP = @CXXCPP@
69 DATADIRNAME = @DATADIRNAME@
70 DLLTOOL = @DLLTOOL@
71 ECHO = @ECHO@
72 EGREP = @EGREP@
73 EXEEXT = @EXEEXT@
74 F77 = @F77@
75 GCJ = @GCJ@
76 GCJFLAGS = @GCJFLAGS@
77 GENCAT = @GENCAT@
78 GLIBC2 = @GLIBC2@
79 GLIBC21 = @GLIBC21@
80 GMSGFMT = @GMSGFMT@
81 HAVE_ASPRINTF = @HAVE_ASPRINTF@
82 HAVE_LIB = @HAVE_LIB@
83 HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
84 HAVE_SNPRINTF = @HAVE_SNPRINTF@
85 HAVE_WPRINTF = @HAVE_WPRINTF@
86 INSTOBJEXT = @INSTOBJEXT@
87 INTLBISON = @INTLBISON@
88 INTLLIBS = @INTLLIBS@
89 INTLOBJS = @INTLOBJS@
90 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
91 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
92 LIB = @LIB@
93 LIBICONV = @LIBICONV@
94 LIBINTL = @LIBINTL@
95 LIBS = @LIBS@
96 LIBTOOL = @LIBTOOL@
97 LN_S = @LN_S@
98 LTLIB = @LTLIB@
99 LTLIBICONV = @LTLIBICONV@
100 LTLIBINTL = @LTLIBINTL@
101 MAINT = @MAINT@
102 MAKEINFO = @MAKEINFO@
103 MKINSTALLDIRS = @MKINSTALLDIRS@
104 OBJDUMP = @OBJDUMP@
105 OBJEXT = @OBJEXT@
106 PACKAGE = @PACKAGE@
107 PA_MODULES_PATH = @PA_MODULES_PATH@
108 PA_VERSION = @PA_VERSION@
109 PE_CFLAGS = @PE_CFLAGS@
110 PE_MODULES_PATH = @PE_MODULES_PATH@
111 PKG_CONFIG = @PKG_CONFIG@
112 POSUB = @POSUB@
113 PY_CFLAGS = @PY_CFLAGS@
114 PY_MODULES_PATH = @PY_MODULES_PATH@
115 PY_VERSION = @PY_VERSION@
116 RANLIB = @RANLIB@
117 RC = @RC@
118 STRIP = @STRIP@
119 USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
120 USE_NLS = @USE_NLS@
121 VERSION = @VERSION@
122 VERSION_INFO = @VERSION_INFO@
123 have_pascal = @have_pascal@
124 have_perl = @have_perl@
125 have_python = @have_python@
126 have_swig = @have_swig@
127
128 EXTRA_DIST = hdate_hebcal.c
129
130 @WITH_EXAMPLES_TRUE@INCLUDES = -I$(top_srcdir)/src
131
132 @WITH_EXAMPLES_TRUE@DEPS = $(top_builddir)/src/libhdate.la
133 @WITH_EXAMPLES_TRUE@ldadd = $(top_builddir)/src/libhdate.la -lm
134
135 @WITH_EXAMPLES_TRUE@bin_PROGRAMS = hdate_hebcal
136 @WITH_EXAMPLES_TRUE@hdate_hebcal_SOURCES = hdate_hebcal.c
137 @WITH_EXAMPLES_TRUE@hdate_hebcal_LDFLAGS =
138 @WITH_EXAMPLES_TRUE@hdate_hebcal_DEPENDENCIES = $(DEPS)
139 @WITH_EXAMPLES_TRUE@hdate_hebcal_LDADD = $(ldadd)
140 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
141 CONFIG_CLEAN_FILES =
142 @WITH_EXAMPLES_TRUE@bin_PROGRAMS = hdate_hebcal$(EXEEXT)
143 PROGRAMS = $(bin_PROGRAMS)
144
145
146 DEFS = @DEFS@ -I. -I$(srcdir)
147 CPPFLAGS = @CPPFLAGS@
148 LDFLAGS = @LDFLAGS@
149 @WITH_EXAMPLES_TRUE@hdate_hebcal_OBJECTS = hdate_hebcal.$(OBJEXT)
150 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
151 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
152 CCLD = $(CC)
153 LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
154 DIST_COMMON = Makefile.am Makefile.in
155
156
157 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
158
159 TAR = tar
160 GZIP_ENV = --best
161 SOURCES = $(hdate_hebcal_SOURCES)
162 OBJECTS = $(hdate_hebcal_OBJECTS)
163
164 all: all-redirect
165 .SUFFIXES:
166 .SUFFIXES: .S .c .lo .o .obj .s
167 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
168 cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps examples/hebcal/Makefile
169
170 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
171 cd $(top_builddir) \
172 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
173
174
175 mostlyclean-binPROGRAMS:
176
177 clean-binPROGRAMS:
178 -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
179
180 distclean-binPROGRAMS:
181
182 maintainer-clean-binPROGRAMS:
183
184 install-binPROGRAMS: $(bin_PROGRAMS)
185 @$(NORMAL_INSTALL)
186 $(mkinstalldirs) $(DESTDIR)$(bindir)
187 @list='$(bin_PROGRAMS)'; for p in $$list; do \
188 if test -f $$p; then \
189 echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
190 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
191 else :; fi; \
192 done
193
194 uninstall-binPROGRAMS:
195 @$(NORMAL_UNINSTALL)
196 list='$(bin_PROGRAMS)'; for p in $$list; do \
197 rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
198 done
199
200 .c.o:
201 $(COMPILE) -c $<
202
203 # FIXME: We should only use cygpath when building on Windows,
204 # and only if it is available.
205 .c.obj:
206 $(COMPILE) -c `cygpath -w $<`
207
208 .s.o:
209 $(COMPILE) -c $<
210
211 .S.o:
212 $(COMPILE) -c $<
213
214 mostlyclean-compile:
215 -rm -f *.o core *.core
216 -rm -f *.$(OBJEXT)
217
218 clean-compile:
219
220 distclean-compile:
221 -rm -f *.tab.c
222
223 maintainer-clean-compile:
224
225 .c.lo:
226 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
227
228 .s.lo:
229 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
230
231 .S.lo:
232 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
233
234 mostlyclean-libtool:
235 -rm -f *.lo
236
237 clean-libtool:
238 -rm -rf .libs _libs
239
240 distclean-libtool:
241
242 maintainer-clean-libtool:
243
244 hdate_hebcal$(EXEEXT): $(hdate_hebcal_OBJECTS) $(hdate_hebcal_DEPENDENCIES)
245 @rm -f hdate_hebcal$(EXEEXT)
246 $(LINK) $(hdate_hebcal_LDFLAGS) $(hdate_hebcal_OBJECTS) $(hdate_hebcal_LDADD) $(LIBS)
247
248 tags: TAGS
249
250 ID: $(HEADERS) $(SOURCES) $(LISP)
251 list='$(SOURCES) $(HEADERS)'; \
252 unique=`for i in $$list; do echo $$i; done | \
253 awk ' { files[$$0] = 1; } \
254 END { for (i in files) print i; }'`; \
255 here=`pwd` && cd $(srcdir) \
256 && mkid -f$$here/ID $$unique $(LISP)
257
258 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
259 tags=; \
260 here=`pwd`; \
261 list='$(SOURCES) $(HEADERS)'; \
262 unique=`for i in $$list; do echo $$i; done | \
263 awk ' { files[$$0] = 1; } \
264 END { for (i in files) print i; }'`; \
265 test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
266 || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
267
268 mostlyclean-tags:
269
270 clean-tags:
271
272 distclean-tags:
273 -rm -f TAGS ID
274
275 maintainer-clean-tags:
276
277 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
278
279 subdir = examples/hebcal
280
281 distdir: $(DISTFILES)
282 @for file in $(DISTFILES); do \
283 d=$(srcdir); \
284 if test -d $$d/$$file; then \
285 cp -pr $$d/$$file $(distdir)/$$file; \
286 else \
287 test -f $(distdir)/$$file \
288 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
289 || cp -p $$d/$$file $(distdir)/$$file || :; \
290 fi; \
291 done
292
293 info-am:
294 info: info-am
295 dvi-am:
296 dvi: dvi-am
297 check-am: all-am
298 check: check-am
299 installcheck-am:
300 installcheck: installcheck-am
301 install-exec-am: install-binPROGRAMS
302 install-exec: install-exec-am
303
304 install-data-am:
305 install-data: install-data-am
306
307 install-am: all-am
308 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
309 install: install-am
310 uninstall-am: uninstall-binPROGRAMS
311 uninstall: uninstall-am
312 all-am: Makefile $(PROGRAMS)
313 all-redirect: all-am
314 install-strip:
315 $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
316 installdirs:
317 $(mkinstalldirs) $(DESTDIR)$(bindir)
318
319
320 mostlyclean-generic:
321
322 clean-generic:
323
324 distclean-generic:
325 -rm -f Makefile $(CONFIG_CLEAN_FILES)
326 -rm -f config.cache config.log stamp-h stamp-h[0-9]*
327
328 maintainer-clean-generic:
329 mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
330 mostlyclean-libtool mostlyclean-tags \
331 mostlyclean-generic
332
333 mostlyclean: mostlyclean-am
334
335 clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
336 clean-generic mostlyclean-am
337
338 clean: clean-am
339
340 distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
341 distclean-tags distclean-generic clean-am
342 -rm -f libtool
343
344 distclean: distclean-am
345
346 maintainer-clean-am: maintainer-clean-binPROGRAMS \
347 maintainer-clean-compile maintainer-clean-libtool \
348 maintainer-clean-tags maintainer-clean-generic \
349 distclean-am
350 @echo "This command is intended for maintainers to use;"
351 @echo "it deletes files that may require special tools to rebuild."
352
353 maintainer-clean: maintainer-clean-am
354
355 .PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
356 maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
357 mostlyclean-compile distclean-compile clean-compile \
358 maintainer-clean-compile mostlyclean-libtool distclean-libtool \
359 clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
360 distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
361 dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
362 install-exec install-data-am install-data install-am install \
363 uninstall-am uninstall all-redirect all-am all installdirs \
364 mostlyclean-generic distclean-generic clean-generic \
365 maintainer-clean-generic clean mostlyclean distclean maintainer-clean
366
367
368 # Tell versions [3.59,3.63) of GNU make to not export all variables.
369 # Otherwise a system limit (for SysV at least) may be exceeded.
370 .NOEXPORT:
0 /* hdate_hebcal.c
1 * Example file for libhdate.
2 *
3 * compile:
4 * gcc `pkg-config --libs --cflags libhdate` hdate_hebcal.c -o hdate_hebcal
5 *
6 * Copyright: 2005 (c) Yaacov Zamir
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) 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, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 * 02111-1307, USA.
22 */
23
24 #include <stdio.h> /* For printf */
25 #include <hdate.h> /* For hebrew date */
26 #include <stdlib.h> /* For atoi */
27 #include <locale.h> /* For setlocale */
28 #include <unistd.h> /* For getopt */
29
30 /* some useful time zones
31 * Eilat 29, -34, 2
32 * Haifa 32, -34, 2
33 * Jerusalem 31, -35, 2
34 * Tel Aviv 32, -34, 2
35 */
36
37 /* print help */
38 int
39 print_help (char *program)
40 {
41 printf ("hebcal clone program for testing of libhdate library.\n\n");
42 printf ("USAGE: %s [-cdDehirsx]\n", program);
43 printf (" [-L longitude -l latitude]\n");
44 printf (" [-m havdalah_minutes_past_sundown ]\n");
45 printf (" [-z timezone]\n");
46 printf (" [ year ]\n");
47 printf ("OPTIONS:\n");
48 printf (" -c : Print candlelighting times.\n");
49 printf (" -d : print the hebrew date for the entire date range.\n");
50 printf (" -D : print the hebrew date for dates with some event.\n");
51 printf (" -e : Ouput \"european\" dates -- DD.MM.YYYY format.\n");
52 printf (" -h : Suppress default holidays.\n");
53 printf (" -i : Use Israeli sedra scheme.\n");
54 printf (" -l xx : Set the latitude for solar calculations to\n");
55 printf (" xx degrees. Negative values are south.\n");
56 printf (" -L xx : Set the longitude for solar calculations to\n");
57 printf (" xx degrees. *Negative values are EAST*.\n");
58 printf (" The -l and -L switches must both be used, or not at all.\n");
59 printf (" -m mins : Set havdalah to occur this many minutes after sundown\n");
60 printf (" -r : Tab delineated format.\n");
61 printf (" -s : Add weekly sedrot on saturday.\n");
62 printf (" -x : Suppress Rosh Chodesh.\n");
63 printf (" -z : Use specified timezone,\n");
64 }
65
66 /* hebcal style printing */
67
68 /* gregorian date */
69 int
70 print_gregorian_date (hdate_struct *h, int opt_e, char separator)
71 {
72 if (opt_e)
73 printf ("%d.%d.%d%c",
74 h->gd_day, h->gd_mon, h->gd_year, separator);
75 else
76 printf ("%d/%d/%d%c",
77 h->gd_mon, h->gd_day, h->gd_year, separator);
78 }
79
80 /* hebrew date */
81 int
82 print_hebrew_date (hdate_struct *h)
83 {
84 char number_suffix[3];
85
86 switch (h->hd_day)
87 {
88 case 1:
89 case 21:
90 number_suffix[0] = 's';
91 number_suffix[1] = 't';
92 number_suffix[2] = 0;
93 break;
94 case 2:
95 case 22:
96 number_suffix[0] = 'n';
97 number_suffix[1] = 'd';
98 number_suffix[2] = 0;
99 break;
100 case 3:
101 case 23:
102 number_suffix[0] = 'r';
103 number_suffix[1] = 'd';
104 number_suffix[2] = 0;
105 break;
106 default:
107 number_suffix[0] = 't';
108 number_suffix[1] = 'h';
109 number_suffix[2] = 0;
110 break;
111 }
112
113 printf ("%d%s of %s, %d\n",
114 h->hd_day,
115 number_suffix,
116 hdate_get_hebrew_month_string (h->hd_mon, 0),
117 h->hd_year);
118 }
119
120 /* main program */
121 int
122 main (int argc, char* argv[])
123 {
124 hdate_struct h; /* The Hebrew date */
125 int jd;
126 int reading;
127 int holyday;
128 int rosh_hodesh;
129 int candle_lighting;
130 int havdala;
131 int event;
132 int year = 0;
133 int sunset, sunrise;
134 char c;
135
136 /* hebcal style command line options */
137 char *progname=argv[0];
138 int opt_c=0; /* -c option candle lighting times */
139 int opt_d=0; /* -d option hebrew date for evrey day */
140 int opt_D=0; /* -D option hebrew date for event day */
141 int opt_e=0; /* -e option use normal date format */
142 int opt_h=0; /* -h option do not show holydays */
143 int opt_i=0; /* -i option do not use diaspora reading and holyday */
144 char separator = ' '; /* -r option default separator is space */
145 int opt_s=0; /* -s option show parasha */
146 int opt_x=0; /* -x option do not show new month day */
147 double lat = 32.0; /* -l option default to Tel aviv latitude */
148 double lon = -34.0; /* -L option default to Tel aviv longitude */
149 int havdala_minutes = 72; /* -m option havdalah_minutes_past_sundown */
150 int tz = 2; /* -z option default to Tel aviv time zone */
151
152 /* command line parsing */
153 while((c=getopt(argc, argv, "cdDehirsxl:L:m:z:"))!=EOF){
154 switch(c){
155 case 'c':
156 opt_c=1;
157 break;
158 case 'd':
159 opt_d=1;
160 break;
161 case 'D':
162 opt_D=1;
163 break;
164 case 'e':
165 opt_e=1;
166 break;
167 case 'h':
168 opt_h=1;
169 break;
170 case 'i':
171 opt_i=1;
172 break;
173 case 'r':
174 separator = '\t'; /* separator is tab */
175 break;
176 case 's':
177 opt_s=1;
178 break;
179 case 'x':
180 opt_x=1;
181 break;
182 case 'l':
183 if (optarg)
184 lat = (double) atof (optarg);
185 break;
186 case 'L':
187 if (optarg)
188 lon = (double) atof (optarg);
189 break;
190 case 'm':
191 if (optarg)
192 havdala_minutes = atoi (optarg);
193 break;
194 case 'z':
195 if (optarg)
196 tz = atoi (optarg);
197 break;
198 default:
199 print_help (argv[0]);
200 exit (0);
201 break;
202 }
203 }
204
205 /* Get calendar gregorian year */
206 if (argc == optind)
207 {
208 /* set initial date */
209 hdate_set_gdate (&h, 0, 0, 0);
210 year = h.gd_year;
211 }
212 else if (argc == (optind + 1))
213 {
214 /* set initial date */
215 year = atoi (argv[optind]);
216 }
217
218 /* if you think this is not a valid year */
219 if (year <= 0)
220 {
221 /* Print help for user and exit */
222 print_help (argv[0]);
223 exit (0);
224 }
225
226 /* Set the locale to C (FIXME: original hebcal output does not use locale) */
227 setlocale (LC_ALL, "C");
228
229 /* get initial date */
230 hdate_set_gdate (&h, 1, 1, year);
231 jd = h.hd_jd;
232
233 /* Print the hebcal output */
234 while (h.gd_year == year)
235 {
236 /* get todays events */
237 reading = hdate_get_parasha (&h, !opt_i) * opt_s;
238 holyday = hdate_get_holyday (&h, !opt_i) * (1 - opt_h);
239 rosh_hodesh = (h.hd_day == 1) && !opt_x;
240 candle_lighting = (h.hd_dw == 6) && opt_c;
241 havdala = (h.hd_dw == 7) && opt_c;
242 event = reading || holyday || rosh_hodesh || candle_lighting || havdala;
243
244 /* print hebrew date */
245 if (opt_d || (opt_D && event))
246 {
247 /* print the gregorian date */
248 print_gregorian_date (&h, opt_e, separator);
249
250 /* print hebrew date */
251 print_hebrew_date (&h);
252 }
253
254 /* print parasha */
255 if (reading)
256 {
257 /* print the gregorian date */
258 print_gregorian_date (&h, opt_e, separator);
259
260 /* print parash */
261 printf ("Parashat %s\n", hdate_get_parasha_string (reading, 0));
262 }
263
264 /* print rosh hodesh */
265 if (rosh_hodesh)
266 {
267 /* print the gregorian date */
268 print_gregorian_date (&h, opt_e, separator);
269
270 /* print rosh hodesh */
271 printf ("Rosh Chodesh %s\n", hdate_get_hebrew_month_string (h.hd_mon, 0));
272 }
273
274 /* print holyday */
275 if (holyday)
276 {
277 /* print the gregorian date */
278 print_gregorian_date (&h, opt_e, separator);
279
280 /* print holyday */
281 printf ("%s\n", hdate_get_holyday_string (holyday, 0));
282 }
283
284 /* print candle lighting times */
285 if (candle_lighting)
286 {
287 /* print the gregorian date */
288 print_gregorian_date (&h, opt_e, separator);
289
290 /* get times */
291 hdate_get_utc_sun_time (h.gd_day, h.gd_mon, h.gd_year, lat, lon, &sunrise, &sunset);
292 sunset = sunset + tz * 60 - 20; /* -20 for shabat */
293
294 /* print candel lighting time */
295 printf ("Candle lighting: %d:%d\n", sunset / 60 - 12, sunset % 60);
296 }
297
298 if (havdala)
299 {
300 /* print the gregorian date */
301 print_gregorian_date (&h, opt_e, separator);
302
303 /* get times */
304 hdate_get_utc_sun_time (h.gd_day, h.gd_mon, h.gd_year, lat, lon, &sunrise, &sunset);
305 /* havdala_minutes for havdala */
306 sunset = sunset + tz * 60 + havdala_minutes;
307
308 /* print havdala time */
309 printf ("Havdalah (%d min): %d:%d\n", havdala_minutes,
310 sunset / 60 - 12, sunset % 60);
311 }
312
313 /* move to next day */
314 jd ++;
315 hdate_set_jd (&h, jd);
316 }
317
318 return 0;
319 }
0 EXTRA_DIST = hdate_reading_html.c hdate_holydays_html.c
1
2 if WITH_EXAMPLES
3
4 INCLUDES=-I$(top_srcdir)/src
5
6 DEPS= $(top_builddir)/src/libhdate.la
7 ldadd= $(top_builddir)/src/libhdate.la -lm
8
9 bin_PROGRAMS = hdate_reading_html hdate_holydays_html
10
11 hdate_reading_html_SOURCES = hdate_reading_html.c
12 hdate_reading_html_LDFLAGS =
13 hdate_reading_html_DEPENDENCIES = $(DEPS)
14 hdate_reading_html_LDADD = $(ldadd)
15
16 hdate_holydays_html_SOURCES = hdate_holydays_html.c
17 hdate_holydays_html_LDFLAGS =
18 hdate_holydays_html_DEPENDENCIES = $(DEPS)
19 hdate_holydays_html_LDADD = $(ldadd)
20
21 endif
22
23 libhdatedocdir = ${prefix}/share/doc/libhdate/examples/html
24 libhdatedoc_DATA = hdate_holydays_html.c hdate_reading_html.c
0 # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
1
2 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
3 # This Makefile.in is free software; the Free Software Foundation
4 # gives unlimited permission to copy and/or distribute it,
5 # with or without modifications, as long as this notice is preserved.
6
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
9 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 # PARTICULAR PURPOSE.
11
12
13 SHELL = @SHELL@
14
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 VPATH = @srcdir@
18 prefix = @prefix@
19 exec_prefix = @exec_prefix@
20
21 bindir = @bindir@
22 sbindir = @sbindir@
23 libexecdir = @libexecdir@
24 datadir = @datadir@
25 sysconfdir = @sysconfdir@
26 sharedstatedir = @sharedstatedir@
27 localstatedir = @localstatedir@
28 libdir = @libdir@
29 infodir = @infodir@
30 mandir = @mandir@
31 includedir = @includedir@
32 oldincludedir = /usr/include
33
34 DESTDIR =
35
36 pkgdatadir = $(datadir)/@PACKAGE@
37 pkglibdir = $(libdir)/@PACKAGE@
38 pkgincludedir = $(includedir)/@PACKAGE@
39
40 top_builddir = ../..
41
42 ACLOCAL = @ACLOCAL@
43 AUTOCONF = @AUTOCONF@
44 AUTOMAKE = @AUTOMAKE@
45 AUTOHEADER = @AUTOHEADER@
46
47 INSTALL = @INSTALL@
48 INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
49 INSTALL_DATA = @INSTALL_DATA@
50 INSTALL_SCRIPT = @INSTALL_SCRIPT@
51 transform = @program_transform_name@
52
53 NORMAL_INSTALL = :
54 PRE_INSTALL = :
55 POST_INSTALL = :
56 NORMAL_UNINSTALL = :
57 PRE_UNINSTALL = :
58 POST_UNINSTALL = :
59 host_alias = @host_alias@
60 host_triplet = @host@
61 AR = @AR@
62 AS = @AS@
63 BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
64 CATOBJEXT = @CATOBJEXT@
65 CC = @CC@
66 CFLAGS = @CFLAGS@
67 CXX = @CXX@
68 CXXCPP = @CXXCPP@
69 DATADIRNAME = @DATADIRNAME@
70 DLLTOOL = @DLLTOOL@
71 ECHO = @ECHO@
72 EGREP = @EGREP@
73 EXEEXT = @EXEEXT@
74 F77 = @F77@
75 GCJ = @GCJ@
76 GCJFLAGS = @GCJFLAGS@
77 GENCAT = @GENCAT@
78 GLIBC2 = @GLIBC2@
79 GLIBC21 = @GLIBC21@
80 GMSGFMT = @GMSGFMT@
81 HAVE_ASPRINTF = @HAVE_ASPRINTF@
82 HAVE_LIB = @HAVE_LIB@
83 HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
84 HAVE_SNPRINTF = @HAVE_SNPRINTF@
85 HAVE_WPRINTF = @HAVE_WPRINTF@
86 INSTOBJEXT = @INSTOBJEXT@
87 INTLBISON = @INTLBISON@
88 INTLLIBS = @INTLLIBS@
89 INTLOBJS = @INTLOBJS@
90 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
91 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
92 LIB = @LIB@
93 LIBICONV = @LIBICONV@
94 LIBINTL = @LIBINTL@
95 LIBS = @LIBS@
96 LIBTOOL = @LIBTOOL@
97 LN_S = @LN_S@
98 LTLIB = @LTLIB@
99 LTLIBICONV = @LTLIBICONV@
100 LTLIBINTL = @LTLIBINTL@
101 MAINT = @MAINT@
102 MAKEINFO = @MAKEINFO@
103 MKINSTALLDIRS = @MKINSTALLDIRS@
104 OBJDUMP = @OBJDUMP@
105 OBJEXT = @OBJEXT@
106 PACKAGE = @PACKAGE@
107 PA_MODULES_PATH = @PA_MODULES_PATH@
108 PA_VERSION = @PA_VERSION@
109 PE_CFLAGS = @PE_CFLAGS@
110 PE_MODULES_PATH = @PE_MODULES_PATH@
111 PKG_CONFIG = @PKG_CONFIG@
112 POSUB = @POSUB@
113 PY_CFLAGS = @PY_CFLAGS@
114 PY_MODULES_PATH = @PY_MODULES_PATH@
115 PY_VERSION = @PY_VERSION@
116 RANLIB = @RANLIB@
117 RC = @RC@
118 STRIP = @STRIP@
119 USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
120 USE_NLS = @USE_NLS@
121 VERSION = @VERSION@
122 VERSION_INFO = @VERSION_INFO@
123 have_pascal = @have_pascal@
124 have_perl = @have_perl@
125 have_python = @have_python@
126 have_swig = @have_swig@
127
128 EXTRA_DIST = hdate_reading_html.c hdate_holydays_html.c
129
130 @WITH_EXAMPLES_TRUE@INCLUDES = -I$(top_srcdir)/src
131
132 @WITH_EXAMPLES_TRUE@DEPS = $(top_builddir)/src/libhdate.la
133 @WITH_EXAMPLES_TRUE@ldadd = $(top_builddir)/src/libhdate.la -lm
134
135 @WITH_EXAMPLES_TRUE@bin_PROGRAMS = hdate_reading_html hdate_holydays_html
136
137 @WITH_EXAMPLES_TRUE@hdate_reading_html_SOURCES = hdate_reading_html.c
138 @WITH_EXAMPLES_TRUE@hdate_reading_html_LDFLAGS =
139 @WITH_EXAMPLES_TRUE@hdate_reading_html_DEPENDENCIES = $(DEPS)
140 @WITH_EXAMPLES_TRUE@hdate_reading_html_LDADD = $(ldadd)
141
142 @WITH_EXAMPLES_TRUE@hdate_holydays_html_SOURCES = hdate_holydays_html.c
143 @WITH_EXAMPLES_TRUE@hdate_holydays_html_LDFLAGS =
144 @WITH_EXAMPLES_TRUE@hdate_holydays_html_DEPENDENCIES = $(DEPS)
145 @WITH_EXAMPLES_TRUE@hdate_holydays_html_LDADD = $(ldadd)
146
147 libhdatedocdir = ${prefix}/share/doc/libhdate/examples/html
148 libhdatedoc_DATA = hdate_holydays_html.c hdate_reading_html.c
149 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
150 CONFIG_CLEAN_FILES =
151 @WITH_EXAMPLES_TRUE@bin_PROGRAMS = hdate_reading_html$(EXEEXT) \
152 @WITH_EXAMPLES_TRUE@hdate_holydays_html$(EXEEXT)
153 PROGRAMS = $(bin_PROGRAMS)
154
155
156 DEFS = @DEFS@ -I. -I$(srcdir)
157 CPPFLAGS = @CPPFLAGS@
158 LDFLAGS = @LDFLAGS@
159 @WITH_EXAMPLES_TRUE@hdate_reading_html_OBJECTS = \
160 @WITH_EXAMPLES_TRUE@hdate_reading_html.$(OBJEXT)
161 @WITH_EXAMPLES_TRUE@hdate_holydays_html_OBJECTS = \
162 @WITH_EXAMPLES_TRUE@hdate_holydays_html.$(OBJEXT)
163 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
164 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
165 CCLD = $(CC)
166 LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
167 DATA = $(libhdatedoc_DATA)
168
169 DIST_COMMON = Makefile.am Makefile.in
170
171
172 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
173
174 TAR = tar
175 GZIP_ENV = --best
176 SOURCES = $(hdate_reading_html_SOURCES) $(hdate_holydays_html_SOURCES)
177 OBJECTS = $(hdate_reading_html_OBJECTS) $(hdate_holydays_html_OBJECTS)
178
179 all: all-redirect
180 .SUFFIXES:
181 .SUFFIXES: .S .c .lo .o .obj .s
182 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
183 cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps examples/html/Makefile
184
185 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
186 cd $(top_builddir) \
187 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
188
189
190 mostlyclean-binPROGRAMS:
191
192 clean-binPROGRAMS:
193 -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
194
195 distclean-binPROGRAMS:
196
197 maintainer-clean-binPROGRAMS:
198
199 install-binPROGRAMS: $(bin_PROGRAMS)
200 @$(NORMAL_INSTALL)
201 $(mkinstalldirs) $(DESTDIR)$(bindir)
202 @list='$(bin_PROGRAMS)'; for p in $$list; do \
203 if test -f $$p; then \
204 echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
205 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
206 else :; fi; \
207 done
208
209 uninstall-binPROGRAMS:
210 @$(NORMAL_UNINSTALL)
211 list='$(bin_PROGRAMS)'; for p in $$list; do \
212 rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
213 done
214
215 .c.o:
216 $(COMPILE) -c $<
217
218 # FIXME: We should only use cygpath when building on Windows,
219 # and only if it is available.
220 .c.obj:
221 $(COMPILE) -c `cygpath -w $<`
222
223 .s.o:
224 $(COMPILE) -c $<
225
226 .S.o:
227 $(COMPILE) -c $<
228
229 mostlyclean-compile:
230 -rm -f *.o core *.core
231 -rm -f *.$(OBJEXT)
232
233 clean-compile:
234
235 distclean-compile:
236 -rm -f *.tab.c
237
238 maintainer-clean-compile:
239
240 .c.lo:
241 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
242
243 .s.lo:
244 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
245
246 .S.lo:
247 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
248
249 mostlyclean-libtool:
250 -rm -f *.lo
251
252 clean-libtool:
253 -rm -rf .libs _libs
254
255 distclean-libtool:
256
257 maintainer-clean-libtool:
258
259 hdate_reading_html$(EXEEXT): $(hdate_reading_html_OBJECTS) $(hdate_reading_html_DEPENDENCIES)
260 @rm -f hdate_reading_html$(EXEEXT)
261 $(LINK) $(hdate_reading_html_LDFLAGS) $(hdate_reading_html_OBJECTS) $(hdate_reading_html_LDADD) $(LIBS)
262
263 hdate_holydays_html$(EXEEXT): $(hdate_holydays_html_OBJECTS) $(hdate_holydays_html_DEPENDENCIES)
264 @rm -f hdate_holydays_html$(EXEEXT)
265 $(LINK) $(hdate_holydays_html_LDFLAGS) $(hdate_holydays_html_OBJECTS) $(hdate_holydays_html_LDADD) $(LIBS)
266
267 install-libhdatedocDATA: $(libhdatedoc_DATA)
268 @$(NORMAL_INSTALL)
269 $(mkinstalldirs) $(DESTDIR)$(libhdatedocdir)
270 @list='$(libhdatedoc_DATA)'; for p in $$list; do \
271 if test -f $(srcdir)/$$p; then \
272 echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(libhdatedocdir)/$$p"; \
273 $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(libhdatedocdir)/$$p; \
274 else if test -f $$p; then \
275 echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libhdatedocdir)/$$p"; \
276 $(INSTALL_DATA) $$p $(DESTDIR)$(libhdatedocdir)/$$p; \
277 fi; fi; \
278 done
279
280 uninstall-libhdatedocDATA:
281 @$(NORMAL_UNINSTALL)
282 list='$(libhdatedoc_DATA)'; for p in $$list; do \
283 rm -f $(DESTDIR)$(libhdatedocdir)/$$p; \
284 done
285
286 tags: TAGS
287
288 ID: $(HEADERS) $(SOURCES) $(LISP)
289 list='$(SOURCES) $(HEADERS)'; \
290 unique=`for i in $$list; do echo $$i; done | \
291 awk ' { files[$$0] = 1; } \
292 END { for (i in files) print i; }'`; \
293 here=`pwd` && cd $(srcdir) \
294 && mkid -f$$here/ID $$unique $(LISP)
295
296 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
297 tags=; \
298 here=`pwd`; \
299 list='$(SOURCES) $(HEADERS)'; \
300 unique=`for i in $$list; do echo $$i; done | \
301 awk ' { files[$$0] = 1; } \
302 END { for (i in files) print i; }'`; \
303 test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
304 || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
305
306 mostlyclean-tags:
307
308 clean-tags:
309
310 distclean-tags:
311 -rm -f TAGS ID
312
313 maintainer-clean-tags:
314
315 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
316
317 subdir = examples/html
318
319 distdir: $(DISTFILES)
320 @for file in $(DISTFILES); do \
321 d=$(srcdir); \
322 if test -d $$d/$$file; then \
323 cp -pr $$d/$$file $(distdir)/$$file; \
324 else \
325 test -f $(distdir)/$$file \
326 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
327 || cp -p $$d/$$file $(distdir)/$$file || :; \
328 fi; \
329 done
330
331 info-am:
332 info: info-am
333 dvi-am:
334 dvi: dvi-am
335 check-am: all-am
336 check: check-am
337 installcheck-am:
338 installcheck: installcheck-am
339 install-exec-am: install-binPROGRAMS
340 install-exec: install-exec-am
341
342 install-data-am: install-libhdatedocDATA
343 install-data: install-data-am
344
345 install-am: all-am
346 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
347 install: install-am
348 uninstall-am: uninstall-binPROGRAMS uninstall-libhdatedocDATA
349 uninstall: uninstall-am
350 all-am: Makefile $(PROGRAMS) $(DATA)
351 all-redirect: all-am
352 install-strip:
353 $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
354 installdirs:
355 $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(libhdatedocdir)
356
357
358 mostlyclean-generic:
359
360 clean-generic:
361
362 distclean-generic:
363 -rm -f Makefile $(CONFIG_CLEAN_FILES)
364 -rm -f config.cache config.log stamp-h stamp-h[0-9]*
365
366 maintainer-clean-generic:
367 mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
368 mostlyclean-libtool mostlyclean-tags \
369 mostlyclean-generic
370
371 mostlyclean: mostlyclean-am
372
373 clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
374 clean-generic mostlyclean-am
375
376 clean: clean-am
377
378 distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
379 distclean-tags distclean-generic clean-am
380 -rm -f libtool
381
382 distclean: distclean-am
383
384 maintainer-clean-am: maintainer-clean-binPROGRAMS \
385 maintainer-clean-compile maintainer-clean-libtool \
386 maintainer-clean-tags maintainer-clean-generic \
387 distclean-am
388 @echo "This command is intended for maintainers to use;"
389 @echo "it deletes files that may require special tools to rebuild."
390
391 maintainer-clean: maintainer-clean-am
392
393 .PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
394 maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
395 mostlyclean-compile distclean-compile clean-compile \
396 maintainer-clean-compile mostlyclean-libtool distclean-libtool \
397 clean-libtool maintainer-clean-libtool uninstall-libhdatedocDATA \
398 install-libhdatedocDATA tags mostlyclean-tags distclean-tags clean-tags \
399 maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \
400 installcheck-am installcheck install-exec-am install-exec \
401 install-data-am install-data install-am install uninstall-am uninstall \
402 all-redirect all-am all installdirs mostlyclean-generic \
403 distclean-generic clean-generic maintainer-clean-generic clean \
404 mostlyclean distclean maintainer-clean
405
406
407 # Tell versions [3.59,3.63) of GNU make to not export all variables.
408 # Otherwise a system limit (for SysV at least) may be exceeded.
409 .NOEXPORT:
0 /* hdate_holydays_html.c
1 * Example file for libhdate.
2 *
3 * compile:
4 * gcc `pkg-config --libs --cflags libhdate` hdate_holydays_html.c -o hdate_holydays_html
5 *
6 * Copyright: 2005 (c) Yaacov Zamir
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) 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, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 * 02111-1307, USA.
22 */
23
24
25 #include <stdio.h> /* For printf */
26 #include <hdate.h> /* For hebrew date */
27 #include <stdlib.h> /* For atoi */
28 #include <locale.h> /* For setlocale */
29
30 int
31 main (int argc, char* argv[])
32 {
33 hdate_struct h; /* The Hebrew date */
34
35 int jd;
36 int holyday;
37 int year;
38
39 /* Get calendar hebrew year */
40 if (argc == 2)
41 {
42 /* Set start and end dates of the iCal file from user */
43 year = atoi (argv[1]);
44
45 hdate_set_hdate (&h, 1, 1, year);
46 jd = h.hd_jd;
47 }
48 else
49 {
50 /* Print help for user and exit */
51 printf ("USAGE: %s year\n", argv[0]);
52 exit (0);
53 }
54
55 /* Set the locale to Hebrew*/
56 setlocale (LC_ALL,"he_IL");
57
58 /* Print start of html format */
59 printf ("<html>\n");
60 printf ("<head>\n");
61 printf ("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">");
62 printf ("<title>לוח שנה</title>\n");
63 printf ("</head>\n");
64 printf ("<body dir=\"rtl\">\n");
65
66 /* Print the html calendar */
67 printf ("<h1>לוח שנה, חגים לשנת %s</h1>\n", hdate_get_int_string (h.hd_year));
68 printf ("<h3>אורכה %d ימים, ראש השנה ביום %s</h3>\n", h.hd_size_of_year, hdate_get_day_string (h.hd_new_year_dw, 0));
69
70 while (h.hd_year == year)
71 {
72 /* if start of month print header with long month name*/
73 if (h.hd_day == 1)
74 printf ("<h2>%s</h2>\n", hdate_get_hebrew_month_string (h.hd_mon, 0));
75
76 /* set diaspora flag to 0, for holydays ba harez */
77 holyday = hdate_get_holyday (&h, 0);
78
79 if (holyday != 0)
80 {
81 printf ("%d,%d,%d %s</br>\n", h.gd_day, h.gd_mon, h.gd_year, hdate_get_format_date (&h, 0, 0));
82 }
83
84 /* get today hdate */
85 jd++;
86 hdate_set_jd (&h, jd);
87 }
88
89 /* Print end of html format */
90 printf ("</body>\n");
91 printf ("</html>\n");
92
93 return 0;
94 }
0 /* hdate_holydays_html.c
1 * Example file for libhdate.
2 *
3 * compile:
4 * gcc `pkg-config --libs --cflags libhdate` hdate_holydays_html.c -o hdate_holydays_html
5 *
6 * Copyright: 2005 (c) Yaacov Zamir
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) 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, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 * 02111-1307, USA.
22 */
23
24 #include <stdio.h> /* For printf */
25 #include <hdate.h> /* For hebrew date */
26 #include <stdlib.h> /* For atoi */
27 #include <locale.h> /* For setlocale */
28
29 /* some useful time zones
30 * Eilat 29, -34, 2
31 * Haifa 32, -34, 2
32 * Jerusalem 31, -35, 2
33 * Tel Aviv 32, -34, 2
34 */
35
36 /* define Tel Aviv time zone */
37 #define tz 2
38 #define lat 32.0
39 #define lon -34.0
40
41 int
42 main (int argc, char* argv[])
43 {
44 hdate_struct h; /* The Hebrew date */
45
46 int jd;
47 int reading;
48 int year;
49 int sunset, sunrise;
50
51 /* Get calendar hebrew year */
52 if (argc == 2)
53 {
54 year = atoi (argv[1]);
55 hdate_set_hdate (&h, 1, 1, year);
56
57 /* get the julian of first shabat in year */
58 jd = h.hd_jd + (7 - h.hd_dw);
59 hdate_set_jd (&h, jd);
60 }
61 else
62 {
63 /* Print help for user and exit */
64 printf ("USAGE: %s year\n", argv[0]);
65 exit (0);
66 }
67
68 /* Set the locale to Hebrew*/
69 setlocale (LC_ALL,"he_IL");
70
71 /* Print start of html format */
72 printf ("<html>\n");
73 printf ("<head>\n");
74 printf ("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">");
75 printf ("<title>לוח שנה</title>\n");
76 printf ("</head>\n");
77 printf ("<body dir=\"rtl\">\n");
78
79 /* Print the html calendar */
80 printf ("<h1>לוח שנה, קריאות בתורה לשנת %s</h1>\n", hdate_get_int_string (h.hd_year));
81 printf ("<h3>אורכה %d ימים, ראש השנה ביום %s</h3>\n", h.hd_size_of_year, hdate_get_day_string (h.hd_new_year_dw, 0));
82 printf ("<h4>זמני הזריחות והשקיעות לפי שעון חורף, אזור המרכז</h4>\n");
83
84 while (h.hd_year == year)
85 {
86 reading = hdate_get_parasha (&h, 0);
87
88 if (reading != 0)
89 {
90 printf ("%d,%d,%d %s, %s</br>\n", h.gd_day, h.gd_mon, h.gd_year,
91 hdate_get_format_date (&h, 0, 0),
92 hdate_get_parasha_string (reading, 0));
93 }
94 else
95 {
96 printf ("%d,%d,%d %s</br>\n", h.gd_day, h.gd_mon, h.gd_year,
97 hdate_get_format_date (&h, 0, 0));
98 }
99
100 /* print sunrise and sunset times of fri and sat. */
101 hdate_set_jd (&h, jd - 1);
102 hdate_get_utc_sun_time (h.gd_day, h.gd_mon, h.gd_year, lat, lon, &sunrise, &sunset);
103 sunrise = sunrise + tz * 60;
104 sunset = sunset + tz * 60;
105
106 printf ("יום שישי</br>\n");
107 printf ("זריחה %d:%d, שקיעה %d:%d</br>\n", sunrise / 60, sunrise % 60, sunset / 60, sunset % 60);
108
109 hdate_set_jd (&h, jd);
110 hdate_get_utc_sun_time (h.gd_day, h.gd_mon, h.gd_year, lat, lon, &sunrise, &sunset);
111 sunrise = sunrise + tz * 60;
112 sunset = sunset + tz * 60;
113
114 printf ("יום שבת</br>\n");
115 printf ("זריחה %d:%d, שקיעה %d:%d</br>\n", sunrise / 60, sunrise % 60, sunset / 60, sunset % 60);
116
117 /* print a seperator */
118 printf ("------</br>\n");
119
120 /* get next week shabats hdate */
121 hdate_set_jd (&h, jd);
122 jd = jd + 7;
123 }
124
125 /* Print end of html format */
126 printf ("</body>\n");
127 printf ("</html>\n");
128
129 return 0;
130 }
0 EXTRA_DIST = hdate_reading_ical.c hdate_holydays_ical.c
1
2 if WITH_EXAMPLES
3
4 INCLUDES=-I$(top_srcdir)/src
5
6 DEPS= $(top_builddir)/src/libhdate.la
7 ldadd= $(top_builddir)/src/libhdate.la -lm
8
9 bin_PROGRAMS = hdate_reading_ical hdate_holydays_ical
10
11 hdate_reading_ical_SOURCES = hdate_reading_ical.c
12 hdate_reading_ical_LDFLAGS =
13 hdate_reading_ical_DEPENDENCIES = $(DEPS)
14 hdate_reading_ical_LDADD = $(ldadd)
15
16 hdate_holydays_ical_SOURCES = hdate_holydays_ical.c
17 hdate_holydays_ical_LDFLAGS =
18 hdate_holydays_ical_DEPENDENCIES = $(DEPS)
19 hdate_holydays_ical_LDADD = $(ldadd)
20
21 endif
22
23 libhdatedocdir = ${prefix}/share/doc/libhdate/examples/ical
24 libhdatedoc_DATA = hdate_holydays_ical.c hdate_reading_ical.c
0 # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
1
2 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
3 # This Makefile.in is free software; the Free Software Foundation
4 # gives unlimited permission to copy and/or distribute it,
5 # with or without modifications, as long as this notice is preserved.
6
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
9 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 # PARTICULAR PURPOSE.
11
12
13 SHELL = @SHELL@
14
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 VPATH = @srcdir@
18 prefix = @prefix@
19 exec_prefix = @exec_prefix@
20
21 bindir = @bindir@
22 sbindir = @sbindir@
23 libexecdir = @libexecdir@
24 datadir = @datadir@
25 sysconfdir = @sysconfdir@
26 sharedstatedir = @sharedstatedir@
27 localstatedir = @localstatedir@
28 libdir = @libdir@
29 infodir = @infodir@
30 mandir = @mandir@
31 includedir = @includedir@
32 oldincludedir = /usr/include
33
34 DESTDIR =
35
36 pkgdatadir = $(datadir)/@PACKAGE@
37 pkglibdir = $(libdir)/@PACKAGE@
38 pkgincludedir = $(includedir)/@PACKAGE@
39
40 top_builddir = ../..
41
42 ACLOCAL = @ACLOCAL@
43 AUTOCONF = @AUTOCONF@
44 AUTOMAKE = @AUTOMAKE@
45 AUTOHEADER = @AUTOHEADER@
46
47 INSTALL = @INSTALL@
48 INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
49 INSTALL_DATA = @INSTALL_DATA@
50 INSTALL_SCRIPT = @INSTALL_SCRIPT@
51 transform = @program_transform_name@
52
53 NORMAL_INSTALL = :
54 PRE_INSTALL = :
55 POST_INSTALL = :
56 NORMAL_UNINSTALL = :
57 PRE_UNINSTALL = :
58 POST_UNINSTALL = :
59 host_alias = @host_alias@
60 host_triplet = @host@
61 AR = @AR@
62 AS = @AS@
63 BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
64 CATOBJEXT = @CATOBJEXT@
65 CC = @CC@
66 CFLAGS = @CFLAGS@
67 CXX = @CXX@
68 CXXCPP = @CXXCPP@
69 DATADIRNAME = @DATADIRNAME@
70 DLLTOOL = @DLLTOOL@
71 ECHO = @ECHO@
72 EGREP = @EGREP@
73 EXEEXT = @EXEEXT@
74 F77 = @F77@
75 GCJ = @GCJ@
76 GCJFLAGS = @GCJFLAGS@
77 GENCAT = @GENCAT@
78 GLIBC2 = @GLIBC2@
79 GLIBC21 = @GLIBC21@
80 GMSGFMT = @GMSGFMT@
81 HAVE_ASPRINTF = @HAVE_ASPRINTF@
82 HAVE_LIB = @HAVE_LIB@
83 HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
84 HAVE_SNPRINTF = @HAVE_SNPRINTF@
85 HAVE_WPRINTF = @HAVE_WPRINTF@
86 INSTOBJEXT = @INSTOBJEXT@
87 INTLBISON = @INTLBISON@
88 INTLLIBS = @INTLLIBS@
89 INTLOBJS = @INTLOBJS@
90 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
91 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
92 LIB = @LIB@
93 LIBICONV = @LIBICONV@
94 LIBINTL = @LIBINTL@
95 LIBS = @LIBS@
96 LIBTOOL = @LIBTOOL@
97 LN_S = @LN_S@
98 LTLIB = @LTLIB@
99 LTLIBICONV = @LTLIBICONV@
100 LTLIBINTL = @LTLIBINTL@
101 MAINT = @MAINT@
102 MAKEINFO = @MAKEINFO@
103 MKINSTALLDIRS = @MKINSTALLDIRS@
104 OBJDUMP = @OBJDUMP@
105 OBJEXT = @OBJEXT@
106 PACKAGE = @PACKAGE@
107 PA_MODULES_PATH = @PA_MODULES_PATH@
108 PA_VERSION = @PA_VERSION@
109 PE_CFLAGS = @PE_CFLAGS@
110 PE_MODULES_PATH = @PE_MODULES_PATH@
111 PKG_CONFIG = @PKG_CONFIG@
112 POSUB = @POSUB@
113 PY_CFLAGS = @PY_CFLAGS@
114 PY_MODULES_PATH = @PY_MODULES_PATH@
115 PY_VERSION = @PY_VERSION@
116 RANLIB = @RANLIB@
117 RC = @RC@
118 STRIP = @STRIP@
119 USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
120 USE_NLS = @USE_NLS@
121 VERSION = @VERSION@
122 VERSION_INFO = @VERSION_INFO@
123 have_pascal = @have_pascal@
124 have_perl = @have_perl@
125 have_python = @have_python@
126 have_swig = @have_swig@
127
128 EXTRA_DIST = hdate_reading_ical.c hdate_holydays_ical.c
129
130 @WITH_EXAMPLES_TRUE@INCLUDES = -I$(top_srcdir)/src
131
132 @WITH_EXAMPLES_TRUE@DEPS = $(top_builddir)/src/libhdate.la
133 @WITH_EXAMPLES_TRUE@ldadd = $(top_builddir)/src/libhdate.la -lm
134
135 @WITH_EXAMPLES_TRUE@bin_PROGRAMS = hdate_reading_ical hdate_holydays_ical
136
137 @WITH_EXAMPLES_TRUE@hdate_reading_ical_SOURCES = hdate_reading_ical.c
138 @WITH_EXAMPLES_TRUE@hdate_reading_ical_LDFLAGS =
139 @WITH_EXAMPLES_TRUE@hdate_reading_ical_DEPENDENCIES = $(DEPS)
140 @WITH_EXAMPLES_TRUE@hdate_reading_ical_LDADD = $(ldadd)
141
142 @WITH_EXAMPLES_TRUE@hdate_holydays_ical_SOURCES = hdate_holydays_ical.c
143 @WITH_EXAMPLES_TRUE@hdate_holydays_ical_LDFLAGS =
144 @WITH_EXAMPLES_TRUE@hdate_holydays_ical_DEPENDENCIES = $(DEPS)
145 @WITH_EXAMPLES_TRUE@hdate_holydays_ical_LDADD = $(ldadd)
146
147 libhdatedocdir = ${prefix}/share/doc/libhdate/examples/ical
148 libhdatedoc_DATA = hdate_holydays_ical.c hdate_reading_ical.c
149 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
150 CONFIG_CLEAN_FILES =
151 @WITH_EXAMPLES_TRUE@bin_PROGRAMS = hdate_reading_ical$(EXEEXT) \
152 @WITH_EXAMPLES_TRUE@hdate_holydays_ical$(EXEEXT)
153 PROGRAMS = $(bin_PROGRAMS)
154
155
156 DEFS = @DEFS@ -I. -I$(srcdir)
157 CPPFLAGS = @CPPFLAGS@
158 LDFLAGS = @LDFLAGS@
159 @WITH_EXAMPLES_TRUE@hdate_reading_ical_OBJECTS = \
160 @WITH_EXAMPLES_TRUE@hdate_reading_ical.$(OBJEXT)
161 @WITH_EXAMPLES_TRUE@hdate_holydays_ical_OBJECTS = \
162 @WITH_EXAMPLES_TRUE@hdate_holydays_ical.$(OBJEXT)
163 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
164 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
165 CCLD = $(CC)
166 LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
167 DATA = $(libhdatedoc_DATA)
168
169 DIST_COMMON = Makefile.am Makefile.in
170
171
172 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
173
174 TAR = tar
175 GZIP_ENV = --best
176 SOURCES = $(hdate_reading_ical_SOURCES) $(hdate_holydays_ical_SOURCES)
177 OBJECTS = $(hdate_reading_ical_OBJECTS) $(hdate_holydays_ical_OBJECTS)
178
179 all: all-redirect
180 .SUFFIXES:
181 .SUFFIXES: .S .c .lo .o .obj .s
182 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
183 cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps examples/ical/Makefile
184
185 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
186 cd $(top_builddir) \
187 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
188
189
190 mostlyclean-binPROGRAMS:
191
192 clean-binPROGRAMS:
193 -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
194
195 distclean-binPROGRAMS:
196
197 maintainer-clean-binPROGRAMS:
198
199 install-binPROGRAMS: $(bin_PROGRAMS)
200 @$(NORMAL_INSTALL)
201 $(mkinstalldirs) $(DESTDIR)$(bindir)
202 @list='$(bin_PROGRAMS)'; for p in $$list; do \
203 if test -f $$p; then \
204 echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
205 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
206 else :; fi; \
207 done
208
209 uninstall-binPROGRAMS:
210 @$(NORMAL_UNINSTALL)
211 list='$(bin_PROGRAMS)'; for p in $$list; do \
212 rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
213 done
214
215 .c.o:
216 $(COMPILE) -c $<
217
218 # FIXME: We should only use cygpath when building on Windows,
219 # and only if it is available.
220 .c.obj:
221 $(COMPILE) -c `cygpath -w $<`
222
223 .s.o:
224 $(COMPILE) -c $<
225
226 .S.o:
227 $(COMPILE) -c $<
228
229 mostlyclean-compile:
230 -rm -f *.o core *.core
231 -rm -f *.$(OBJEXT)
232
233 clean-compile:
234
235 distclean-compile:
236 -rm -f *.tab.c
237
238 maintainer-clean-compile:
239
240 .c.lo:
241 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
242
243 .s.lo:
244 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
245
246 .S.lo:
247 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
248
249 mostlyclean-libtool:
250 -rm -f *.lo
251
252 clean-libtool:
253 -rm -rf .libs _libs
254
255 distclean-libtool:
256
257 maintainer-clean-libtool:
258
259 hdate_reading_ical$(EXEEXT): $(hdate_reading_ical_OBJECTS) $(hdate_reading_ical_DEPENDENCIES)
260 @rm -f hdate_reading_ical$(EXEEXT)
261 $(LINK) $(hdate_reading_ical_LDFLAGS) $(hdate_reading_ical_OBJECTS) $(hdate_reading_ical_LDADD) $(LIBS)
262
263 hdate_holydays_ical$(EXEEXT): $(hdate_holydays_ical_OBJECTS) $(hdate_holydays_ical_DEPENDENCIES)
264 @rm -f hdate_holydays_ical$(EXEEXT)
265 $(LINK) $(hdate_holydays_ical_LDFLAGS) $(hdate_holydays_ical_OBJECTS) $(hdate_holydays_ical_LDADD) $(LIBS)
266
267 install-libhdatedocDATA: $(libhdatedoc_DATA)
268 @$(NORMAL_INSTALL)
269 $(mkinstalldirs) $(DESTDIR)$(libhdatedocdir)
270 @list='$(libhdatedoc_DATA)'; for p in $$list; do \
271 if test -f $(srcdir)/$$p; then \
272 echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(libhdatedocdir)/$$p"; \
273 $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(libhdatedocdir)/$$p; \
274 else if test -f $$p; then \
275 echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libhdatedocdir)/$$p"; \
276 $(INSTALL_DATA) $$p $(DESTDIR)$(libhdatedocdir)/$$p; \
277 fi; fi; \
278 done
279
280 uninstall-libhdatedocDATA:
281 @$(NORMAL_UNINSTALL)
282 list='$(libhdatedoc_DATA)'; for p in $$list; do \
283 rm -f $(DESTDIR)$(libhdatedocdir)/$$p; \
284 done
285
286 tags: TAGS
287
288 ID: $(HEADERS) $(SOURCES) $(LISP)
289 list='$(SOURCES) $(HEADERS)'; \
290 unique=`for i in $$list; do echo $$i; done | \
291 awk ' { files[$$0] = 1; } \
292 END { for (i in files) print i; }'`; \
293 here=`pwd` && cd $(srcdir) \
294 && mkid -f$$here/ID $$unique $(LISP)
295
296 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
297 tags=; \
298 here=`pwd`; \
299 list='$(SOURCES) $(HEADERS)'; \
300 unique=`for i in $$list; do echo $$i; done | \
301 awk ' { files[$$0] = 1; } \
302 END { for (i in files) print i; }'`; \
303 test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
304 || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
305
306 mostlyclean-tags:
307
308 clean-tags:
309
310 distclean-tags:
311 -rm -f TAGS ID
312
313 maintainer-clean-tags:
314
315 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
316
317 subdir = examples/ical
318
319 distdir: $(DISTFILES)
320 @for file in $(DISTFILES); do \
321 d=$(srcdir); \
322 if test -d $$d/$$file; then \
323 cp -pr $$d/$$file $(distdir)/$$file; \
324 else \
325 test -f $(distdir)/$$file \
326 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
327 || cp -p $$d/$$file $(distdir)/$$file || :; \
328 fi; \
329 done
330
331 info-am:
332 info: info-am
333 dvi-am:
334 dvi: dvi-am
335 check-am: all-am
336 check: check-am
337 installcheck-am:
338 installcheck: installcheck-am
339 install-exec-am: install-binPROGRAMS
340 install-exec: install-exec-am
341
342 install-data-am: install-libhdatedocDATA
343 install-data: install-data-am
344
345 install-am: all-am
346 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
347 install: install-am
348 uninstall-am: uninstall-binPROGRAMS uninstall-libhdatedocDATA
349 uninstall: uninstall-am
350 all-am: Makefile $(PROGRAMS) $(DATA)
351 all-redirect: all-am
352 install-strip:
353 $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
354 installdirs:
355 $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(libhdatedocdir)
356
357
358 mostlyclean-generic:
359
360 clean-generic:
361
362 distclean-generic:
363 -rm -f Makefile $(CONFIG_CLEAN_FILES)
364 -rm -f config.cache config.log stamp-h stamp-h[0-9]*
365
366 maintainer-clean-generic:
367 mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
368 mostlyclean-libtool mostlyclean-tags \
369 mostlyclean-generic
370
371 mostlyclean: mostlyclean-am
372
373 clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
374 clean-generic mostlyclean-am
375
376 clean: clean-am
377
378 distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
379 distclean-tags distclean-generic clean-am
380 -rm -f libtool
381
382 distclean: distclean-am
383
384 maintainer-clean-am: maintainer-clean-binPROGRAMS \
385 maintainer-clean-compile maintainer-clean-libtool \
386 maintainer-clean-tags maintainer-clean-generic \
387 distclean-am
388 @echo "This command is intended for maintainers to use;"
389 @echo "it deletes files that may require special tools to rebuild."
390
391 maintainer-clean: maintainer-clean-am
392
393 .PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
394 maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
395 mostlyclean-compile distclean-compile clean-compile \
396 maintainer-clean-compile mostlyclean-libtool distclean-libtool \
397 clean-libtool maintainer-clean-libtool uninstall-libhdatedocDATA \
398 install-libhdatedocDATA tags mostlyclean-tags distclean-tags clean-tags \
399 maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \
400 installcheck-am installcheck install-exec-am install-exec \
401 install-data-am install-data install-am install uninstall-am uninstall \
402 all-redirect all-am all installdirs mostlyclean-generic \
403 distclean-generic clean-generic maintainer-clean-generic clean \
404 mostlyclean distclean maintainer-clean
405
406
407 # Tell versions [3.59,3.63) of GNU make to not export all variables.
408 # Otherwise a system limit (for SysV at least) may be exceeded.
409 .NOEXPORT:
0 /* hdate_holydays_ical.c
1 * Example file for libhdate.
2 *
3 * compile:
4 * gcc `pkg-config --libs --cflags libhdate` hdate_holydays_ical.c -o hdate_holydays_ical
5 *
6 * Copyright: 2004 (c) Yaacov Zamir
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) 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, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 * 02111-1307, USA.
22 */
23
24
25 #include <stdio.h> /* For printf */
26 #include <hdate.h> /* For hebrew date */
27 #include <stdlib.h> /* For atoi */
28 #include <locale.h> /* For setlocale */
29
30 int
31 main (int argc, char* argv[])
32 {
33 hdate_struct h; /* The Hebrew date */
34
35 int jd;
36 int holyday;
37 char* event_summary;
38
39 int start_jd; /* The Julian day number to start iCal calendar from */
40 int end_jd; /* The Julian day number to end iCal calendar with */
41
42 int start_d ;
43 int start_m;
44 int start_y;
45 int end_d;
46 int end_m;
47 int end_y;
48
49 /* Get start and end dates of the iCal file from user */
50 if (argc == 7)
51 {
52 /* Set start and end dates of the iCal file from user */
53 start_d = atoi (argv[1]);
54 start_m = atoi (argv[2]);
55 start_y = atoi (argv[3]);
56 end_d = atoi (argv[4]);
57 end_m = atoi (argv[5]);
58 end_y = atoi (argv[6]);
59
60 hdate_set_gdate (&h, start_d, start_m, start_y);
61 start_jd = h.hd_jd;
62
63 hdate_set_gdate (&h, end_d, end_m, end_y);
64 end_jd = h.hd_jd;
65 }
66 else
67 {
68 /* Print help for user and exit */
69 printf ("USAGE: %s start_day start_month start_year end_day end_month end_year\n", argv[0]);
70 exit (0);
71 }
72
73 /* Set the locale, for libhdate to print locale messages */
74 setlocale (LC_ALL,"");
75
76 /* Print start of iCal format */
77 printf ("BEGIN:VCALENDAR\n");
78 printf ("CALSCALE:GREGORIAN\n");
79 printf ("METHOD:PUBLISH\n");
80
81 /* Print iCal event */
82 for (jd = start_jd; jd < end_jd; jd++)
83 {
84 /* get today hdate */
85 hdate_set_jd (&h, jd);
86
87 /* set diaspora flag to 0, for holydays ba harez */
88 holyday = hdate_get_holyday (&h, 0);
89
90 if (holyday != 0)
91 {
92 event_summary = hdate_get_holyday_string (holyday, 0);
93
94 printf ("BEGIN:VEVENT\n");
95 printf ("UID:0\n");
96 printf ("DTSTART;VALUE=DATE:%04d%02d%02d\n", h.gd_year, h.gd_mon, h.gd_day);
97 printf ("SUMMARY:%s\n", event_summary);
98 printf ("DTEND;VALUE=DATE:%04d%02d%02d\n", h.gd_year, h.gd_mon, h.gd_day);
99 printf ("CATEGORIES:Holidays\n");
100 printf ("END:VEVENT\n");
101 }
102 }
103
104 /* Print end of iCal format */
105 printf ("END:VCALENDAR\n");
106
107 return 0;
108 }
0 /* hdate_reading_ical.c
1 * Example file for libhdate.
2 *
3 * compile:
4 * gcc `pkg-config --libs --cflags libhdate` hdate_reading_ical.c -o hdate_reading_ical
5 *
6 * Copyright: 2004 (c) Yaacov Zamir
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) 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, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 * 02111-1307, USA.
22 */
23
24
25 #include <stdio.h> /* For printf */
26 #include <hdate.h> /* For hebrew date */
27 #include <stdlib.h> /* For atoi */
28 #include <locale.h> /* For setlocale */
29
30 int
31 main (int argc, char* argv[])
32 {
33 hdate_struct h; /* The Hebrew date */
34
35 int jd;
36 int parasha;
37 char* event_summary;
38
39 int start_jd; /* The Julian day number to start iCal calendar from */
40 int end_jd; /* The Julian day number to end iCal calendar with */
41
42 int start_d ;
43 int start_m;
44 int start_y;
45 int end_d;
46 int end_m;
47 int end_y;
48
49 /* Get start and end dates of the iCal file from user */
50 if (argc == 7)
51 {
52 /* Set start and end dates of the iCal file from user */
53 start_d = atoi (argv[1]);
54 start_m = atoi (argv[2]);
55 start_y = atoi (argv[3]);
56 end_d = atoi (argv[4]);
57 end_m = atoi (argv[5]);
58 end_y = atoi (argv[6]);
59
60 hdate_set_gdate (&h, start_d, start_m, start_y);
61 start_jd = h.hd_jd;
62
63 hdate_set_gdate (&h, end_d, end_m, end_y);
64 end_jd = h.hd_jd;
65 }
66 else
67 {
68 /* Print help for user and exit */
69 printf ("USAGE: %s start_day start_month start_year end_day end_month end_year\n", argv[0]);
70 exit (0);
71 }
72
73 /* Set the locale, for libhdate to print locale messages */
74 setlocale (LC_ALL,"");
75
76 /* Print start of iCal format */
77 printf ("BEGIN:VCALENDAR\n");
78 printf ("CALSCALE:GREGORIAN\n");
79 printf ("METHOD:PUBLISH\n");
80
81 /* Print iCal event */
82 for (jd = start_jd; jd < end_jd; jd++)
83 {
84 /* get today hdate */
85 hdate_set_jd (&h, jd);
86
87 /* set diaspora flag to 0, for reading ba harez */
88 parasha = hdate_get_parasha (&h, 0);
89
90 if (parasha != 0)
91 {
92 event_summary = hdate_get_parasha_string (parasha, 0);
93
94 printf ("BEGIN:VEVENT\n");
95 printf ("UID:0\n");
96 printf ("DTSTART;VALUE=DATE:%04d%02d%02d\n", h.gd_year, h.gd_mon, h.gd_day);
97 printf ("SUMMARY:%s\n", event_summary);
98 printf ("DTEND;VALUE=DATE:%04d%02d%02d\n", h.gd_year, h.gd_mon, h.gd_day);
99 printf ("CATEGORIES:Holidays\n");
100 printf ("END:VEVENT\n");
101 }
102 }
103
104 /* Print end of iCal format */
105 printf ("END:VCALENDAR\n");
106
107 return 0;
108 }
0 hdate_README: This is the original README file from hdate 0.5p (see README file
1 for this project readme).
2
3 -----------------------------------------------------------------------------
4
5 This is Amos Shapir's "hdate" package fixed and patched by Nadav Har'El.
6 Below is the original package's README - see NEWS for what changed.
7
8 ------------------------------------------------------------------------------
9 This is the 5th distribution of hdate/hcal. It should be portable
10 anywhere, but for machines which have sizeof(int) != sizeof(long), you
11 may have to change a few 'int's to 'long', and suffix 'L' to some
12 constants; sorry, I have no way to tell which. It also expects the UNIX
13 "time.h" structures, but that shouldn't be hard to change to fit other
14 systems. If you port the code to any other system, please send the
15 diffs to the author for inclusion in the next release.
16
17 The files included herein are:
18 README - this file.
19 explain - an explanation of the algorithm.
20 hdate.6 - the man page (nroff/troff source).
21 Makefile
22 hdate.h - common definitions.
23 hdate.c - main source file for hdate.
24 hcal.c - main source file for hcal.
25 hcom.c - code common to both hdate & hcal.
26
27 Compilation options:
28
29 HEBREW - make a version that prints on a Hebrew printer/terminal, given
30 the "-h" flag. All Hebrew words are initialized in left-to-right
31 lower-case letters, and passed through the function rev() for
32 conversion. I have included a function which reverses them to
33 right-to-left order, and optionally converts to the ISO-8859/8 standard
34 or IBM representation. You may need to write your own rev() function to
35 convert to what your printer expects, or else delete it and pipe the
36 output through "rev", "tr" or "sed".
37
38 USA_DATE - make hdate accept the arguments as "month day year" instead
39 of the default "day month year" (note that hdate.6 has to be changed to
40 document this order).
41
42 Good Luck,
43 Amos Shapir
44 July 1992 - Tamuz 5752
45
46 Net: amos@cs.cs.huji.ac.il
47 Paper: The Hebrew Univ. of Jerusalem, Dept. of Comp. Science.
48 Givat-Ram, Jerusalem 91904, Israel
49 Tel: +972 2 585706 GEO: 35 11 46 E / 31 46 21 N
0 #!/bin/sh
1 #
2 # install - install a program, script, or datafile
3 #
4 # This originates from X11R5 (mit/util/scripts/install.sh), which was
5 # later released in X11R6 (xc/config/util/install.sh) with the
6 # following copyright and license.
7 #
8 # Copyright (C) 1994 X Consortium
9 #
10 # Permission is hereby granted, free of charge, to any person obtaining a copy
11 # of this software and associated documentation files (the "Software"), to
12 # deal in the Software without restriction, including without limitation the
13 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
14 # sell copies of the Software, and to permit persons to whom the Software is
15 # furnished to do so, subject to the following conditions:
16 #
17 # The above copyright notice and this permission notice shall be included in
18 # all copies or substantial portions of the Software.
19 #
20 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
24 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
25 # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 #
27 # Except as contained in this notice, the name of the X Consortium shall not
28 # be used in advertising or otherwise to promote the sale, use or other deal-
29 # ings in this Software without prior written authorization from the X Consor-
30 # tium.
31 #
32 #
33 # FSF changes to this file are in the public domain.
34 #
35 # Calling this script install-sh is preferred over install.sh, to prevent
36 # `make' implicit rules from creating a file called install from it
37 # when there is no Makefile.
38 #
39 # This script is compatible with the BSD install script, but was written
40 # from scratch. It can only install one file at a time, a restriction
41 # shared with many OS's install programs.
42
43
44 # set DOITPROG to echo to test this script
45
46 # Don't use :- since 4.3BSD and earlier shells don't like it.
47 doit="${DOITPROG-}"
48
49
50 # put in absolute paths if you don't have them in your path; or use env. vars.
51
52 mvprog="${MVPROG-mv}"
53 cpprog="${CPPROG-cp}"
54 chmodprog="${CHMODPROG-chmod}"
55 chownprog="${CHOWNPROG-chown}"
56 chgrpprog="${CHGRPPROG-chgrp}"
57 stripprog="${STRIPPROG-strip}"
58 rmprog="${RMPROG-rm}"
59 mkdirprog="${MKDIRPROG-mkdir}"
60
61 transformbasename=""
62 transform_arg=""
63 instcmd="$mvprog"
64 chmodcmd="$chmodprog 0755"
65 chowncmd=""
66 chgrpcmd=""
67 stripcmd=""
68 rmcmd="$rmprog -f"
69 mvcmd="$mvprog"
70 src=""
71 dst=""
72 dir_arg=""
73
74 while [ x"$1" != x ]; do
75 case $1 in
76 -c) instcmd="$cpprog"
77 shift
78 continue;;
79
80 -d) dir_arg=true
81 shift
82 continue;;
83
84 -m) chmodcmd="$chmodprog $2"
85 shift
86 shift
87 continue;;
88
89 -o) chowncmd="$chownprog $2"
90 shift
91 shift
92 continue;;
93
94 -g) chgrpcmd="$chgrpprog $2"
95 shift
96 shift
97 continue;;
98
99 -s) stripcmd="$stripprog"
100 shift
101 continue;;
102
103 -t=*) transformarg=`echo $1 | sed 's/-t=//'`
104 shift
105 continue;;
106
107 -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
108 shift
109 continue;;
110
111 *) if [ x"$src" = x ]
112 then
113 src=$1
114 else
115 # this colon is to work around a 386BSD /bin/sh bug
116 :
117 dst=$1
118 fi
119 shift
120 continue;;
121 esac
122 done
123
124 if [ x"$src" = x ]
125 then
126 echo "install: no input file specified"
127 exit 1
128 else
129 true
130 fi
131
132 if [ x"$dir_arg" != x ]; then
133 dst=$src
134 src=""
135
136 if [ -d $dst ]; then
137 instcmd=:
138 chmodcmd=""
139 else
140 instcmd=mkdir
141 fi
142 else
143
144 # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
145 # might cause directories to be created, which would be especially bad
146 # if $src (and thus $dsttmp) contains '*'.
147
148 if [ -f $src -o -d $src ]
149 then
150 true
151 else
152 echo "install: $src does not exist"
153 exit 1
154 fi
155
156 if [ x"$dst" = x ]
157 then
158 echo "install: no destination specified"
159 exit 1
160 else
161 true
162 fi
163
164 # If destination is a directory, append the input filename; if your system
165 # does not like double slashes in filenames, you may need to add some logic
166
167 if [ -d $dst ]
168 then
169 dst="$dst"/`basename $src`
170 else
171 true
172 fi
173 fi
174
175 ## this sed command emulates the dirname command
176 dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
177
178 # Make sure that the destination directory exists.
179 # this part is taken from Noah Friedman's mkinstalldirs script
180
181 # Skip lots of stat calls in the usual case.
182 if [ ! -d "$dstdir" ]; then
183 defaultIFS='
184 '
185 IFS="${IFS-${defaultIFS}}"
186
187 oIFS="${IFS}"
188 # Some sh's can't handle IFS=/ for some reason.
189 IFS='%'
190 set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
191 IFS="${oIFS}"
192
193 pathcomp=''
194
195 while [ $# -ne 0 ] ; do
196 pathcomp="${pathcomp}${1}"
197 shift
198
199 if [ ! -d "${pathcomp}" ] ;
200 then
201 $mkdirprog "${pathcomp}"
202 else
203 true
204 fi
205
206 pathcomp="${pathcomp}/"
207 done
208 fi
209
210 if [ x"$dir_arg" != x ]
211 then
212 $doit $instcmd $dst &&
213
214 if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
215 if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
216 if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
217 if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
218 else
219
220 # If we're going to rename the final executable, determine the name now.
221
222 if [ x"$transformarg" = x ]
223 then
224 dstfile=`basename $dst`
225 else
226 dstfile=`basename $dst $transformbasename |
227 sed $transformarg`$transformbasename
228 fi
229
230 # don't allow the sed command to completely eliminate the filename
231
232 if [ x"$dstfile" = x ]
233 then
234 dstfile=`basename $dst`
235 else
236 true
237 fi
238
239 # Make a temp file name in the proper directory.
240
241 dsttmp=$dstdir/#inst.$$#
242
243 # Move or copy the file name to the temp name
244
245 $doit $instcmd $src $dsttmp &&
246
247 trap "rm -f ${dsttmp}" 0 &&
248
249 # and set any options; do chmod last to preserve setuid bits
250
251 # If any of these fail, we abort the whole thing. If we want to
252 # ignore errors from any of these, just make sure not to ignore
253 # errors from the above "$doit $instcmd $src $dsttmp" command.
254
255 if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
256 if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
257 if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
258 if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
259
260 # Now rename the file to the real destination.
261
262 $doit $rmcmd -f $dstdir/$dstfile &&
263 $doit $mvcmd $dsttmp $dstdir/$dstfile
264
265 fi &&
266
267
268 exit 0
0 2001-09-13 GNU <bug-gnu-utils@gnu.org>
1
2 * Version 0.10.40 released.
3
0 # Makefile for directory with message catalog handling in GNU NLS Utilities.
1 # Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
2 #
3 # This program is free software; you can redistribute it and/or modify it
4 # under the terms of the GNU Library General Public License as published
5 # by the Free Software Foundation; either version 2, or (at your option)
6 # any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Library General Public License for more details.
12 #
13 # You should have received a copy of the GNU Library General Public
14 # License along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 # USA.
17
18 PACKAGE = @PACKAGE@
19 VERSION = @VERSION@
20
21 SHELL = /bin/sh
22
23 srcdir = @srcdir@
24 top_srcdir = @top_srcdir@
25 top_builddir = ..
26 VPATH = @srcdir@
27
28 prefix = @prefix@
29 exec_prefix = @exec_prefix@
30 transform = @program_transform_name@
31 libdir = @libdir@
32 includedir = @includedir@
33 datadir = @datadir@
34 localedir = $(datadir)/locale
35 gettextsrcdir = $(datadir)/gettext/intl
36 aliaspath = $(localedir)
37 subdir = intl
38
39 INSTALL = @INSTALL@
40 INSTALL_DATA = @INSTALL_DATA@
41 MKINSTALLDIRS = @MKINSTALLDIRS@
42 mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
43
44 l = @INTL_LIBTOOL_SUFFIX_PREFIX@
45
46 AR = ar
47 CC = @CC@
48 LIBTOOL = @LIBTOOL@
49 RANLIB = @RANLIB@
50 YACC = @INTLBISON@ -y -d
51 YFLAGS = --name-prefix=__gettext
52
53 DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
54 -DLIBDIR=\"$(libdir)\" @DEFS@
55 CPPFLAGS = @CPPFLAGS@
56 CFLAGS = @CFLAGS@
57 LDFLAGS = @LDFLAGS@
58
59 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
60
61 HEADERS = $(COMHDRS) libgnuintl.h libgettext.h loadinfo.h
62 COMHDRS = gettext.h gettextP.h hash-string.h
63 SOURCES = $(COMSRCS) intl-compat.c
64 COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
65 finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
66 explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
67 localcharset.c
68 OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
69 finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
70 explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
71 plural.$lo localcharset.$lo
72 GETTOBJS = intl-compat.$lo
73 DISTFILES.common = Makefile.in \
74 config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
75 DISTFILES.generated = plural.c
76 DISTFILES.normal = VERSION
77 DISTFILES.gettext = COPYING.LIB-2 COPYING.LIB-2.1 libintl.glibc
78 DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c
79
80 # Libtool's library version information for libintl.
81 # Before making a gettext release, the gettext maintainer must change this
82 # according to the libtool documentation, section "Library interface versions".
83 # Maintainers of other packages that include the intl directory must *not*
84 # change these values.
85 LTV_CURRENT=1
86 LTV_REVISION=1
87 LTV_AGE=0
88
89 .SUFFIXES:
90 .SUFFIXES: .c .y .o .lo .sin .sed
91 .c.o:
92 $(COMPILE) $<
93 .c.lo:
94 $(LIBTOOL) --mode=compile $(COMPILE) $<
95
96 .y.c:
97 $(YACC) $(YFLAGS) --output $@ $<
98 rm -f $*.h
99
100 .sin.sed:
101 sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
102 mv t-$@ $@
103
104 INCLUDES = -I.. -I. -I$(top_srcdir)/intl
105
106 all: all-@USE_INCLUDED_LIBINTL@
107 all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
108 all-no: all-no-@BUILD_INCLUDED_LIBINTL@
109 all-no-yes: libgnuintl.$la
110 all-no-no:
111
112 libintl.a libgnuintl.a: $(OBJECTS)
113 rm -f $@
114 $(AR) cru $@ $(OBJECTS)
115 $(RANLIB) $@
116
117 libintl.la libgnuintl.la: $(OBJECTS)
118 $(LIBTOOL) --mode=link \
119 $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
120 $(OBJECTS) @LIBICONV@ \
121 -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
122 -rpath $(libdir) \
123 -no-undefined
124
125 libintl.h: libgnuintl.h
126 cp $(srcdir)/libgnuintl.h libintl.h
127
128 charset.alias: config.charset
129 $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
130 mv t-$@ $@
131
132 check: all
133
134 # This installation goal is only used in GNU gettext. Packages which
135 # only use the library should use install instead.
136
137 # We must not install the libintl.h/libintl.a files if we are on a
138 # system which has the GNU gettext() function in its C library or in a
139 # separate library.
140 # If you want to use the one which comes with this version of the
141 # package, you have to use `configure --with-included-gettext'.
142 install: install-exec install-data
143 install-exec: all
144 if test "$(PACKAGE)" = "gettext" \
145 && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
146 $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
147 $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
148 $(LIBTOOL) --mode=install \
149 $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
150 else \
151 : ; \
152 fi
153 if test '@USE_INCLUDED_LIBINTL@' = yes; then \
154 $(mkinstalldirs) $(DESTDIR)$(libdir); \
155 temp=$(DESTDIR)$(libdir)/t-charset.alias; \
156 dest=$(DESTDIR)$(libdir)/charset.alias; \
157 if test -f $(DESTDIR)$(libdir)/charset.alias; then \
158 orig=$(DESTDIR)$(libdir)/charset.alias; \
159 sed -f ref-add.sed $$orig > $$temp; \
160 $(INSTALL_DATA) $$temp $$dest; \
161 rm -f $$temp; \
162 else \
163 if test @GLIBC21@ = no; then \
164 orig=charset.alias; \
165 sed -f ref-add.sed $$orig > $$temp; \
166 $(INSTALL_DATA) $$temp $$dest; \
167 rm -f $$temp; \
168 fi; \
169 fi; \
170 $(mkinstalldirs) $(DESTDIR)$(localedir); \
171 test -f $(DESTDIR)$(localedir)/locale.alias \
172 && orig=$(DESTDIR)$(localedir)/locale.alias \
173 || orig=$(srcdir)/locale.alias; \
174 temp=$(DESTDIR)$(localedir)/t-locale.alias; \
175 dest=$(DESTDIR)$(localedir)/locale.alias; \
176 sed -f ref-add.sed $$orig > $$temp; \
177 $(INSTALL_DATA) $$temp $$dest; \
178 rm -f $$temp; \
179 else \
180 : ; \
181 fi
182 install-data: all
183 if test "$(PACKAGE)" = "gettext"; then \
184 $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
185 $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
186 $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
187 dists="COPYING.LIB-2 COPYING.LIB-2.1 $(DISTFILES.common)"; \
188 for file in $$dists; do \
189 $(INSTALL_DATA) $(srcdir)/$$file \
190 $(DESTDIR)$(gettextsrcdir)/$$file; \
191 done; \
192 chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
193 dists="$(DISTFILES.generated)"; \
194 for file in $$dists; do \
195 if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
196 $(INSTALL_DATA) $$dir/$$file \
197 $(DESTDIR)$(gettextsrcdir)/$$file; \
198 done; \
199 dists="$(DISTFILES.obsolete)"; \
200 for file in $$dists; do \
201 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
202 done; \
203 else \
204 : ; \
205 fi
206
207 # Define this as empty until I found a useful application.
208 installcheck:
209
210 uninstall:
211 if test "$(PACKAGE)" = "gettext" \
212 && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
213 rm -f $(DESTDIR)$(includedir)/libintl.h; \
214 $(LIBTOOL) --mode=uninstall \
215 rm -f $(DESTDIR)$(libdir)/libintl.$la; \
216 else \
217 : ; \
218 fi
219 if test '@USE_INCLUDED_LIBINTL@' = yes; then \
220 if test -f $(DESTDIR)$(libdir)/charset.alias; then \
221 temp=$(DESTDIR)$(libdir)/t-charset.alias; \
222 dest=$(DESTDIR)$(libdir)/charset.alias; \
223 sed -f ref-del.sed $$dest > $$temp; \
224 if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
225 rm -f $$dest; \
226 else \
227 $(INSTALL_DATA) $$temp $$dest; \
228 fi; \
229 rm -f $$temp; \
230 fi; \
231 if test -f $(DESTDIR)$(localedir)/locale.alias; then \
232 temp=$(DESTDIR)$(localedir)/t-locale.alias; \
233 dest=$(DESTDIR)$(localedir)/locale.alias; \
234 sed -f ref-del.sed $$dest > $$temp; \
235 if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
236 rm -f $$dest; \
237 else \
238 $(INSTALL_DATA) $$temp $$dest; \
239 fi; \
240 rm -f $$temp; \
241 fi; \
242 else \
243 : ; \
244 fi
245 if test "$(PACKAGE)" = "gettext"; then \
246 for file in VERSION ChangeLog COPYING.LIB-2 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
247 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
248 done; \
249 else \
250 : ; \
251 fi
252
253 info dvi:
254
255 $(OBJECTS): ../config.h libgnuintl.h
256 bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
257 dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
258
259 tags: TAGS
260
261 TAGS: $(HEADERS) $(SOURCES)
262 here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
263
264 id: ID
265
266 ID: $(HEADERS) $(SOURCES)
267 here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
268
269
270 mostlyclean:
271 rm -f *.a *.la *.o *.lo core core.*
272 rm -f libintl.h charset.alias ref-add.sed ref-del.sed
273 rm -f -r .libs _libs
274
275 clean: mostlyclean
276
277 distclean: clean
278 rm -f Makefile ID TAGS
279 if test "$(PACKAGE)" = gettext; then \
280 rm -f ChangeLog.inst $(DISTFILES.normal); \
281 else \
282 : ; \
283 fi
284
285 maintainer-clean: distclean
286 @echo "This command is intended for maintainers to use;"
287 @echo "it deletes files that may require special tools to rebuild."
288
289
290 # GNU gettext needs not contain the file `VERSION' but contains some
291 # other files which should not be distributed in other packages.
292 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
293 dist distdir: Makefile
294 if test "$(PACKAGE)" = gettext; then \
295 additional="$(DISTFILES.gettext)"; \
296 else \
297 additional="$(DISTFILES.normal)"; \
298 fi; \
299 $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
300 for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
301 if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
302 ln $$dir/$$file $(distdir) 2> /dev/null \
303 || cp -p $$dir/$$file $(distdir); \
304 done
305
306 Makefile: Makefile.in ../config.status
307 cd .. \
308 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
309
310 # Tell versions [3.59,3.63) of GNU make not to export all variables.
311 # Otherwise a system limit (for SysV at least) may be exceeded.
312 .NOEXPORT:
0 GNU gettext library from gettext-0.10.40
0 /* Implementation of the bindtextdomain(3) function
1 Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 #ifdef HAVE_CONFIG_H
19 # include <config.h>
20 #endif
21
22 #include <stddef.h>
23 #include <stdlib.h>
24 #include <string.h>
25
26 #ifdef _LIBC
27 # include <libintl.h>
28 #else
29 # include "libgnuintl.h"
30 #endif
31 #include "gettextP.h"
32
33 #ifdef _LIBC
34 /* We have to handle multi-threaded applications. */
35 # include <bits/libc-lock.h>
36 #else
37 /* Provide dummy implementation if this is outside glibc. */
38 # define __libc_rwlock_define(CLASS, NAME)
39 # define __libc_rwlock_wrlock(NAME)
40 # define __libc_rwlock_unlock(NAME)
41 #endif
42
43 /* The internal variables in the standalone libintl.a must have different
44 names than the internal variables in GNU libc, otherwise programs
45 using libintl.a cannot be linked statically. */
46 #if !defined _LIBC
47 # define _nl_default_dirname _nl_default_dirname__
48 # define _nl_domain_bindings _nl_domain_bindings__
49 #endif
50
51 /* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
52 #ifndef offsetof
53 # define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
54 #endif
55
56 /* @@ end of prolog @@ */
57
58 /* Contains the default location of the message catalogs. */
59 extern const char _nl_default_dirname[];
60
61 /* List with bindings of specific domains. */
62 extern struct binding *_nl_domain_bindings;
63
64 /* Lock variable to protect the global data in the gettext implementation. */
65 __libc_rwlock_define (extern, _nl_state_lock)
66
67
68 /* Names for the libintl functions are a problem. They must not clash
69 with existing names and they should follow ANSI C. But this source
70 code is also used in GNU C Library where the names have a __
71 prefix. So we have to make a difference here. */
72 #ifdef _LIBC
73 # define BINDTEXTDOMAIN __bindtextdomain
74 # define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
75 # ifndef strdup
76 # define strdup(str) __strdup (str)
77 # endif
78 #else
79 # define BINDTEXTDOMAIN bindtextdomain__
80 # define BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset__
81 #endif
82
83 /* Prototypes for local functions. */
84 static void set_binding_values PARAMS ((const char *domainname,
85 const char **dirnamep,
86 const char **codesetp));
87
88 /* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
89 to be used for the DOMAINNAME message catalog.
90 If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
91 modified, only the current value is returned.
92 If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
93 modified nor returned. */
94 static void
95 set_binding_values (domainname, dirnamep, codesetp)
96 const char *domainname;
97 const char **dirnamep;
98 const char **codesetp;
99 {
100 struct binding *binding;
101 int modified;
102
103 /* Some sanity checks. */
104 if (domainname == NULL || domainname[0] == '\0')
105 {
106 if (dirnamep)
107 *dirnamep = NULL;
108 if (codesetp)
109 *codesetp = NULL;
110 return;
111 }
112
113 __libc_rwlock_wrlock (_nl_state_lock);
114
115 modified = 0;
116
117 for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
118 {
119 int compare = strcmp (domainname, binding->domainname);
120 if (compare == 0)
121 /* We found it! */
122 break;
123 if (compare < 0)
124 {
125 /* It is not in the list. */
126 binding = NULL;
127 break;
128 }
129 }
130
131 if (binding != NULL)
132 {
133 if (dirnamep)
134 {
135 const char *dirname = *dirnamep;
136
137 if (dirname == NULL)
138 /* The current binding has be to returned. */
139 *dirnamep = binding->dirname;
140 else
141 {
142 /* The domain is already bound. If the new value and the old
143 one are equal we simply do nothing. Otherwise replace the
144 old binding. */
145 char *result = binding->dirname;
146 if (strcmp (dirname, result) != 0)
147 {
148 if (strcmp (dirname, _nl_default_dirname) == 0)
149 result = (char *) _nl_default_dirname;
150 else
151 {
152 #if defined _LIBC || defined HAVE_STRDUP
153 result = strdup (dirname);
154 #else
155 size_t len = strlen (dirname) + 1;
156 result = (char *) malloc (len);
157 if (__builtin_expect (result != NULL, 1))
158 memcpy (result, dirname, len);
159 #endif
160 }
161
162 if (__builtin_expect (result != NULL, 1))
163 {
164 if (binding->dirname != _nl_default_dirname)
165 free (binding->dirname);
166
167 binding->dirname = result;
168 modified = 1;
169 }
170 }
171 *dirnamep = result;
172 }
173 }
174
175 if (codesetp)
176 {
177 const char *codeset = *codesetp;
178
179 if (codeset == NULL)
180 /* The current binding has be to returned. */
181 *codesetp = binding->codeset;
182 else
183 {
184 /* The domain is already bound. If the new value and the old
185 one are equal we simply do nothing. Otherwise replace the
186 old binding. */
187 char *result = binding->codeset;
188 if (result == NULL || strcmp (codeset, result) != 0)
189 {
190 #if defined _LIBC || defined HAVE_STRDUP
191 result = strdup (codeset);
192 #else
193 size_t len = strlen (codeset) + 1;
194 result = (char *) malloc (len);
195 if (__builtin_expect (result != NULL, 1))
196 memcpy (result, codeset, len);
197 #endif
198
199 if (__builtin_expect (result != NULL, 1))
200 {
201 if (binding->codeset != NULL)
202 free (binding->codeset);
203
204 binding->codeset = result;
205 binding->codeset_cntr++;
206 modified = 1;
207 }
208 }
209 *codesetp = result;
210 }
211 }
212 }
213 else if ((dirnamep == NULL || *dirnamep == NULL)
214 && (codesetp == NULL || *codesetp == NULL))
215 {
216 /* Simply return the default values. */
217 if (dirnamep)
218 *dirnamep = _nl_default_dirname;
219 if (codesetp)
220 *codesetp = NULL;
221 }
222 else
223 {
224 /* We have to create a new binding. */
225 size_t len = strlen (domainname) + 1;
226 struct binding *new_binding =
227 (struct binding *) malloc (offsetof (struct binding, domainname) + len);
228
229 if (__builtin_expect (new_binding == NULL, 0))
230 goto failed;
231
232 memcpy (new_binding->domainname, domainname, len);
233
234 if (dirnamep)
235 {
236 const char *dirname = *dirnamep;
237
238 if (dirname == NULL)
239 /* The default value. */
240 dirname = _nl_default_dirname;
241 else
242 {
243 if (strcmp (dirname, _nl_default_dirname) == 0)
244 dirname = _nl_default_dirname;
245 else
246 {
247 char *result;
248 #if defined _LIBC || defined HAVE_STRDUP
249 result = strdup (dirname);
250 if (__builtin_expect (result == NULL, 0))
251 goto failed_dirname;
252 #else
253 size_t len = strlen (dirname) + 1;
254 result = (char *) malloc (len);
255 if (__builtin_expect (result == NULL, 0))
256 goto failed_dirname;
257 memcpy (result, dirname, len);
258 #endif
259 dirname = result;
260 }
261 }
262 *dirnamep = dirname;
263 new_binding->dirname = (char *) dirname;
264 }
265 else
266 /* The default value. */
267 new_binding->dirname = (char *) _nl_default_dirname;
268
269 new_binding->codeset_cntr = 0;
270
271 if (codesetp)
272 {
273 const char *codeset = *codesetp;
274
275 if (codeset != NULL)
276 {
277 char *result;
278
279 #if defined _LIBC || defined HAVE_STRDUP
280 result = strdup (codeset);
281 if (__builtin_expect (result == NULL, 0))
282 goto failed_codeset;
283 #else
284 size_t len = strlen (codeset) + 1;
285 result = (char *) malloc (len);
286 if (__builtin_expect (result == NULL, 0))
287 goto failed_codeset;
288 memcpy (result, codeset, len);
289 #endif
290 codeset = result;
291 new_binding->codeset_cntr++;
292 }
293 *codesetp = codeset;
294 new_binding->codeset = (char *) codeset;
295 }
296 else
297 new_binding->codeset = NULL;
298
299 /* Now enqueue it. */
300 if (_nl_domain_bindings == NULL
301 || strcmp (domainname, _nl_domain_bindings->domainname) < 0)
302 {
303 new_binding->next = _nl_domain_bindings;
304 _nl_domain_bindings = new_binding;
305 }
306 else
307 {
308 binding = _nl_domain_bindings;
309 while (binding->next != NULL
310 && strcmp (domainname, binding->next->domainname) > 0)
311 binding = binding->next;
312
313 new_binding->next = binding->next;
314 binding->next = new_binding;
315 }
316
317 modified = 1;
318
319 /* Here we deal with memory allocation failures. */
320 if (0)
321 {
322 failed_codeset:
323 if (new_binding->dirname != _nl_default_dirname)
324 free (new_binding->dirname);
325 failed_dirname:
326 free (new_binding);
327 failed:
328 if (dirnamep)
329 *dirnamep = NULL;
330 if (codesetp)
331 *codesetp = NULL;
332 }
333 }
334
335 /* If we modified any binding, we flush the caches. */
336 if (modified)
337 ++_nl_msg_cat_cntr;
338
339 __libc_rwlock_unlock (_nl_state_lock);
340 }
341
342 /* Specify that the DOMAINNAME message catalog will be found
343 in DIRNAME rather than in the system locale data base. */
344 char *
345 BINDTEXTDOMAIN (domainname, dirname)
346 const char *domainname;
347 const char *dirname;
348 {
349 set_binding_values (domainname, &dirname, NULL);
350 return (char *) dirname;
351 }
352
353 /* Specify the character encoding in which the messages from the
354 DOMAINNAME message catalog will be returned. */
355 char *
356 BIND_TEXTDOMAIN_CODESET (domainname, codeset)
357 const char *domainname;
358 const char *codeset;
359 {
360 set_binding_values (domainname, NULL, &codeset);
361 return (char *) codeset;
362 }
363
364 #ifdef _LIBC
365 /* Aliases for function names in GNU C Library. */
366 weak_alias (__bindtextdomain, bindtextdomain);
367 weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
368 #endif
0 #! /bin/sh
1 # Output a system dependent table of character encoding aliases.
2 #
3 # Copyright (C) 2000-2001 Free Software Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Library General Public License as published
7 # by the Free Software Foundation; either version 2, or (at your option)
8 # 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 GNU
13 # Library General Public License for more details.
14 #
15 # You should have received a copy of the GNU Library General Public
16 # License along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18 # USA.
19 #
20 # The table consists of lines of the form
21 # ALIAS CANONICAL
22 #
23 # ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
24 # ALIAS is compared in a case sensitive way.
25 #
26 # CANONICAL is the GNU canonical name for this character encoding.
27 # It must be an encoding supported by libiconv. Support by GNU libc is
28 # also desirable. CANONICAL is case insensitive. Usually an upper case
29 # MIME charset name is preferred.
30 # The current list of GNU canonical charset names is as follows.
31 #
32 # name used by which systems a MIME name?
33 # ASCII, ANSI_X3.4-1968 glibc solaris freebsd
34 # ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes
35 # ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes
36 # ISO-8859-3 glibc yes
37 # ISO-8859-4 osf solaris freebsd yes
38 # ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes
39 # ISO-8859-6 glibc aix hpux solaris yes
40 # ISO-8859-7 glibc aix hpux irix osf solaris yes
41 # ISO-8859-8 glibc aix hpux osf solaris yes
42 # ISO-8859-9 glibc aix hpux irix osf solaris yes
43 # ISO-8859-13 glibc
44 # ISO-8859-15 glibc aix osf solaris freebsd
45 # KOI8-R glibc solaris freebsd yes
46 # KOI8-U glibc freebsd yes
47 # CP437 dos
48 # CP775 dos
49 # CP850 aix osf dos
50 # CP852 dos
51 # CP855 dos
52 # CP856 aix
53 # CP857 dos
54 # CP861 dos
55 # CP862 dos
56 # CP864 dos
57 # CP865 dos
58 # CP866 freebsd dos
59 # CP869 dos
60 # CP874 win32 dos
61 # CP922 aix
62 # CP932 aix win32 dos
63 # CP943 aix
64 # CP949 osf win32 dos
65 # CP950 win32 dos
66 # CP1046 aix
67 # CP1124 aix
68 # CP1129 aix
69 # CP1250 win32
70 # CP1251 glibc win32
71 # CP1252 aix win32
72 # CP1253 win32
73 # CP1254 win32
74 # CP1255 win32
75 # CP1256 win32
76 # CP1257 win32
77 # GB2312 glibc aix hpux irix solaris freebsd yes
78 # EUC-JP glibc aix hpux irix osf solaris freebsd yes
79 # EUC-KR glibc aix hpux irix osf solaris freebsd yes
80 # EUC-TW glibc aix hpux irix osf solaris
81 # BIG5 glibc aix hpux osf solaris freebsd yes
82 # BIG5-HKSCS glibc
83 # GBK aix osf win32 dos
84 # GB18030 glibc
85 # SHIFT_JIS hpux osf solaris freebsd yes
86 # JOHAB glibc win32
87 # TIS-620 glibc aix hpux osf solaris
88 # VISCII glibc yes
89 # HP-ROMAN8 hpux
90 # HP-ARABIC8 hpux
91 # HP-GREEK8 hpux
92 # HP-HEBREW8 hpux
93 # HP-TURKISH8 hpux
94 # HP-KANA8 hpux
95 # DEC-KANJI osf
96 # DEC-HANYU osf
97 # UTF-8 glibc aix hpux osf solaris yes
98 #
99 # Note: Names which are not marked as being a MIME name should not be used in
100 # Internet protocols for information interchange (mail, news, etc.).
101 #
102 # Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
103 # must understand both names and treat them as equivalent.
104 #
105 # The first argument passed to this file is the canonical host specification,
106 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
107 # or
108 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
109
110 host="$1"
111 os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
112 echo "# This file contains a table of character encoding aliases,"
113 echo "# suitable for operating system '${os}'."
114 echo "# It was automatically generated from config.charset."
115 # List of references, updated during installation:
116 echo "# Packages using this file: "
117 case "$os" in
118 linux* | *-gnu*)
119 # With glibc-2.1 or newer, we don't need any canonicalization,
120 # because glibc has iconv and both glibc and libiconv support all
121 # GNU canonical names directly. Therefore, the Makefile does not
122 # need to install the alias file at all.
123 # The following applies only to glibc-2.0.x and older libcs.
124 echo "ISO_646.IRV:1983 ASCII"
125 ;;
126 aix*)
127 echo "ISO8859-1 ISO-8859-1"
128 echo "ISO8859-2 ISO-8859-2"
129 echo "ISO8859-5 ISO-8859-5"
130 echo "ISO8859-6 ISO-8859-6"
131 echo "ISO8859-7 ISO-8859-7"
132 echo "ISO8859-8 ISO-8859-8"
133 echo "ISO8859-9 ISO-8859-9"
134 echo "ISO8859-15 ISO-8859-15"
135 echo "IBM-850 CP850"
136 echo "IBM-856 CP856"
137 echo "IBM-921 ISO-8859-13"
138 echo "IBM-922 CP922"
139 echo "IBM-932 CP932"
140 echo "IBM-943 CP943"
141 echo "IBM-1046 CP1046"
142 echo "IBM-1124 CP1124"
143 echo "IBM-1129 CP1129"
144 echo "IBM-1252 CP1252"
145 echo "IBM-eucCN GB2312"
146 echo "IBM-eucJP EUC-JP"
147 echo "IBM-eucKR EUC-KR"
148 echo "IBM-eucTW EUC-TW"
149 echo "big5 BIG5"
150 echo "GBK GBK"
151 echo "TIS-620 TIS-620"
152 echo "UTF-8 UTF-8"
153 ;;
154 hpux*)
155 echo "iso88591 ISO-8859-1"
156 echo "iso88592 ISO-8859-2"
157 echo "iso88595 ISO-8859-5"
158 echo "iso88596 ISO-8859-6"
159 echo "iso88597 ISO-8859-7"
160 echo "iso88598 ISO-8859-8"
161 echo "iso88599 ISO-8859-9"
162 echo "iso885915 ISO-8859-15"
163 echo "roman8 HP-ROMAN8"
164 echo "arabic8 HP-ARABIC8"
165 echo "greek8 HP-GREEK8"
166 echo "hebrew8 HP-HEBREW8"
167 echo "turkish8 HP-TURKISH8"
168 echo "kana8 HP-KANA8"
169 echo "tis620 TIS-620"
170 echo "big5 BIG5"
171 echo "eucJP EUC-JP"
172 echo "eucKR EUC-KR"
173 echo "eucTW EUC-TW"
174 echo "hp15CN GB2312"
175 #echo "ccdc ?" # what is this?
176 echo "SJIS SHIFT_JIS"
177 echo "utf8 UTF-8"
178 ;;
179 irix*)
180 echo "ISO8859-1 ISO-8859-1"
181 echo "ISO8859-2 ISO-8859-2"
182 echo "ISO8859-5 ISO-8859-5"
183 echo "ISO8859-7 ISO-8859-7"
184 echo "ISO8859-9 ISO-8859-9"
185 echo "eucCN GB2312"
186 echo "eucJP EUC-JP"
187 echo "eucKR EUC-KR"
188 echo "eucTW EUC-TW"
189 ;;
190 osf*)
191 echo "ISO8859-1 ISO-8859-1"
192 echo "ISO8859-2 ISO-8859-2"
193 echo "ISO8859-4 ISO-8859-4"
194 echo "ISO8859-5 ISO-8859-5"
195 echo "ISO8859-7 ISO-8859-7"
196 echo "ISO8859-8 ISO-8859-8"
197 echo "ISO8859-9 ISO-8859-9"
198 echo "ISO8859-15 ISO-8859-15"
199 echo "cp850 CP850"
200 echo "big5 BIG5"
201 echo "dechanyu DEC-HANYU"
202 echo "dechanzi GB2312"
203 echo "deckanji DEC-KANJI"
204 echo "deckorean EUC-KR"
205 echo "eucJP EUC-JP"
206 echo "eucKR EUC-KR"
207 echo "eucTW EUC-TW"
208 echo "GBK GBK"
209 echo "KSC5601 CP949"
210 echo "sdeckanji EUC-JP"
211 echo "SJIS SHIFT_JIS"
212 echo "TACTIS TIS-620"
213 echo "UTF-8 UTF-8"
214 ;;
215 solaris*)
216 echo "646 ASCII"
217 echo "ISO8859-1 ISO-8859-1"
218 echo "ISO8859-2 ISO-8859-2"
219 echo "ISO8859-4 ISO-8859-4"
220 echo "ISO8859-5 ISO-8859-5"
221 echo "ISO8859-6 ISO-8859-6"
222 echo "ISO8859-7 ISO-8859-7"
223 echo "ISO8859-8 ISO-8859-8"
224 echo "ISO8859-9 ISO-8859-9"
225 echo "ISO8859-15 ISO-8859-15"
226 echo "koi8-r KOI8-R"
227 echo "BIG5 BIG5"
228 echo "gb2312 GB2312"
229 echo "cns11643 EUC-TW"
230 echo "5601 EUC-KR"
231 echo "eucJP EUC-JP"
232 echo "PCK SHIFT_JIS"
233 echo "TIS620.2533 TIS-620"
234 #echo "sun_eu_greek ?" # what is this?
235 echo "UTF-8 UTF-8"
236 ;;
237 freebsd*)
238 # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
239 # localcharset.c falls back to using the full locale name
240 # from the environment variables.
241 echo "C ASCII"
242 echo "US-ASCII ASCII"
243 for l in la_LN lt_LN; do
244 echo "$l.ASCII ASCII"
245 done
246 for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
247 fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
248 lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
249 echo "$l.ISO_8859-1 ISO-8859-1"
250 echo "$l.DIS_8859-15 ISO-8859-15"
251 done
252 for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
253 echo "$l.ISO_8859-2 ISO-8859-2"
254 done
255 for l in la_LN lt_LT; do
256 echo "$l.ISO_8859-4 ISO-8859-4"
257 done
258 for l in ru_RU ru_SU; do
259 echo "$l.KOI8-R KOI8-R"
260 echo "$l.ISO_8859-5 ISO-8859-5"
261 echo "$l.CP866 CP866"
262 done
263 echo "uk_UA.KOI8-U KOI8-U"
264 echo "zh_TW.BIG5 BIG5"
265 echo "zh_TW.Big5 BIG5"
266 echo "zh_CN.EUC GB2312"
267 echo "ja_JP.EUC EUC-JP"
268 echo "ja_JP.SJIS SHIFT_JIS"
269 echo "ja_JP.Shift_JIS SHIFT_JIS"
270 echo "ko_KR.EUC EUC-KR"
271 ;;
272 beos*)
273 # BeOS has a single locale, and it has UTF-8 encoding.
274 echo "* UTF-8"
275 ;;
276 msdosdjgpp*)
277 # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
278 # localcharset.c falls back to using the full locale name
279 # from the environment variables.
280 echo "#"
281 echo "# The encodings given here may not all be correct."
282 echo "# If you find that the encoding given for your language and"
283 echo "# country is not the one your DOS machine actually uses, just"
284 echo "# correct it in this file, and send a mail to"
285 echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
286 echo "# and Bruno Haible <haible@clisp.cons.org>."
287 echo "#"
288 echo "C ASCII"
289 # ISO-8859-1 languages
290 echo "ca CP850"
291 echo "ca_ES CP850"
292 echo "da CP865" # not CP850 ??
293 echo "da_DK CP865" # not CP850 ??
294 echo "de CP850"
295 echo "de_AT CP850"
296 echo "de_CH CP850"
297 echo "de_DE CP850"
298 echo "en CP850"
299 echo "en_AU CP850" # not CP437 ??
300 echo "en_CA CP850"
301 echo "en_GB CP850"
302 echo "en_NZ CP437"
303 echo "en_US CP437"
304 echo "en_ZA CP850" # not CP437 ??
305 echo "es CP850"
306 echo "es_AR CP850"
307 echo "es_BO CP850"
308 echo "es_CL CP850"
309 echo "es_CO CP850"
310 echo "es_CR CP850"
311 echo "es_CU CP850"
312 echo "es_DO CP850"
313 echo "es_EC CP850"
314 echo "es_ES CP850"
315 echo "es_GT CP850"
316 echo "es_HN CP850"
317 echo "es_MX CP850"
318 echo "es_NI CP850"
319 echo "es_PA CP850"
320 echo "es_PY CP850"
321 echo "es_PE CP850"
322 echo "es_SV CP850"
323 echo "es_UY CP850"
324 echo "es_VE CP850"
325 echo "et CP850"
326 echo "et_EE CP850"
327 echo "eu CP850"
328 echo "eu_ES CP850"
329 echo "fi CP850"
330 echo "fi_FI CP850"
331 echo "fr CP850"
332 echo "fr_BE CP850"
333 echo "fr_CA CP850"
334 echo "fr_CH CP850"
335 echo "fr_FR CP850"
336 echo "ga CP850"
337 echo "ga_IE CP850"
338 echo "gd CP850"
339 echo "gd_GB CP850"
340 echo "gl CP850"
341 echo "gl_ES CP850"
342 echo "id CP850" # not CP437 ??
343 echo "id_ID CP850" # not CP437 ??
344 echo "is CP861" # not CP850 ??
345 echo "is_IS CP861" # not CP850 ??
346 echo "it CP850"
347 echo "it_CH CP850"
348 echo "it_IT CP850"
349 echo "lt CP775"
350 echo "lt_LT CP775"
351 echo "lv CP775"
352 echo "lv_LV CP775"
353 echo "nb CP865" # not CP850 ??
354 echo "nb_NO CP865" # not CP850 ??
355 echo "nl CP850"
356 echo "nl_BE CP850"
357 echo "nl_NL CP850"
358 echo "nn CP865" # not CP850 ??
359 echo "nn_NO CP865" # not CP850 ??
360 echo "no CP865" # not CP850 ??
361 echo "no_NO CP865" # not CP850 ??
362 echo "pt CP850"
363 echo "pt_BR CP850"
364 echo "pt_PT CP850"
365 echo "sv CP850"
366 echo "sv_SE CP850"
367 # ISO-8859-2 languages
368 echo "cs CP852"
369 echo "cs_CZ CP852"
370 echo "hr CP852"
371 echo "hr_HR CP852"
372 echo "hu CP852"
373 echo "hu_HU CP852"
374 echo "pl CP852"
375 echo "pl_PL CP852"
376 echo "ro CP852"
377 echo "ro_RO CP852"
378 echo "sk CP852"
379 echo "sk_SK CP852"
380 echo "sl CP852"
381 echo "sl_SI CP852"
382 echo "sq CP852"
383 echo "sq_AL CP852"
384 echo "sr CP852" # CP852 or CP866 or CP855 ??
385 echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
386 # ISO-8859-3 languages
387 echo "mt CP850"
388 echo "mt_MT CP850"
389 # ISO-8859-5 languages
390 echo "be CP866"
391 echo "be_BE CP866"
392 echo "bg CP866" # not CP855 ??
393 echo "bg_BG CP866" # not CP855 ??
394 echo "mk CP866" # not CP855 ??
395 echo "mk_MK CP866" # not CP855 ??
396 echo "ru KOI8-R" # not CP866 ??
397 echo "ru_RU KOI8-R" # not CP866 ??
398 # ISO-8859-6 languages
399 echo "ar CP864"
400 echo "ar_AE CP864"
401 echo "ar_DZ CP864"
402 echo "ar_EG CP864"
403 echo "ar_IQ CP864"
404 echo "ar_IR CP864"
405 echo "ar_JO CP864"
406 echo "ar_KW CP864"
407 echo "ar_MA CP864"
408 echo "ar_OM CP864"
409 echo "ar_QA CP864"
410 echo "ar_SA CP864"
411 echo "ar_SY CP864"
412 # ISO-8859-7 languages
413 echo "el CP869"
414 echo "el_GR CP869"
415 # ISO-8859-8 languages
416 echo "he CP862"
417 echo "he_IL CP862"
418 # ISO-8859-9 languages
419 echo "tr CP857"
420 echo "tr_TR CP857"
421 # Japanese
422 echo "ja CP932"
423 echo "ja_JP CP932"
424 # Chinese
425 echo "zh_CN GBK"
426 echo "zh_TW CP950" # not CP938 ??
427 # Korean
428 echo "kr CP949" # not CP934 ??
429 echo "kr_KR CP949" # not CP934 ??
430 # Thai
431 echo "th CP874"
432 echo "th_TH CP874"
433 # Other
434 echo "eo CP850"
435 echo "eo_EO CP850"
436 ;;
437 esac
0 /* Implementation of the dcgettext(3) function.
1 Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 #ifdef HAVE_CONFIG_H
19 # include <config.h>
20 #endif
21
22 #include "gettextP.h"
23 #ifdef _LIBC
24 # include <libintl.h>
25 #else
26 # include "libgnuintl.h"
27 #endif
28
29 /* @@ end of prolog @@ */
30
31 /* Names for the libintl functions are a problem. They must not clash
32 with existing names and they should follow ANSI C. But this source
33 code is also used in GNU C Library where the names have a __
34 prefix. So we have to make a difference here. */
35 #ifdef _LIBC
36 # define DCGETTEXT __dcgettext
37 # define DCIGETTEXT __dcigettext
38 #else
39 # define DCGETTEXT dcgettext__
40 # define DCIGETTEXT dcigettext__
41 #endif
42
43 /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
44 locale. */
45 char *
46 DCGETTEXT (domainname, msgid, category)
47 const char *domainname;
48 const char *msgid;
49 int category;
50 {
51 return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
52 }
53
54 #ifdef _LIBC
55 /* Alias for function name in GNU C Library. */
56 weak_alias (__dcgettext, dcgettext);
57 #endif
0 /* Implementation of the internal dcigettext function.
1 Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 /* Tell glibc's <string.h> to provide a prototype for mempcpy().
19 This must come before <config.h> because <config.h> may include
20 <features.h>, and once <features.h> has been included, it's too late. */
21 #ifndef _GNU_SOURCE
22 # define _GNU_SOURCE 1
23 #endif
24
25 #ifdef HAVE_CONFIG_H
26 # include <config.h>
27 #endif
28
29 #include <sys/types.h>
30
31 #ifdef __GNUC__
32 # define alloca __builtin_alloca
33 # define HAVE_ALLOCA 1
34 #else
35 # if defined HAVE_ALLOCA_H || defined _LIBC
36 # include <alloca.h>
37 # else
38 # ifdef _AIX
39 #pragma alloca
40 # else
41 # ifndef alloca
42 char *alloca ();
43 # endif
44 # endif
45 # endif
46 #endif
47
48 #include <errno.h>
49 #ifndef errno
50 extern int errno;
51 #endif
52 #ifndef __set_errno
53 # define __set_errno(val) errno = (val)
54 #endif
55
56 #include <stddef.h>
57 #include <stdlib.h>
58
59 #include <string.h>
60 #if !HAVE_STRCHR && !defined _LIBC
61 # ifndef strchr
62 # define strchr index
63 # endif
64 #endif
65
66 #if defined HAVE_UNISTD_H || defined _LIBC
67 # include <unistd.h>
68 #endif
69
70 #include <locale.h>
71
72 #if defined HAVE_SYS_PARAM_H || defined _LIBC
73 # include <sys/param.h>
74 #endif
75
76 #include "gettextP.h"
77 #ifdef _LIBC
78 # include <libintl.h>
79 #else
80 # include "libgnuintl.h"
81 #endif
82 #include "hash-string.h"
83
84 /* Thread safetyness. */
85 #ifdef _LIBC
86 # include <bits/libc-lock.h>
87 #else
88 /* Provide dummy implementation if this is outside glibc. */
89 # define __libc_lock_define_initialized(CLASS, NAME)
90 # define __libc_lock_lock(NAME)
91 # define __libc_lock_unlock(NAME)
92 # define __libc_rwlock_define_initialized(CLASS, NAME)
93 # define __libc_rwlock_rdlock(NAME)
94 # define __libc_rwlock_unlock(NAME)
95 #endif
96
97 /* Alignment of types. */
98 #if defined __GNUC__ && __GNUC__ >= 2
99 # define alignof(TYPE) __alignof__ (TYPE)
100 #else
101 # define alignof(TYPE) \
102 ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
103 #endif
104
105 /* The internal variables in the standalone libintl.a must have different
106 names than the internal variables in GNU libc, otherwise programs
107 using libintl.a cannot be linked statically. */
108 #if !defined _LIBC
109 # define _nl_default_default_domain _nl_default_default_domain__
110 # define _nl_current_default_domain _nl_current_default_domain__
111 # define _nl_default_dirname _nl_default_dirname__
112 # define _nl_domain_bindings _nl_domain_bindings__
113 #endif
114
115 /* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
116 #ifndef offsetof
117 # define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
118 #endif
119
120 /* @@ end of prolog @@ */
121
122 #ifdef _LIBC
123 /* Rename the non ANSI C functions. This is required by the standard
124 because some ANSI C functions will require linking with this object
125 file and the name space must not be polluted. */
126 # define getcwd __getcwd
127 # ifndef stpcpy
128 # define stpcpy __stpcpy
129 # endif
130 # define tfind __tfind
131 #else
132 # if !defined HAVE_GETCWD
133 char *getwd ();
134 # define getcwd(buf, max) getwd (buf)
135 # else
136 char *getcwd ();
137 # endif
138 # ifndef HAVE_STPCPY
139 static char *stpcpy PARAMS ((char *dest, const char *src));
140 # endif
141 # ifndef HAVE_MEMPCPY
142 static void *mempcpy PARAMS ((void *dest, const void *src, size_t n));
143 # endif
144 #endif
145
146 /* Amount to increase buffer size by in each try. */
147 #define PATH_INCR 32
148
149 /* The following is from pathmax.h. */
150 /* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
151 PATH_MAX but might cause redefinition warnings when sys/param.h is
152 later included (as on MORE/BSD 4.3). */
153 #if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__)
154 # include <limits.h>
155 #endif
156
157 #ifndef _POSIX_PATH_MAX
158 # define _POSIX_PATH_MAX 255
159 #endif
160
161 #if !defined PATH_MAX && defined _PC_PATH_MAX
162 # define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
163 #endif
164
165 /* Don't include sys/param.h if it already has been. */
166 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
167 # include <sys/param.h>
168 #endif
169
170 #if !defined PATH_MAX && defined MAXPATHLEN
171 # define PATH_MAX MAXPATHLEN
172 #endif
173
174 #ifndef PATH_MAX
175 # define PATH_MAX _POSIX_PATH_MAX
176 #endif
177
178 /* Pathname support.
179 ISSLASH(C) tests whether C is a directory separator character.
180 IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
181 it may be concatenated to a directory pathname.
182 IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
183 */
184 #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
185 /* Win32, OS/2, DOS */
186 # define ISSLASH(C) ((C) == '/' || (C) == '\\')
187 # define HAS_DEVICE(P) \
188 ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
189 && (P)[1] == ':')
190 # define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
191 # define IS_PATH_WITH_DIR(P) \
192 (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
193 #else
194 /* Unix */
195 # define ISSLASH(C) ((C) == '/')
196 # define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
197 # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
198 #endif
199
200 /* XPG3 defines the result of `setlocale (category, NULL)' as:
201 ``Directs `setlocale()' to query `category' and return the current
202 setting of `local'.''
203 However it does not specify the exact format. Neither do SUSV2 and
204 ISO C 99. So we can use this feature only on selected systems (e.g.
205 those using GNU C Library). */
206 #if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2)
207 # define HAVE_LOCALE_NULL
208 #endif
209
210 /* This is the type used for the search tree where known translations
211 are stored. */
212 struct known_translation_t
213 {
214 /* Domain in which to search. */
215 char *domainname;
216
217 /* The category. */
218 int category;
219
220 /* State of the catalog counter at the point the string was found. */
221 int counter;
222
223 /* Catalog where the string was found. */
224 struct loaded_l10nfile *domain;
225
226 /* And finally the translation. */
227 const char *translation;
228 size_t translation_length;
229
230 /* Pointer to the string in question. */
231 char msgid[ZERO];
232 };
233
234 /* Root of the search tree with known translations. We can use this
235 only if the system provides the `tsearch' function family. */
236 #if defined HAVE_TSEARCH || defined _LIBC
237 # include <search.h>
238
239 static void *root;
240
241 # ifdef _LIBC
242 # define tsearch __tsearch
243 # endif
244
245 /* Function to compare two entries in the table of known translations. */
246 static int transcmp PARAMS ((const void *p1, const void *p2));
247 static int
248 transcmp (p1, p2)
249 const void *p1;
250 const void *p2;
251 {
252 const struct known_translation_t *s1;
253 const struct known_translation_t *s2;
254 int result;
255
256 s1 = (const struct known_translation_t *) p1;
257 s2 = (const struct known_translation_t *) p2;
258
259 result = strcmp (s1->msgid, s2->msgid);
260 if (result == 0)
261 {
262 result = strcmp (s1->domainname, s2->domainname);
263 if (result == 0)
264 /* We compare the category last (though this is the cheapest
265 operation) since it is hopefully always the same (namely
266 LC_MESSAGES). */
267 result = s1->category - s2->category;
268 }
269
270 return result;
271 }
272 #endif
273
274 /* Name of the default domain used for gettext(3) prior any call to
275 textdomain(3). The default value for this is "messages". */
276 const char _nl_default_default_domain[] = "messages";
277
278 /* Value used as the default domain for gettext(3). */
279 const char *_nl_current_default_domain = _nl_default_default_domain;
280
281 /* Contains the default location of the message catalogs. */
282 const char _nl_default_dirname[] = LOCALEDIR;
283
284 /* List with bindings of specific domains created by bindtextdomain()
285 calls. */
286 struct binding *_nl_domain_bindings;
287
288 /* Prototypes for local functions. */
289 static char *plural_lookup PARAMS ((struct loaded_l10nfile *domain,
290 unsigned long int n,
291 const char *translation,
292 size_t translation_len))
293 internal_function;
294 static unsigned long int plural_eval PARAMS ((struct expression *pexp,
295 unsigned long int n))
296 internal_function;
297 static const char *category_to_name PARAMS ((int category)) internal_function;
298 static const char *guess_category_value PARAMS ((int category,
299 const char *categoryname))
300 internal_function;
301
302
303 /* For those loosing systems which don't have `alloca' we have to add
304 some additional code emulating it. */
305 #ifdef HAVE_ALLOCA
306 /* Nothing has to be done. */
307 # define ADD_BLOCK(list, address) /* nothing */
308 # define FREE_BLOCKS(list) /* nothing */
309 #else
310 struct block_list
311 {
312 void *address;
313 struct block_list *next;
314 };
315 # define ADD_BLOCK(list, addr) \
316 do { \
317 struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
318 /* If we cannot get a free block we cannot add the new element to \
319 the list. */ \
320 if (newp != NULL) { \
321 newp->address = (addr); \
322 newp->next = (list); \
323 (list) = newp; \
324 } \
325 } while (0)
326 # define FREE_BLOCKS(list) \
327 do { \
328 while (list != NULL) { \
329 struct block_list *old = list; \
330 list = list->next; \
331 free (old); \
332 } \
333 } while (0)
334 # undef alloca
335 # define alloca(size) (malloc (size))
336 #endif /* have alloca */
337
338
339 #ifdef _LIBC
340 /* List of blocks allocated for translations. */
341 typedef struct transmem_list
342 {
343 struct transmem_list *next;
344 char data[ZERO];
345 } transmem_block_t;
346 static struct transmem_list *transmem_list;
347 #else
348 typedef unsigned char transmem_block_t;
349 #endif
350
351
352 /* Names for the libintl functions are a problem. They must not clash
353 with existing names and they should follow ANSI C. But this source
354 code is also used in GNU C Library where the names have a __
355 prefix. So we have to make a difference here. */
356 #ifdef _LIBC
357 # define DCIGETTEXT __dcigettext
358 #else
359 # define DCIGETTEXT dcigettext__
360 #endif
361
362 /* Lock variable to protect the global data in the gettext implementation. */
363 #ifdef _LIBC
364 __libc_rwlock_define_initialized (, _nl_state_lock)
365 #endif
366
367 /* Checking whether the binaries runs SUID must be done and glibc provides
368 easier methods therefore we make a difference here. */
369 #ifdef _LIBC
370 # define ENABLE_SECURE __libc_enable_secure
371 # define DETERMINE_SECURE
372 #else
373 # ifndef HAVE_GETUID
374 # define getuid() 0
375 # endif
376 # ifndef HAVE_GETGID
377 # define getgid() 0
378 # endif
379 # ifndef HAVE_GETEUID
380 # define geteuid() getuid()
381 # endif
382 # ifndef HAVE_GETEGID
383 # define getegid() getgid()
384 # endif
385 static int enable_secure;
386 # define ENABLE_SECURE (enable_secure == 1)
387 # define DETERMINE_SECURE \
388 if (enable_secure == 0) \
389 { \
390 if (getuid () != geteuid () || getgid () != getegid ()) \
391 enable_secure = 1; \
392 else \
393 enable_secure = -1; \
394 }
395 #endif
396
397 /* Look up MSGID in the DOMAINNAME message catalog for the current
398 CATEGORY locale and, if PLURAL is nonzero, search over string
399 depending on the plural form determined by N. */
400 char *
401 DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
402 const char *domainname;
403 const char *msgid1;
404 const char *msgid2;
405 int plural;
406 unsigned long int n;
407 int category;
408 {
409 #ifndef HAVE_ALLOCA
410 struct block_list *block_list = NULL;
411 #endif
412 struct loaded_l10nfile *domain;
413 struct binding *binding;
414 const char *categoryname;
415 const char *categoryvalue;
416 char *dirname, *xdomainname;
417 char *single_locale;
418 char *retval;
419 size_t retlen;
420 int saved_errno;
421 #if defined HAVE_TSEARCH || defined _LIBC
422 struct known_translation_t *search;
423 struct known_translation_t **foundp = NULL;
424 size_t msgid_len;
425 #endif
426 size_t domainname_len;
427
428 /* If no real MSGID is given return NULL. */
429 if (msgid1 == NULL)
430 return NULL;
431
432 __libc_rwlock_rdlock (_nl_state_lock);
433
434 /* If DOMAINNAME is NULL, we are interested in the default domain. If
435 CATEGORY is not LC_MESSAGES this might not make much sense but the
436 definition left this undefined. */
437 if (domainname == NULL)
438 domainname = _nl_current_default_domain;
439
440 #if defined HAVE_TSEARCH || defined _LIBC
441 msgid_len = strlen (msgid1) + 1;
442
443 /* Try to find the translation among those which we found at
444 some time. */
445 search = (struct known_translation_t *)
446 alloca (offsetof (struct known_translation_t, msgid) + msgid_len);
447 memcpy (search->msgid, msgid1, msgid_len);
448 search->domainname = (char *) domainname;
449 search->category = category;
450
451 foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
452 if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
453 {
454 /* Now deal with plural. */
455 if (plural)
456 retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation,
457 (*foundp)->translation_length);
458 else
459 retval = (char *) (*foundp)->translation;
460
461 __libc_rwlock_unlock (_nl_state_lock);
462 return retval;
463 }
464 #endif
465
466 /* Preserve the `errno' value. */
467 saved_errno = errno;
468
469 /* See whether this is a SUID binary or not. */
470 DETERMINE_SECURE;
471
472 /* First find matching binding. */
473 for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
474 {
475 int compare = strcmp (domainname, binding->domainname);
476 if (compare == 0)
477 /* We found it! */
478 break;
479 if (compare < 0)
480 {
481 /* It is not in the list. */
482 binding = NULL;
483 break;
484 }
485 }
486
487 if (binding == NULL)
488 dirname = (char *) _nl_default_dirname;
489 else if (IS_ABSOLUTE_PATH (binding->dirname))
490 dirname = binding->dirname;
491 else
492 {
493 /* We have a relative path. Make it absolute now. */
494 size_t dirname_len = strlen (binding->dirname) + 1;
495 size_t path_max;
496 char *ret;
497
498 path_max = (unsigned int) PATH_MAX;
499 path_max += 2; /* The getcwd docs say to do this. */
500
501 for (;;)
502 {
503 dirname = (char *) alloca (path_max + dirname_len);
504 ADD_BLOCK (block_list, dirname);
505
506 __set_errno (0);
507 ret = getcwd (dirname, path_max);
508 if (ret != NULL || errno != ERANGE)
509 break;
510
511 path_max += path_max / 2;
512 path_max += PATH_INCR;
513 }
514
515 if (ret == NULL)
516 {
517 /* We cannot get the current working directory. Don't signal an
518 error but simply return the default string. */
519 FREE_BLOCKS (block_list);
520 __libc_rwlock_unlock (_nl_state_lock);
521 __set_errno (saved_errno);
522 return (plural == 0
523 ? (char *) msgid1
524 /* Use the Germanic plural rule. */
525 : n == 1 ? (char *) msgid1 : (char *) msgid2);
526 }
527
528 stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
529 }
530
531 /* Now determine the symbolic name of CATEGORY and its value. */
532 categoryname = category_to_name (category);
533 categoryvalue = guess_category_value (category, categoryname);
534
535 domainname_len = strlen (domainname);
536 xdomainname = (char *) alloca (strlen (categoryname)
537 + domainname_len + 5);
538 ADD_BLOCK (block_list, xdomainname);
539
540 stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
541 domainname, domainname_len),
542 ".mo");
543
544 /* Creating working area. */
545 single_locale = (char *) alloca (strlen (categoryvalue) + 1);
546 ADD_BLOCK (block_list, single_locale);
547
548
549 /* Search for the given string. This is a loop because we perhaps
550 got an ordered list of languages to consider for the translation. */
551 while (1)
552 {
553 /* Make CATEGORYVALUE point to the next element of the list. */
554 while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
555 ++categoryvalue;
556 if (categoryvalue[0] == '\0')
557 {
558 /* The whole contents of CATEGORYVALUE has been searched but
559 no valid entry has been found. We solve this situation
560 by implicitly appending a "C" entry, i.e. no translation
561 will take place. */
562 single_locale[0] = 'C';
563 single_locale[1] = '\0';
564 }
565 else
566 {
567 char *cp = single_locale;
568 while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
569 *cp++ = *categoryvalue++;
570 *cp = '\0';
571
572 /* When this is a SUID binary we must not allow accessing files
573 outside the dedicated directories. */
574 if (ENABLE_SECURE && IS_PATH_WITH_DIR (single_locale))
575 /* Ingore this entry. */
576 continue;
577 }
578
579 /* If the current locale value is C (or POSIX) we don't load a
580 domain. Return the MSGID. */
581 if (strcmp (single_locale, "C") == 0
582 || strcmp (single_locale, "POSIX") == 0)
583 {
584 FREE_BLOCKS (block_list);
585 __libc_rwlock_unlock (_nl_state_lock);
586 __set_errno (saved_errno);
587 return (plural == 0
588 ? (char *) msgid1
589 /* Use the Germanic plural rule. */
590 : n == 1 ? (char *) msgid1 : (char *) msgid2);
591 }
592
593
594 /* Find structure describing the message catalog matching the
595 DOMAINNAME and CATEGORY. */
596 domain = _nl_find_domain (dirname, single_locale, xdomainname, binding);
597
598 if (domain != NULL)
599 {
600 retval = _nl_find_msg (domain, binding, msgid1, &retlen);
601
602 if (retval == NULL)
603 {
604 int cnt;
605
606 for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
607 {
608 retval = _nl_find_msg (domain->successor[cnt], binding,
609 msgid1, &retlen);
610
611 if (retval != NULL)
612 {
613 domain = domain->successor[cnt];
614 break;
615 }
616 }
617 }
618
619 if (retval != NULL)
620 {
621 /* Found the translation of MSGID1 in domain DOMAIN:
622 starting at RETVAL, RETLEN bytes. */
623 FREE_BLOCKS (block_list);
624 __set_errno (saved_errno);
625 #if defined HAVE_TSEARCH || defined _LIBC
626 if (foundp == NULL)
627 {
628 /* Create a new entry and add it to the search tree. */
629 struct known_translation_t *newp;
630
631 newp = (struct known_translation_t *)
632 malloc (offsetof (struct known_translation_t, msgid)
633 + msgid_len + domainname_len + 1);
634 if (newp != NULL)
635 {
636 newp->domainname =
637 mempcpy (newp->msgid, msgid1, msgid_len);
638 memcpy (newp->domainname, domainname, domainname_len + 1);
639 newp->category = category;
640 newp->counter = _nl_msg_cat_cntr;
641 newp->domain = domain;
642 newp->translation = retval;
643 newp->translation_length = retlen;
644
645 /* Insert the entry in the search tree. */
646 foundp = (struct known_translation_t **)
647 tsearch (newp, &root, transcmp);
648 if (foundp == NULL
649 || __builtin_expect (*foundp != newp, 0))
650 /* The insert failed. */
651 free (newp);
652 }
653 }
654 else
655 {
656 /* We can update the existing entry. */
657 (*foundp)->counter = _nl_msg_cat_cntr;
658 (*foundp)->domain = domain;
659 (*foundp)->translation = retval;
660 (*foundp)->translation_length = retlen;
661 }
662 #endif
663 /* Now deal with plural. */
664 if (plural)
665 retval = plural_lookup (domain, n, retval, retlen);
666
667 __libc_rwlock_unlock (_nl_state_lock);
668 return retval;
669 }
670 }
671 }
672 /* NOTREACHED */
673 }
674
675
676 char *
677 internal_function
678 _nl_find_msg (domain_file, domainbinding, msgid, lengthp)
679 struct loaded_l10nfile *domain_file;
680 struct binding *domainbinding;
681 const char *msgid;
682 size_t *lengthp;
683 {
684 struct loaded_domain *domain;
685 size_t act;
686 char *result;
687 size_t resultlen;
688
689 if (domain_file->decided == 0)
690 _nl_load_domain (domain_file, domainbinding);
691
692 if (domain_file->data == NULL)
693 return NULL;
694
695 domain = (struct loaded_domain *) domain_file->data;
696
697 /* Locate the MSGID and its translation. */
698 if (domain->hash_size > 2 && domain->hash_tab != NULL)
699 {
700 /* Use the hashing table. */
701 nls_uint32 len = strlen (msgid);
702 nls_uint32 hash_val = hash_string (msgid);
703 nls_uint32 idx = hash_val % domain->hash_size;
704 nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
705
706 while (1)
707 {
708 nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
709
710 if (nstr == 0)
711 /* Hash table entry is empty. */
712 return NULL;
713
714 /* Compare msgid with the original string at index nstr-1.
715 We compare the lengths with >=, not ==, because plural entries
716 are represented by strings with an embedded NUL. */
717 if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) >= len
718 && (strcmp (msgid,
719 domain->data + W (domain->must_swap,
720 domain->orig_tab[nstr - 1].offset))
721 == 0))
722 {
723 act = nstr - 1;
724 goto found;
725 }
726
727 if (idx >= domain->hash_size - incr)
728 idx -= domain->hash_size - incr;
729 else
730 idx += incr;
731 }
732 /* NOTREACHED */
733 }
734 else
735 {
736 /* Try the default method: binary search in the sorted array of
737 messages. */
738 size_t top, bottom;
739
740 bottom = 0;
741 top = domain->nstrings;
742 while (bottom < top)
743 {
744 int cmp_val;
745
746 act = (bottom + top) / 2;
747 cmp_val = strcmp (msgid, (domain->data
748 + W (domain->must_swap,
749 domain->orig_tab[act].offset)));
750 if (cmp_val < 0)
751 top = act;
752 else if (cmp_val > 0)
753 bottom = act + 1;
754 else
755 goto found;
756 }
757 /* No translation was found. */
758 return NULL;
759 }
760
761 found:
762 /* The translation was found at index ACT. If we have to convert the
763 string to use a different character set, this is the time. */
764 result = ((char *) domain->data
765 + W (domain->must_swap, domain->trans_tab[act].offset));
766 resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1;
767
768 #if defined _LIBC || HAVE_ICONV
769 if (domain->codeset_cntr
770 != (domainbinding != NULL ? domainbinding->codeset_cntr : 0))
771 {
772 /* The domain's codeset has changed through bind_textdomain_codeset()
773 since the message catalog was initialized or last accessed. We
774 have to reinitialize the converter. */
775 _nl_free_domain_conv (domain);
776 _nl_init_domain_conv (domain_file, domain, domainbinding);
777 }
778
779 if (
780 # ifdef _LIBC
781 domain->conv != (__gconv_t) -1
782 # else
783 # if HAVE_ICONV
784 domain->conv != (iconv_t) -1
785 # endif
786 # endif
787 )
788 {
789 /* We are supposed to do a conversion. First allocate an
790 appropriate table with the same structure as the table
791 of translations in the file, where we can put the pointers
792 to the converted strings in.
793 There is a slight complication with plural entries. They
794 are represented by consecutive NUL terminated strings. We
795 handle this case by converting RESULTLEN bytes, including
796 NULs. */
797
798 if (domain->conv_tab == NULL
799 && ((domain->conv_tab = (char **) calloc (domain->nstrings,
800 sizeof (char *)))
801 == NULL))
802 /* Mark that we didn't succeed allocating a table. */
803 domain->conv_tab = (char **) -1;
804
805 if (__builtin_expect (domain->conv_tab == (char **) -1, 0))
806 /* Nothing we can do, no more memory. */
807 goto converted;
808
809 if (domain->conv_tab[act] == NULL)
810 {
811 /* We haven't used this string so far, so it is not
812 translated yet. Do this now. */
813 /* We use a bit more efficient memory handling.
814 We allocate always larger blocks which get used over
815 time. This is faster than many small allocations. */
816 __libc_lock_define_initialized (static, lock)
817 # define INITIAL_BLOCK_SIZE 4080
818 static unsigned char *freemem;
819 static size_t freemem_size;
820
821 const unsigned char *inbuf;
822 unsigned char *outbuf;
823 int malloc_count;
824 # ifndef _LIBC
825 transmem_block_t *transmem_list = NULL;
826 # endif
827
828 __libc_lock_lock (lock);
829
830 inbuf = (const unsigned char *) result;
831 outbuf = freemem + sizeof (size_t);
832
833 malloc_count = 0;
834 while (1)
835 {
836 transmem_block_t *newmem;
837 # ifdef _LIBC
838 size_t non_reversible;
839 int res;
840
841 if (freemem_size < sizeof (size_t))
842 goto resize_freemem;
843
844 res = __gconv (domain->conv,
845 &inbuf, inbuf + resultlen,
846 &outbuf,
847 outbuf + freemem_size - sizeof (size_t),
848 &non_reversible);
849
850 if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT)
851 break;
852
853 if (res != __GCONV_FULL_OUTPUT)
854 {
855 __libc_lock_unlock (lock);
856 goto converted;
857 }
858
859 inbuf = result;
860 # else
861 # if HAVE_ICONV
862 const char *inptr = (const char *) inbuf;
863 size_t inleft = resultlen;
864 char *outptr = (char *) outbuf;
865 size_t outleft;
866
867 if (freemem_size < sizeof (size_t))
868 goto resize_freemem;
869
870 outleft = freemem_size - sizeof (size_t);
871 if (iconv (domain->conv,
872 (ICONV_CONST char **) &inptr, &inleft,
873 &outptr, &outleft)
874 != (size_t) (-1))
875 {
876 outbuf = (unsigned char *) outptr;
877 break;
878 }
879 if (errno != E2BIG)
880 {
881 __libc_lock_unlock (lock);
882 goto converted;
883 }
884 # endif
885 # endif
886
887 resize_freemem:
888 /* We must allocate a new buffer or resize the old one. */
889 if (malloc_count > 0)
890 {
891 ++malloc_count;
892 freemem_size = malloc_count * INITIAL_BLOCK_SIZE;
893 newmem = (transmem_block_t *) realloc (transmem_list,
894 freemem_size);
895 # ifdef _LIBC
896 if (newmem != NULL)
897 transmem_list = transmem_list->next;
898 else
899 {
900 struct transmem_list *old = transmem_list;
901
902 transmem_list = transmem_list->next;
903 free (old);
904 }
905 # endif
906 }
907 else
908 {
909 malloc_count = 1;
910 freemem_size = INITIAL_BLOCK_SIZE;
911 newmem = (transmem_block_t *) malloc (freemem_size);
912 }
913 if (__builtin_expect (newmem == NULL, 0))
914 {
915 freemem = NULL;
916 freemem_size = 0;
917 __libc_lock_unlock (lock);
918 goto converted;
919 }
920
921 # ifdef _LIBC
922 /* Add the block to the list of blocks we have to free
923 at some point. */
924 newmem->next = transmem_list;
925 transmem_list = newmem;
926
927 freemem = newmem->data;
928 freemem_size -= offsetof (struct transmem_list, data);
929 # else
930 transmem_list = newmem;
931 freemem = newmem;
932 # endif
933
934 outbuf = freemem + sizeof (size_t);
935 }
936
937 /* We have now in our buffer a converted string. Put this
938 into the table of conversions. */
939 *(size_t *) freemem = outbuf - freemem - sizeof (size_t);
940 domain->conv_tab[act] = (char *) freemem;
941 /* Shrink freemem, but keep it aligned. */
942 freemem_size -= outbuf - freemem;
943 freemem = outbuf;
944 freemem += freemem_size & (alignof (size_t) - 1);
945 freemem_size = freemem_size & ~ (alignof (size_t) - 1);
946
947 __libc_lock_unlock (lock);
948 }
949
950 /* Now domain->conv_tab[act] contains the translation of all
951 the plural variants. */
952 result = domain->conv_tab[act] + sizeof (size_t);
953 resultlen = *(size_t *) domain->conv_tab[act];
954 }
955
956 converted:
957 /* The result string is converted. */
958
959 #endif /* _LIBC || HAVE_ICONV */
960
961 *lengthp = resultlen;
962 return result;
963 }
964
965
966 /* Look up a plural variant. */
967 static char *
968 internal_function
969 plural_lookup (domain, n, translation, translation_len)
970 struct loaded_l10nfile *domain;
971 unsigned long int n;
972 const char *translation;
973 size_t translation_len;
974 {
975 struct loaded_domain *domaindata = (struct loaded_domain *) domain->data;
976 unsigned long int index;
977 const char *p;
978
979 index = plural_eval (domaindata->plural, n);
980 if (index >= domaindata->nplurals)
981 /* This should never happen. It means the plural expression and the
982 given maximum value do not match. */
983 index = 0;
984
985 /* Skip INDEX strings at TRANSLATION. */
986 p = translation;
987 while (index-- > 0)
988 {
989 #ifdef _LIBC
990 p = __rawmemchr (p, '\0');
991 #else
992 p = strchr (p, '\0');
993 #endif
994 /* And skip over the NUL byte. */
995 p++;
996
997 if (p >= translation + translation_len)
998 /* This should never happen. It means the plural expression
999 evaluated to a value larger than the number of variants
1000 available for MSGID1. */
1001 return (char *) translation;
1002 }
1003 return (char *) p;
1004 }
1005
1006
1007 /* Function to evaluate the plural expression and return an index value. */
1008 static unsigned long int
1009 internal_function
1010 plural_eval (pexp, n)
1011 struct expression *pexp;
1012 unsigned long int n;
1013 {
1014 switch (pexp->nargs)
1015 {
1016 case 0:
1017 switch (pexp->operation)
1018 {
1019 case var:
1020 return n;
1021 case num:
1022 return pexp->val.num;
1023 default:
1024 break;
1025 }
1026 /* NOTREACHED */
1027 break;
1028 case 1:
1029 {
1030 /* pexp->operation must be lnot. */
1031 unsigned long int arg = plural_eval (pexp->val.args[0], n);
1032 return ! arg;
1033 }
1034 case 2:
1035 {
1036 unsigned long int leftarg = plural_eval (pexp->val.args[0], n);
1037 if (pexp->operation == lor)
1038 return leftarg || plural_eval (pexp->val.args[1], n);
1039 else if (pexp->operation == land)
1040 return leftarg && plural_eval (pexp->val.args[1], n);
1041 else
1042 {
1043 unsigned long int rightarg = plural_eval (pexp->val.args[1], n);
1044
1045 switch (pexp->operation)
1046 {
1047 case mult:
1048 return leftarg * rightarg;
1049 case divide:
1050 return leftarg / rightarg;
1051 case module:
1052 return leftarg % rightarg;
1053 case plus:
1054 return leftarg + rightarg;
1055 case minus:
1056 return leftarg - rightarg;
1057 case less_than:
1058 return leftarg < rightarg;
1059 case greater_than:
1060 return leftarg > rightarg;
1061 case less_or_equal:
1062 return leftarg <= rightarg;
1063 case greater_or_equal:
1064 return leftarg >= rightarg;
1065 case equal:
1066 return leftarg == rightarg;
1067 case not_equal:
1068 return leftarg != rightarg;
1069 default:
1070 break;
1071 }
1072 }
1073 /* NOTREACHED */
1074 break;
1075 }
1076 case 3:
1077 {
1078 /* pexp->operation must be qmop. */
1079 unsigned long int boolarg = plural_eval (pexp->val.args[0], n);
1080 return plural_eval (pexp->val.args[boolarg ? 1 : 2], n);
1081 }
1082 }
1083 /* NOTREACHED */
1084 return 0;
1085 }
1086
1087
1088 /* Return string representation of locale CATEGORY. */
1089 static const char *
1090 internal_function
1091 category_to_name (category)
1092 int category;
1093 {
1094 const char *retval;
1095
1096 switch (category)
1097 {
1098 #ifdef LC_COLLATE
1099 case LC_COLLATE:
1100 retval = "LC_COLLATE";
1101 break;
1102 #endif
1103 #ifdef LC_CTYPE
1104 case LC_CTYPE:
1105 retval = "LC_CTYPE";
1106 break;
1107 #endif
1108 #ifdef LC_MONETARY
1109 case LC_MONETARY:
1110 retval = "LC_MONETARY";
1111 break;
1112 #endif
1113 #ifdef LC_NUMERIC
1114 case LC_NUMERIC:
1115 retval = "LC_NUMERIC";
1116 break;
1117 #endif
1118 #ifdef LC_TIME
1119 case LC_TIME:
1120 retval = "LC_TIME";
1121 break;
1122 #endif
1123 #ifdef LC_MESSAGES
1124 case LC_MESSAGES:
1125 retval = "LC_MESSAGES";
1126 break;
1127 #endif
1128 #ifdef LC_RESPONSE
1129 case LC_RESPONSE:
1130 retval = "LC_RESPONSE";
1131 break;
1132 #endif
1133 #ifdef LC_ALL
1134 case LC_ALL:
1135 /* This might not make sense but is perhaps better than any other
1136 value. */
1137 retval = "LC_ALL";
1138 break;
1139 #endif
1140 default:
1141 /* If you have a better idea for a default value let me know. */
1142 retval = "LC_XXX";
1143 }
1144
1145 return retval;
1146 }
1147
1148 /* Guess value of current locale from value of the environment variables. */
1149 static const char *
1150 internal_function
1151 guess_category_value (category, categoryname)
1152 int category;
1153 const char *categoryname;
1154 {
1155 const char *language;
1156 const char *retval;
1157
1158 /* The highest priority value is the `LANGUAGE' environment
1159 variable. But we don't use the value if the currently selected
1160 locale is the C locale. This is a GNU extension. */
1161 language = getenv ("LANGUAGE");
1162 if (language != NULL && language[0] == '\0')
1163 language = NULL;
1164
1165 /* We have to proceed with the POSIX methods of looking to `LC_ALL',
1166 `LC_xxx', and `LANG'. On some systems this can be done by the
1167 `setlocale' function itself. */
1168 #if defined _LIBC || (defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL)
1169 retval = setlocale (category, NULL);
1170 #else
1171 /* Setting of LC_ALL overwrites all other. */
1172 retval = getenv ("LC_ALL");
1173 if (retval == NULL || retval[0] == '\0')
1174 {
1175 /* Next comes the name of the desired category. */
1176 retval = getenv (categoryname);
1177 if (retval == NULL || retval[0] == '\0')
1178 {
1179 /* Last possibility is the LANG environment variable. */
1180 retval = getenv ("LANG");
1181 if (retval == NULL || retval[0] == '\0')
1182 /* We use C as the default domain. POSIX says this is
1183 implementation defined. */
1184 return "C";
1185 }
1186 }
1187 #endif
1188
1189 return language != NULL && strcmp (retval, "C") != 0 ? language : retval;
1190 }
1191
1192 /* @@ begin of epilog @@ */
1193
1194 /* We don't want libintl.a to depend on any other library. So we
1195 avoid the non-standard function stpcpy. In GNU C Library this
1196 function is available, though. Also allow the symbol HAVE_STPCPY
1197 to be defined. */
1198 #if !_LIBC && !HAVE_STPCPY
1199 static char *
1200 stpcpy (dest, src)
1201 char *dest;
1202 const char *src;
1203 {
1204 while ((*dest++ = *src++) != '\0')
1205 /* Do nothing. */ ;
1206 return dest - 1;
1207 }
1208 #endif
1209
1210 #if !_LIBC && !HAVE_MEMPCPY
1211 static void *
1212 mempcpy (dest, src, n)
1213 void *dest;
1214 const void *src;
1215 size_t n;
1216 {
1217 return (void *) ((char *) memcpy (dest, src, n) + n);
1218 }
1219 #endif
1220
1221
1222 #ifdef _LIBC
1223 /* If we want to free all resources we have to do some work at
1224 program's end. */
1225 static void __attribute__ ((unused))
1226 free_mem (void)
1227 {
1228 void *old;
1229
1230 while (_nl_domain_bindings != NULL)
1231 {
1232 struct binding *oldp = _nl_domain_bindings;
1233 _nl_domain_bindings = _nl_domain_bindings->next;
1234 if (oldp->dirname != _nl_default_dirname)
1235 /* Yes, this is a pointer comparison. */
1236 free (oldp->dirname);
1237 free (oldp->codeset);
1238 free (oldp);
1239 }
1240
1241 if (_nl_current_default_domain != _nl_default_default_domain)
1242 /* Yes, again a pointer comparison. */
1243 free ((char *) _nl_current_default_domain);
1244
1245 /* Remove the search tree with the known translations. */
1246 __tdestroy (root, free);
1247 root = NULL;
1248
1249 while (transmem_list != NULL)
1250 {
1251 old = transmem_list;
1252 transmem_list = transmem_list->next;
1253 free (old);
1254 }
1255 }
1256
1257 text_set_element (__libc_subfreeres, free_mem);
1258 #endif
0 /* Implementation of the dcngettext(3) function.
1 Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 #ifdef HAVE_CONFIG_H
19 # include <config.h>
20 #endif
21
22 #include "gettextP.h"
23 #ifdef _LIBC
24 # include <libintl.h>
25 #else
26 # include "libgnuintl.h"
27 #endif
28
29 /* @@ end of prolog @@ */
30
31 /* Names for the libintl functions are a problem. They must not clash
32 with existing names and they should follow ANSI C. But this source
33 code is also used in GNU C Library where the names have a __
34 prefix. So we have to make a difference here. */
35 #ifdef _LIBC
36 # define DCNGETTEXT __dcngettext
37 # define DCIGETTEXT __dcigettext
38 #else
39 # define DCNGETTEXT dcngettext__
40 # define DCIGETTEXT dcigettext__
41 #endif
42
43 /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
44 locale. */
45 char *
46 DCNGETTEXT (domainname, msgid1, msgid2, n, category)
47 const char *domainname;
48 const char *msgid1;
49 const char *msgid2;
50 unsigned long int n;
51 int category;
52 {
53 return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
54 }
55
56 #ifdef _LIBC
57 /* Alias for function name in GNU C Library. */
58 weak_alias (__dcngettext, dcngettext);
59 #endif
0 /* Implementation of the dgettext(3) function.
1 Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 #ifdef HAVE_CONFIG_H
19 # include <config.h>
20 #endif
21
22 #include <locale.h>
23
24 #include "gettextP.h"
25 #ifdef _LIBC
26 # include <libintl.h>
27 #else
28 # include "libgnuintl.h"
29 #endif
30
31 /* @@ end of prolog @@ */
32
33 /* Names for the libintl functions are a problem. They must not clash
34 with existing names and they should follow ANSI C. But this source
35 code is also used in GNU C Library where the names have a __
36 prefix. So we have to make a difference here. */
37 #ifdef _LIBC
38 # define DGETTEXT __dgettext
39 # define DCGETTEXT __dcgettext
40 #else
41 # define DGETTEXT dgettext__
42 # define DCGETTEXT dcgettext__
43 #endif
44
45 /* Look up MSGID in the DOMAINNAME message catalog of the current
46 LC_MESSAGES locale. */
47 char *
48 DGETTEXT (domainname, msgid)
49 const char *domainname;
50 const char *msgid;
51 {
52 return DCGETTEXT (domainname, msgid, LC_MESSAGES);
53 }
54
55 #ifdef _LIBC
56 /* Alias for function name in GNU C Library. */
57 weak_alias (__dgettext, dgettext);
58 #endif
0 /* Implementation of the dngettext(3) function.
1 Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 #ifdef HAVE_CONFIG_H
19 # include <config.h>
20 #endif
21
22 #include <locale.h>
23
24 #include "gettextP.h"
25 #ifdef _LIBC
26 # include <libintl.h>
27 #else
28 # include "libgnuintl.h"
29 #endif
30
31 /* @@ end of prolog @@ */
32
33 /* Names for the libintl functions are a problem. They must not clash
34 with existing names and they should follow ANSI C. But this source
35 code is also used in GNU C Library where the names have a __
36 prefix. So we have to make a difference here. */
37 #ifdef _LIBC
38 # define DNGETTEXT __dngettext
39 # define DCNGETTEXT __dcngettext
40 #else
41 # define DNGETTEXT dngettext__
42 # define DCNGETTEXT dcngettext__
43 #endif
44
45 /* Look up MSGID in the DOMAINNAME message catalog of the current
46 LC_MESSAGES locale and skip message according to the plural form. */
47 char *
48 DNGETTEXT (domainname, msgid1, msgid2, n)
49 const char *domainname;
50 const char *msgid1;
51 const char *msgid2;
52 unsigned long int n;
53 {
54 return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
55 }
56
57 #ifdef _LIBC
58 /* Alias for function name in GNU C Library. */
59 weak_alias (__dngettext, dngettext);
60 #endif
0 /* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
1 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 #ifdef HAVE_CONFIG_H
19 # include <config.h>
20 #endif
21
22 #include <stdlib.h>
23 #include <string.h>
24 #include <sys/types.h>
25
26 #include "loadinfo.h"
27
28 /* On some strange systems still no definition of NULL is found. Sigh! */
29 #ifndef NULL
30 # if defined __STDC__ && __STDC__
31 # define NULL ((void *) 0)
32 # else
33 # define NULL 0
34 # endif
35 #endif
36
37 /* @@ end of prolog @@ */
38
39 char *
40 _nl_find_language (name)
41 const char *name;
42 {
43 while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
44 && name[0] != '+' && name[0] != ',')
45 ++name;
46
47 return (char *) name;
48 }
49
50
51 int
52 _nl_explode_name (name, language, modifier, territory, codeset,
53 normalized_codeset, special, sponsor, revision)
54 char *name;
55 const char **language;
56 const char **modifier;
57 const char **territory;
58 const char **codeset;
59 const char **normalized_codeset;
60 const char **special;
61 const char **sponsor;
62 const char **revision;
63 {
64 enum { undecided, xpg, cen } syntax;
65 char *cp;
66 int mask;
67
68 *modifier = NULL;
69 *territory = NULL;
70 *codeset = NULL;
71 *normalized_codeset = NULL;
72 *special = NULL;
73 *sponsor = NULL;
74 *revision = NULL;
75
76 /* Now we determine the single parts of the locale name. First
77 look for the language. Termination symbols are `_' and `@' if
78 we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
79 mask = 0;
80 syntax = undecided;
81 *language = cp = name;
82 cp = _nl_find_language (*language);
83
84 if (*language == cp)
85 /* This does not make sense: language has to be specified. Use
86 this entry as it is without exploding. Perhaps it is an alias. */
87 cp = strchr (*language, '\0');
88 else if (cp[0] == '_')
89 {
90 /* Next is the territory. */
91 cp[0] = '\0';
92 *territory = ++cp;
93
94 while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
95 && cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
96 ++cp;
97
98 mask |= TERRITORY;
99
100 if (cp[0] == '.')
101 {
102 /* Next is the codeset. */
103 syntax = xpg;
104 cp[0] = '\0';
105 *codeset = ++cp;
106
107 while (cp[0] != '\0' && cp[0] != '@')
108 ++cp;
109
110 mask |= XPG_CODESET;
111
112 if (*codeset != cp && (*codeset)[0] != '\0')
113 {
114 *normalized_codeset = _nl_normalize_codeset (*codeset,
115 cp - *codeset);
116 if (strcmp (*codeset, *normalized_codeset) == 0)
117 free ((char *) *normalized_codeset);
118 else
119 mask |= XPG_NORM_CODESET;
120 }
121 }
122 }
123
124 if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
125 {
126 /* Next is the modifier. */
127 syntax = cp[0] == '@' ? xpg : cen;
128 cp[0] = '\0';
129 *modifier = ++cp;
130
131 while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
132 && cp[0] != ',' && cp[0] != '_')
133 ++cp;
134
135 mask |= XPG_MODIFIER | CEN_AUDIENCE;
136 }
137
138 if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
139 {
140 syntax = cen;
141
142 if (cp[0] == '+')
143 {
144 /* Next is special application (CEN syntax). */
145 cp[0] = '\0';
146 *special = ++cp;
147
148 while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
149 ++cp;
150
151 mask |= CEN_SPECIAL;
152 }
153
154 if (cp[0] == ',')
155 {
156 /* Next is sponsor (CEN syntax). */
157 cp[0] = '\0';
158 *sponsor = ++cp;
159
160 while (cp[0] != '\0' && cp[0] != '_')
161 ++cp;
162
163 mask |= CEN_SPONSOR;
164 }
165
166 if (cp[0] == '_')
167 {
168 /* Next is revision (CEN syntax). */
169 cp[0] = '\0';
170 *revision = ++cp;
171
172 mask |= CEN_REVISION;
173 }
174 }
175
176 /* For CEN syntax values it might be important to have the
177 separator character in the file name, not for XPG syntax. */
178 if (syntax == xpg)
179 {
180 if (*territory != NULL && (*territory)[0] == '\0')
181 mask &= ~TERRITORY;
182
183 if (*codeset != NULL && (*codeset)[0] == '\0')
184 mask &= ~XPG_CODESET;
185
186 if (*modifier != NULL && (*modifier)[0] == '\0')
187 mask &= ~XPG_MODIFIER;
188 }
189
190 return mask;
191 }
0 /* Handle list of needed message catalogs
1 Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
2 Written by Ulrich Drepper <drepper@gnu.org>, 1995.
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published
6 by the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public
15 License along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17 USA. */
18
19 #ifdef HAVE_CONFIG_H
20 # include <config.h>
21 #endif
22
23 #include <stdio.h>
24 #include <sys/types.h>
25 #include <stdlib.h>
26 #include <string.h>
27
28 #if defined HAVE_UNISTD_H || defined _LIBC
29 # include <unistd.h>
30 #endif
31
32 #include "gettextP.h"
33 #ifdef _LIBC
34 # include <libintl.h>
35 #else
36 # include "libgnuintl.h"
37 #endif
38
39 /* @@ end of prolog @@ */
40 /* List of already loaded domains. */
41 static struct loaded_l10nfile *_nl_loaded_domains;
42
43
44 /* Return a data structure describing the message catalog described by
45 the DOMAINNAME and CATEGORY parameters with respect to the currently
46 established bindings. */
47 struct loaded_l10nfile *
48 internal_function
49 _nl_find_domain (dirname, locale, domainname, domainbinding)
50 const char *dirname;
51 char *locale;
52 const char *domainname;
53 struct binding *domainbinding;
54 {
55 struct loaded_l10nfile *retval;
56 const char *language;
57 const char *modifier;
58 const char *territory;
59 const char *codeset;
60 const char *normalized_codeset;
61 const char *special;
62 const char *sponsor;
63 const char *revision;
64 const char *alias_value;
65 int mask;
66
67 /* LOCALE can consist of up to four recognized parts for the XPG syntax:
68
69 language[_territory[.codeset]][@modifier]
70
71 and six parts for the CEN syntax:
72
73 language[_territory][+audience][+special][,[sponsor][_revision]]
74
75 Beside the first part all of them are allowed to be missing. If
76 the full specified locale is not found, the less specific one are
77 looked for. The various parts will be stripped off according to
78 the following order:
79 (1) revision
80 (2) sponsor
81 (3) special
82 (4) codeset
83 (5) normalized codeset
84 (6) territory
85 (7) audience/modifier
86 */
87
88 /* If we have already tested for this locale entry there has to
89 be one data set in the list of loaded domains. */
90 retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
91 strlen (dirname) + 1, 0, locale, NULL, NULL,
92 NULL, NULL, NULL, NULL, NULL, domainname, 0);
93 if (retval != NULL)
94 {
95 /* We know something about this locale. */
96 int cnt;
97
98 if (retval->decided == 0)
99 _nl_load_domain (retval, domainbinding);
100
101 if (retval->data != NULL)
102 return retval;
103
104 for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
105 {
106 if (retval->successor[cnt]->decided == 0)
107 _nl_load_domain (retval->successor[cnt], domainbinding);
108
109 if (retval->successor[cnt]->data != NULL)
110 break;
111 }
112 return cnt >= 0 ? retval : NULL;
113 /* NOTREACHED */
114 }
115
116 /* See whether the locale value is an alias. If yes its value
117 *overwrites* the alias name. No test for the original value is
118 done. */
119 alias_value = _nl_expand_alias (locale);
120 if (alias_value != NULL)
121 {
122 #if defined _LIBC || defined HAVE_STRDUP
123 locale = strdup (alias_value);
124 if (locale == NULL)
125 return NULL;
126 #else
127 size_t len = strlen (alias_value) + 1;
128 locale = (char *) malloc (len);
129 if (locale == NULL)
130 return NULL;
131
132 memcpy (locale, alias_value, len);
133 #endif
134 }
135
136 /* Now we determine the single parts of the locale name. First
137 look for the language. Termination symbols are `_' and `@' if
138 we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
139 mask = _nl_explode_name (locale, &language, &modifier, &territory,
140 &codeset, &normalized_codeset, &special,
141 &sponsor, &revision);
142
143 /* Create all possible locale entries which might be interested in
144 generalization. */
145 retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
146 strlen (dirname) + 1, mask, language, territory,
147 codeset, normalized_codeset, modifier, special,
148 sponsor, revision, domainname, 1);
149 if (retval == NULL)
150 /* This means we are out of core. */
151 return NULL;
152
153 if (retval->decided == 0)
154 _nl_load_domain (retval, domainbinding);
155 if (retval->data == NULL)
156 {
157 int cnt;
158 for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
159 {
160 if (retval->successor[cnt]->decided == 0)
161 _nl_load_domain (retval->successor[cnt], domainbinding);
162 if (retval->successor[cnt]->data != NULL)
163 break;
164 }
165 }
166
167 /* The room for an alias was dynamically allocated. Free it now. */
168 if (alias_value != NULL)
169 free (locale);
170
171 /* The space for normalized_codeset is dynamically allocated. Free it. */
172 if (mask & XPG_NORM_CODESET)
173 free ((void *) normalized_codeset);
174
175 return retval;
176 }
177
178
179 #ifdef _LIBC
180 static void __attribute__ ((unused))
181 free_mem (void)
182 {
183 struct loaded_l10nfile *runp = _nl_loaded_domains;
184
185 while (runp != NULL)
186 {
187 struct loaded_l10nfile *here = runp;
188 if (runp->data != NULL)
189 _nl_unload_domain ((struct loaded_domain *) runp->data);
190 runp = runp->next;
191 free ((char *) here->filename);
192 free (here);
193 }
194 }
195
196 text_set_element (__libc_subfreeres, free_mem);
197 #endif
0 /* Implementation of gettext(3) function.
1 Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 #ifdef HAVE_CONFIG_H
19 # include <config.h>
20 #endif
21
22 #ifdef _LIBC
23 # define __need_NULL
24 # include <stddef.h>
25 #else
26 # include <stdlib.h> /* Just for NULL. */
27 #endif
28
29 #include "gettextP.h"
30 #ifdef _LIBC
31 # include <libintl.h>
32 #else
33 # include "libgnuintl.h"
34 #endif
35
36 /* @@ end of prolog @@ */
37
38 /* Names for the libintl functions are a problem. They must not clash
39 with existing names and they should follow ANSI C. But this source
40 code is also used in GNU C Library where the names have a __
41 prefix. So we have to make a difference here. */
42 #ifdef _LIBC
43 # define GETTEXT __gettext
44 # define DCGETTEXT __dcgettext
45 #else
46 # define GETTEXT gettext__
47 # define DCGETTEXT dcgettext__
48 #endif
49
50 /* Look up MSGID in the current default message catalog for the current
51 LC_MESSAGES locale. If not found, returns MSGID itself (the default
52 text). */
53 char *
54 GETTEXT (msgid)
55 const char *msgid;
56 {
57 return DCGETTEXT (NULL, msgid, LC_MESSAGES);
58 }
59
60 #ifdef _LIBC
61 /* Alias for function name in GNU C Library. */
62 weak_alias (__gettext, gettext);
63 #endif
0 /* Description of GNU message catalog format: general file layout.
1 Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 #ifndef _GETTEXT_H
19 #define _GETTEXT_H 1
20
21 #if HAVE_LIMITS_H || _LIBC
22 # include <limits.h>
23 #endif
24
25 /* @@ end of prolog @@ */
26
27 /* The magic number of the GNU message catalog format. */
28 #define _MAGIC 0x950412de
29 #define _MAGIC_SWAPPED 0xde120495
30
31 /* Revision number of the currently used .mo (binary) file format. */
32 #define MO_REVISION_NUMBER 0
33
34 /* The following contortions are an attempt to use the C preprocessor
35 to determine an unsigned integral type that is 32 bits wide. An
36 alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
37 as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
38 when cross-compiling. */
39
40 #if __STDC__
41 # define UINT_MAX_32_BITS 4294967295U
42 #else
43 # define UINT_MAX_32_BITS 0xFFFFFFFF
44 #endif
45
46 /* If UINT_MAX isn't defined, assume it's a 32-bit type.
47 This should be valid for all systems GNU cares about because
48 that doesn't include 16-bit systems, and only modern systems
49 (that certainly have <limits.h>) have 64+-bit integral types. */
50
51 #ifndef UINT_MAX
52 # define UINT_MAX UINT_MAX_32_BITS
53 #endif
54
55 #if UINT_MAX == UINT_MAX_32_BITS
56 typedef unsigned nls_uint32;
57 #else
58 # if USHRT_MAX == UINT_MAX_32_BITS
59 typedef unsigned short nls_uint32;
60 # else
61 # if ULONG_MAX == UINT_MAX_32_BITS
62 typedef unsigned long nls_uint32;
63 # else
64 /* The following line is intended to throw an error. Using #error is
65 not portable enough. */
66 "Cannot determine unsigned 32-bit data type."
67 # endif
68 # endif
69 #endif
70
71
72 /* Header for binary .mo file format. */
73 struct mo_file_header
74 {
75 /* The magic number. */
76 nls_uint32 magic;
77 /* The revision number of the file format. */
78 nls_uint32 revision;
79 /* The number of strings pairs. */
80 nls_uint32 nstrings;
81 /* Offset of table with start offsets of original strings. */
82 nls_uint32 orig_tab_offset;
83 /* Offset of table with start offsets of translation strings. */
84 nls_uint32 trans_tab_offset;
85 /* Size of hashing table. */
86 nls_uint32 hash_tab_size;
87 /* Offset of first hashing entry. */
88 nls_uint32 hash_tab_offset;
89 };
90
91 struct string_desc
92 {
93 /* Length of addressed string. */
94 nls_uint32 length;
95 /* Offset of string in file. */
96 nls_uint32 offset;
97 };
98
99 /* @@ begin of epilog @@ */
100
101 #endif /* gettext.h */
0 /* Header describing internals of libintl library.
1 Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
2 Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published
6 by the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public
15 License along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17 USA. */
18
19 #ifndef _GETTEXTP_H
20 #define _GETTEXTP_H
21
22 #include <stddef.h> /* Get size_t. */
23
24 #ifdef _LIBC
25 # include "../iconv/gconv_int.h"
26 #else
27 # if HAVE_ICONV
28 # include <iconv.h>
29 # endif
30 #endif
31
32 #include "loadinfo.h"
33
34 #include "gettext.h" /* Get nls_uint32. */
35
36 /* @@ end of prolog @@ */
37
38 #ifndef PARAMS
39 # if __STDC__
40 # define PARAMS(args) args
41 # else
42 # define PARAMS(args) ()
43 # endif
44 #endif
45
46 #ifndef internal_function
47 # define internal_function
48 #endif
49
50 /* Tell the compiler when a conditional or integer expression is
51 almost always true or almost always false. */
52 #ifndef HAVE_BUILTIN_EXPECT
53 # define __builtin_expect(expr, val) (expr)
54 #endif
55
56 #ifndef W
57 # define W(flag, data) ((flag) ? SWAP (data) : (data))
58 #endif
59
60
61 #ifdef _LIBC
62 # include <byteswap.h>
63 # define SWAP(i) bswap_32 (i)
64 #else
65 static inline nls_uint32
66 SWAP (i)
67 nls_uint32 i;
68 {
69 return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
70 }
71 #endif
72
73
74 /* This is the representation of the expressions to determine the
75 plural form. */
76 struct expression
77 {
78 int nargs; /* Number of arguments. */
79 enum operator
80 {
81 /* Without arguments: */
82 var, /* The variable "n". */
83 num, /* Decimal number. */
84 /* Unary operators: */
85 lnot, /* Logical NOT. */
86 /* Binary operators: */
87 mult, /* Multiplication. */
88 divide, /* Division. */
89 module, /* Module operation. */
90 plus, /* Addition. */
91 minus, /* Subtraction. */
92 less_than, /* Comparison. */
93 greater_than, /* Comparison. */
94 less_or_equal, /* Comparison. */
95 greater_or_equal, /* Comparison. */
96 equal, /* Comparision for equality. */
97 not_equal, /* Comparision for inequality. */
98 land, /* Logical AND. */
99 lor, /* Logical OR. */
100 /* Ternary operators: */
101 qmop /* Question mark operator. */
102 } operation;
103 union
104 {
105 unsigned long int num; /* Number value for `num'. */
106 struct expression *args[3]; /* Up to three arguments. */
107 } val;
108 };
109
110 /* This is the data structure to pass information to the parser and get
111 the result in a thread-safe way. */
112 struct parse_args
113 {
114 const char *cp;
115 struct expression *res;
116 };
117
118
119 /* The representation of an opened message catalog. */
120 struct loaded_domain
121 {
122 const char *data;
123 int use_mmap;
124 size_t mmap_size;
125 int must_swap;
126 nls_uint32 nstrings;
127 struct string_desc *orig_tab;
128 struct string_desc *trans_tab;
129 nls_uint32 hash_size;
130 nls_uint32 *hash_tab;
131 int codeset_cntr;
132 #ifdef _LIBC
133 __gconv_t conv;
134 #else
135 # if HAVE_ICONV
136 iconv_t conv;
137 # endif
138 #endif
139 char **conv_tab;
140
141 struct expression *plural;
142 unsigned long int nplurals;
143 };
144
145 /* We want to allocate a string at the end of the struct. But ISO C
146 doesn't allow zero sized arrays. */
147 #ifdef __GNUC__
148 # define ZERO 0
149 #else
150 # define ZERO 1
151 #endif
152
153 /* A set of settings bound to a message domain. Used to store settings
154 from bindtextdomain() and bind_textdomain_codeset(). */
155 struct binding
156 {
157 struct binding *next;
158 char *dirname;
159 int codeset_cntr; /* Incremented each time codeset changes. */
160 char *codeset;
161 char domainname[ZERO];
162 };
163
164 /* A counter which is incremented each time some previous translations
165 become invalid.
166 This variable is part of the external ABI of the GNU libintl. */
167 extern int _nl_msg_cat_cntr;
168
169 struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
170 char *__locale,
171 const char *__domainname,
172 struct binding *__domainbinding))
173 internal_function;
174 void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain,
175 struct binding *__domainbinding))
176 internal_function;
177 void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
178 internal_function;
179 const char *_nl_init_domain_conv PARAMS ((struct loaded_l10nfile *__domain_file,
180 struct loaded_domain *__domain,
181 struct binding *__domainbinding))
182 internal_function;
183 void _nl_free_domain_conv PARAMS ((struct loaded_domain *__domain))
184 internal_function;
185
186 char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file,
187 struct binding *domainbinding,
188 const char *msgid, size_t *lengthp))
189 internal_function;
190
191 #ifdef _LIBC
192 extern char *__gettext PARAMS ((const char *__msgid));
193 extern char *__dgettext PARAMS ((const char *__domainname,
194 const char *__msgid));
195 extern char *__dcgettext PARAMS ((const char *__domainname,
196 const char *__msgid, int __category));
197 extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
198 unsigned long int __n));
199 extern char *__dngettext PARAMS ((const char *__domainname,
200 const char *__msgid1, const char *__msgid2,
201 unsigned long int n));
202 extern char *__dcngettext PARAMS ((const char *__domainname,
203 const char *__msgid1, const char *__msgid2,
204 unsigned long int __n, int __category));
205 extern char *__dcigettext PARAMS ((const char *__domainname,
206 const char *__msgid1, const char *__msgid2,
207 int __plural, unsigned long int __n,
208 int __category));
209 extern char *__textdomain PARAMS ((const char *__domainname));
210 extern char *__bindtextdomain PARAMS ((const char *__domainname,
211 const char *__dirname));
212 extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname,
213 const char *__codeset));
214 #else
215 extern char *gettext__ PARAMS ((const char *__msgid));
216 extern char *dgettext__ PARAMS ((const char *__domainname,
217 const char *__msgid));
218 extern char *dcgettext__ PARAMS ((const char *__domainname,
219 const char *__msgid, int __category));
220 extern char *ngettext__ PARAMS ((const char *__msgid1, const char *__msgid2,
221 unsigned long int __n));
222 extern char *dngettext__ PARAMS ((const char *__domainname,
223 const char *__msgid1, const char *__msgid2,
224 unsigned long int __n));
225 extern char *dcngettext__ PARAMS ((const char *__domainname,
226 const char *__msgid1, const char *__msgid2,
227 unsigned long int __n, int __category));
228 extern char *dcigettext__ PARAMS ((const char *__domainname,
229 const char *__msgid1, const char *__msgid2,
230 int __plural, unsigned long int __n,
231 int __category));
232 extern char *textdomain__ PARAMS ((const char *__domainname));
233 extern char *bindtextdomain__ PARAMS ((const char *__domainname,
234 const char *__dirname));
235 extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname,
236 const char *__codeset));
237 #endif
238
239 #ifdef _LIBC
240 extern void __gettext_free_exp PARAMS ((struct expression *exp))
241 internal_function;
242 extern int __gettextparse PARAMS ((void *arg));
243 #else
244 extern void gettext_free_exp__ PARAMS ((struct expression *exp))
245 internal_function;
246 extern int gettextparse__ PARAMS ((void *arg));
247 #endif
248
249 /* @@ begin of epilog @@ */
250
251 #endif /* gettextP.h */
0 /* Description of GNU message catalog format: string hashing function.
1 Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 /* @@ end of prolog @@ */
19
20 #ifndef PARAMS
21 # if __STDC__
22 # define PARAMS(Args) Args
23 # else
24 # define PARAMS(Args) ()
25 # endif
26 #endif
27
28 /* We assume to have `unsigned long int' value with at least 32 bits. */
29 #define HASHWORDBITS 32
30
31
32 /* Defines the so called `hashpjw' function by P.J. Weinberger
33 [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
34 1986, 1987 Bell Telephone Laboratories, Inc.] */
35 static unsigned long int hash_string PARAMS ((const char *__str_param));
36
37 static inline unsigned long int
38 hash_string (str_param)
39 const char *str_param;
40 {
41 unsigned long int hval, g;
42 const char *str = str_param;
43
44 /* Compute the hash value for the given string. */
45 hval = 0;
46 while (*str != '\0')
47 {
48 hval <<= 4;
49 hval += (unsigned long int) *str++;
50 g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
51 if (g != 0)
52 {
53 hval ^= g >> (HASHWORDBITS - 8);
54 hval ^= g;
55 }
56 }
57 return hval;
58 }
0 /* intl-compat.c - Stub functions to call gettext functions from GNU gettext
1 Library.
2 Copyright (C) 1995, 2000, 2001 Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published
6 by the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public
15 License along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17 USA. */
18
19 #ifdef HAVE_CONFIG_H
20 # include <config.h>
21 #endif
22
23 #include "libgnuintl.h"
24 #include "gettextP.h"
25
26 /* @@ end of prolog @@ */
27
28 /* This file redirects the gettext functions (without prefix or suffix) to
29 those defined in the included GNU gettext library (with "__" suffix).
30 It is compiled into libintl when the included GNU gettext library is
31 configured --with-included-gettext.
32
33 This redirection works also in the case that the system C library or
34 the system libintl library contain gettext/textdomain/... functions.
35 If it didn't, we would need to add preprocessor level redirections to
36 libgnuintl.h of the following form:
37
38 # define gettext gettext__
39 # define dgettext dgettext__
40 # define dcgettext dcgettext__
41 # define ngettext ngettext__
42 # define dngettext dngettext__
43 # define dcngettext dcngettext__
44 # define textdomain textdomain__
45 # define bindtextdomain bindtextdomain__
46 # define bind_textdomain_codeset bind_textdomain_codeset__
47
48 How does this redirection work? There are two cases.
49 A. When libintl.a is linked into an executable, it works because
50 functions defined in the executable always override functions in
51 the shared libraries.
52 B. When libintl.so is used, it works because
53 1. those systems defining gettext/textdomain/... in the C library
54 (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer) are
55 ELF systems and define these symbols as weak, thus explicitly
56 letting other shared libraries override it.
57 2. those systems defining gettext/textdomain/... in a standalone
58 libintl.so library (namely, Solaris 2.3 and newer) have this
59 shared library in /usr/lib, and the linker will search /usr/lib
60 *after* the directory where the GNU gettext library is installed.
61
62 A third case, namely when libintl.a is linked into a shared library
63 whose name is not libintl.so, is not supported. In this case, on
64 Solaris, when -lintl precedes the linker option for the shared library
65 containing GNU gettext, the system's gettext would indeed override
66 the GNU gettext. Anyone doing this kind of stuff must be clever enough
67 to 1. compile libintl.a with -fPIC, 2. remove -lintl from his linker
68 command line. */
69
70
71 #undef gettext
72 #undef dgettext
73 #undef dcgettext
74 #undef ngettext
75 #undef dngettext
76 #undef dcngettext
77 #undef textdomain
78 #undef bindtextdomain
79 #undef bind_textdomain_codeset
80
81
82 char *
83 gettext (msgid)
84 const char *msgid;
85 {
86 return gettext__ (msgid);
87 }
88
89
90 char *
91 dgettext (domainname, msgid)
92 const char *domainname;
93 const char *msgid;
94 {
95 return dgettext__ (domainname, msgid);
96 }
97
98
99 char *
100 dcgettext (domainname, msgid, category)
101 const char *domainname;
102 const char *msgid;
103 int category;
104 {
105 return dcgettext__ (domainname, msgid, category);
106 }
107
108
109 char *
110 ngettext (msgid1, msgid2, n)
111 const char *msgid1;
112 const char *msgid2;
113 unsigned long int n;
114 {
115 return ngettext__ (msgid1, msgid2, n);
116 }
117
118
119 char *
120 dngettext (domainname, msgid1, msgid2, n)
121 const char *domainname;
122 const char *msgid1;
123 const char *msgid2;
124 unsigned long int n;
125 {
126 return dngettext__ (domainname, msgid1, msgid2, n);
127 }
128
129
130 char *
131 dcngettext (domainname, msgid1, msgid2, n, category)
132 const char *domainname;
133 const char *msgid1;
134 const char *msgid2;
135 unsigned long int n;
136 int category;
137 {
138 return dcngettext__ (domainname, msgid1, msgid2, n, category);
139 }
140
141
142 char *
143 textdomain (domainname)
144 const char *domainname;
145 {
146 return textdomain__ (domainname);
147 }
148
149
150 char *
151 bindtextdomain (domainname, dirname)
152 const char *domainname;
153 const char *dirname;
154 {
155 return bindtextdomain__ (domainname, dirname);
156 }
157
158
159 char *
160 bind_textdomain_codeset (domainname, codeset)
161 const char *domainname;
162 const char *codeset;
163 {
164 return bind_textdomain_codeset__ (domainname, codeset);
165 }
0 /* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
1 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 /* Tell glibc's <string.h> to provide a prototype for stpcpy().
19 This must come before <config.h> because <config.h> may include
20 <features.h>, and once <features.h> has been included, it's too late. */
21 #ifndef _GNU_SOURCE
22 # define _GNU_SOURCE 1
23 #endif
24
25 #ifdef HAVE_CONFIG_H
26 # include <config.h>
27 #endif
28
29 #include <string.h>
30 #if !HAVE_STRCHR && !defined _LIBC
31 # ifndef strchr
32 # define strchr index
33 # endif
34 #endif
35
36 #if defined _LIBC || defined HAVE_ARGZ_H
37 # include <argz.h>
38 #endif
39 #include <ctype.h>
40 #include <sys/types.h>
41 #include <stdlib.h>
42
43 #include "loadinfo.h"
44
45 /* On some strange systems still no definition of NULL is found. Sigh! */
46 #ifndef NULL
47 # if defined __STDC__ && __STDC__
48 # define NULL ((void *) 0)
49 # else
50 # define NULL 0
51 # endif
52 #endif
53
54 /* @@ end of prolog @@ */
55
56 #ifdef _LIBC
57 /* Rename the non ANSI C functions. This is required by the standard
58 because some ANSI C functions will require linking with this object
59 file and the name space must not be polluted. */
60 # ifndef stpcpy
61 # define stpcpy(dest, src) __stpcpy(dest, src)
62 # endif
63 #else
64 # ifndef HAVE_STPCPY
65 static char *stpcpy PARAMS ((char *dest, const char *src));
66 # endif
67 #endif
68
69 /* Define function which are usually not available. */
70
71 #if !defined _LIBC && !defined HAVE___ARGZ_COUNT
72 /* Returns the number of strings in ARGZ. */
73 static size_t argz_count__ PARAMS ((const char *argz, size_t len));
74
75 static size_t
76 argz_count__ (argz, len)
77 const char *argz;
78 size_t len;
79 {
80 size_t count = 0;
81 while (len > 0)
82 {
83 size_t part_len = strlen (argz);
84 argz += part_len + 1;
85 len -= part_len + 1;
86 count++;
87 }
88 return count;
89 }
90 # undef __argz_count
91 # define __argz_count(argz, len) argz_count__ (argz, len)
92 #endif /* !_LIBC && !HAVE___ARGZ_COUNT */
93
94 #if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
95 /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
96 except the last into the character SEP. */
97 static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
98
99 static void
100 argz_stringify__ (argz, len, sep)
101 char *argz;
102 size_t len;
103 int sep;
104 {
105 while (len > 0)
106 {
107 size_t part_len = strlen (argz);
108 argz += part_len;
109 len -= part_len + 1;
110 if (len > 0)
111 *argz++ = sep;
112 }
113 }
114 # undef __argz_stringify
115 # define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
116 #endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
117
118 #if !defined _LIBC && !defined HAVE___ARGZ_NEXT
119 static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
120 const char *entry));
121
122 static char *
123 argz_next__ (argz, argz_len, entry)
124 char *argz;
125 size_t argz_len;
126 const char *entry;
127 {
128 if (entry)
129 {
130 if (entry < argz + argz_len)
131 entry = strchr (entry, '\0') + 1;
132
133 return entry >= argz + argz_len ? NULL : (char *) entry;
134 }
135 else
136 if (argz_len > 0)
137 return argz;
138 else
139 return 0;
140 }
141 # undef __argz_next
142 # define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
143 #endif /* !_LIBC && !HAVE___ARGZ_NEXT */
144
145
146 /* Return number of bits set in X. */
147 static int pop PARAMS ((int x));
148
149 static inline int
150 pop (x)
151 int x;
152 {
153 /* We assume that no more than 16 bits are used. */
154 x = ((x & ~0x5555) >> 1) + (x & 0x5555);
155 x = ((x & ~0x3333) >> 2) + (x & 0x3333);
156 x = ((x >> 4) + x) & 0x0f0f;
157 x = ((x >> 8) + x) & 0xff;
158
159 return x;
160 }
161
162
163 struct loaded_l10nfile *
164 _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
165 territory, codeset, normalized_codeset, modifier, special,
166 sponsor, revision, filename, do_allocate)
167 struct loaded_l10nfile **l10nfile_list;
168 const char *dirlist;
169 size_t dirlist_len;
170 int mask;
171 const char *language;
172 const char *territory;
173 const char *codeset;
174 const char *normalized_codeset;
175 const char *modifier;
176 const char *special;
177 const char *sponsor;
178 const char *revision;
179 const char *filename;
180 int do_allocate;
181 {
182 char *abs_filename;
183 struct loaded_l10nfile *last = NULL;
184 struct loaded_l10nfile *retval;
185 char *cp;
186 size_t entries;
187 int cnt;
188
189 /* Allocate room for the full file name. */
190 abs_filename = (char *) malloc (dirlist_len
191 + strlen (language)
192 + ((mask & TERRITORY) != 0
193 ? strlen (territory) + 1 : 0)
194 + ((mask & XPG_CODESET) != 0
195 ? strlen (codeset) + 1 : 0)
196 + ((mask & XPG_NORM_CODESET) != 0
197 ? strlen (normalized_codeset) + 1 : 0)
198 + (((mask & XPG_MODIFIER) != 0
199 || (mask & CEN_AUDIENCE) != 0)
200 ? strlen (modifier) + 1 : 0)
201 + ((mask & CEN_SPECIAL) != 0
202 ? strlen (special) + 1 : 0)
203 + (((mask & CEN_SPONSOR) != 0
204 || (mask & CEN_REVISION) != 0)
205 ? (1 + ((mask & CEN_SPONSOR) != 0
206 ? strlen (sponsor) + 1 : 0)
207 + ((mask & CEN_REVISION) != 0
208 ? strlen (revision) + 1 : 0)) : 0)
209 + 1 + strlen (filename) + 1);
210
211 if (abs_filename == NULL)
212 return NULL;
213
214 retval = NULL;
215 last = NULL;
216
217 /* Construct file name. */
218 memcpy (abs_filename, dirlist, dirlist_len);
219 __argz_stringify (abs_filename, dirlist_len, PATH_SEPARATOR);
220 cp = abs_filename + (dirlist_len - 1);
221 *cp++ = '/';
222 cp = stpcpy (cp, language);
223
224 if ((mask & TERRITORY) != 0)
225 {
226 *cp++ = '_';
227 cp = stpcpy (cp, territory);
228 }
229 if ((mask & XPG_CODESET) != 0)
230 {
231 *cp++ = '.';
232 cp = stpcpy (cp, codeset);
233 }
234 if ((mask & XPG_NORM_CODESET) != 0)
235 {
236 *cp++ = '.';
237 cp = stpcpy (cp, normalized_codeset);
238 }
239 if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
240 {
241 /* This component can be part of both syntaces but has different
242 leading characters. For CEN we use `+', else `@'. */
243 *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
244 cp = stpcpy (cp, modifier);
245 }
246 if ((mask & CEN_SPECIAL) != 0)
247 {
248 *cp++ = '+';
249 cp = stpcpy (cp, special);
250 }
251 if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
252 {
253 *cp++ = ',';
254 if ((mask & CEN_SPONSOR) != 0)
255 cp = stpcpy (cp, sponsor);
256 if ((mask & CEN_REVISION) != 0)
257 {
258 *cp++ = '_';
259 cp = stpcpy (cp, revision);
260 }
261 }
262
263 *cp++ = '/';
264 stpcpy (cp, filename);
265
266 /* Look in list of already loaded domains whether it is already
267 available. */
268 last = NULL;
269 for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
270 if (retval->filename != NULL)
271 {
272 int compare = strcmp (retval->filename, abs_filename);
273 if (compare == 0)
274 /* We found it! */
275 break;
276 if (compare < 0)
277 {
278 /* It's not in the list. */
279 retval = NULL;
280 break;
281 }
282
283 last = retval;
284 }
285
286 if (retval != NULL || do_allocate == 0)
287 {
288 free (abs_filename);
289 return retval;
290 }
291
292 retval = (struct loaded_l10nfile *)
293 malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
294 * (1 << pop (mask))
295 * sizeof (struct loaded_l10nfile *)));
296 if (retval == NULL)
297 return NULL;
298
299 retval->filename = abs_filename;
300 retval->decided = (__argz_count (dirlist, dirlist_len) != 1
301 || ((mask & XPG_CODESET) != 0
302 && (mask & XPG_NORM_CODESET) != 0));
303 retval->data = NULL;
304
305 if (last == NULL)
306 {
307 retval->next = *l10nfile_list;
308 *l10nfile_list = retval;
309 }
310 else
311 {
312 retval->next = last->next;
313 last->next = retval;
314 }
315
316 entries = 0;
317 /* If the DIRLIST is a real list the RETVAL entry corresponds not to
318 a real file. So we have to use the DIRLIST separation mechanism
319 of the inner loop. */
320 cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
321 for (; cnt >= 0; --cnt)
322 if ((cnt & ~mask) == 0
323 && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
324 && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
325 {
326 /* Iterate over all elements of the DIRLIST. */
327 char *dir = NULL;
328
329 while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
330 != NULL)
331 retval->successor[entries++]
332 = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
333 language, territory, codeset,
334 normalized_codeset, modifier, special,
335 sponsor, revision, filename, 1);
336 }
337 retval->successor[entries] = NULL;
338
339 return retval;
340 }
341
342 /* Normalize codeset name. There is no standard for the codeset
343 names. Normalization allows the user to use any of the common
344 names. The return value is dynamically allocated and has to be
345 freed by the caller. */
346 const char *
347 _nl_normalize_codeset (codeset, name_len)
348 const char *codeset;
349 size_t name_len;
350 {
351 int len = 0;
352 int only_digit = 1;
353 char *retval;
354 char *wp;
355 size_t cnt;
356
357 for (cnt = 0; cnt < name_len; ++cnt)
358 if (isalnum (codeset[cnt]))
359 {
360 ++len;
361
362 if (isalpha (codeset[cnt]))
363 only_digit = 0;
364 }
365
366 retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
367
368 if (retval != NULL)
369 {
370 if (only_digit)
371 wp = stpcpy (retval, "iso");
372 else
373 wp = retval;
374
375 for (cnt = 0; cnt < name_len; ++cnt)
376 if (isalpha (codeset[cnt]))
377 *wp++ = tolower (codeset[cnt]);
378 else if (isdigit (codeset[cnt]))
379 *wp++ = codeset[cnt];
380
381 *wp = '\0';
382 }
383
384 return (const char *) retval;
385 }
386
387
388 /* @@ begin of epilog @@ */
389
390 /* We don't want libintl.a to depend on any other library. So we
391 avoid the non-standard function stpcpy. In GNU C Library this
392 function is available, though. Also allow the symbol HAVE_STPCPY
393 to be defined. */
394 #if !_LIBC && !HAVE_STPCPY
395 static char *
396 stpcpy (dest, src)
397 char *dest;
398 const char *src;
399 {
400 while ((*dest++ = *src++) != '\0')
401 /* Do nothing. */ ;
402 return dest - 1;
403 }
404 #endif
0 /* Convenience header for conditional use of GNU <libintl.h>.
1 Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 #ifndef _LIBGETTEXT_H
19 #define _LIBGETTEXT_H 1
20
21 /* NLS can be disabled through the configure --disable-nls option. */
22 #if ENABLE_NLS
23
24 /* Get declarations of GNU message catalog functions. */
25 # include <libintl.h>
26
27 #else
28
29 # define gettext(Msgid) (Msgid)
30 # define dgettext(Domainname, Msgid) (Msgid)
31 # define dcgettext(Domainname, Msgid, Category) (Msgid)
32 # define ngettext(Msgid1, Msgid2, N) \
33 ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
34 # define dngettext(Domainname, Msgid1, Msgid2, N) \
35 ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
36 # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
37 ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
38 # define textdomain(Domainname) ((char *) (Domainname))
39 # define bindtextdomain(Domainname, Dirname) ((char *) (Dirname))
40 # define bind_textdomain_codeset(Domainname, Codeset) ((char *) (Codeset))
41
42 #endif
43
44 /* For automatical extraction of messages sometimes no real
45 translation is needed. Instead the string itself is the result. */
46 #define gettext_noop(Str) (Str)
47
48 #endif /* _LIBGETTEXT_H */
0 /* Message catalogs for internationalization.
1 Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 #ifndef _LIBINTL_H
19 #define _LIBINTL_H 1
20
21 #include <locale.h>
22
23 /* The LC_MESSAGES locale category is the category used by the functions
24 gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
25 On systems that don't define it, use an arbitrary value instead.
26 On Solaris, <locale.h> defines __LOCALE_H then includes <libintl.h> (i.e.
27 this file!) and then only defines LC_MESSAGES. To avoid a redefinition
28 warning, don't define LC_MESSAGES in this case. */
29 #if !defined LC_MESSAGES && !defined __LOCALE_H
30 # define LC_MESSAGES 1729
31 #endif
32
33 /* We define an additional symbol to signal that we use the GNU
34 implementation of gettext. */
35 #define __USE_GNU_GETTEXT 1
36
37 /* Resolve a platform specific conflict on DJGPP. GNU gettext takes
38 precedence over _conio_gettext. */
39 #ifdef __DJGPP__
40 # undef gettext
41 # define gettext gettext
42 #endif
43
44 #ifndef PARAMS
45 # if __STDC__ || defined __cplusplus
46 # define PARAMS(args) args
47 # else
48 # define PARAMS(args) ()
49 # endif
50 #endif
51
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55
56 /* Look up MSGID in the current default message catalog for the current
57 LC_MESSAGES locale. If not found, returns MSGID itself (the default
58 text). */
59 extern char *gettext PARAMS ((const char *__msgid));
60
61 /* Look up MSGID in the DOMAINNAME message catalog for the current
62 LC_MESSAGES locale. */
63 extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
64
65 /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
66 locale. */
67 extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
68 int __category));
69
70
71 /* Similar to `gettext' but select the plural form corresponding to the
72 number N. */
73 extern char *ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
74 unsigned long int __n));
75
76 /* Similar to `dgettext' but select the plural form corresponding to the
77 number N. */
78 extern char *dngettext PARAMS ((const char *__domainname, const char *__msgid1,
79 const char *__msgid2, unsigned long int __n));
80
81 /* Similar to `dcgettext' but select the plural form corresponding to the
82 number N. */
83 extern char *dcngettext PARAMS ((const char *__domainname, const char *__msgid1,
84 const char *__msgid2, unsigned long int __n,
85 int __category));
86
87
88 /* Set the current default message catalog to DOMAINNAME.
89 If DOMAINNAME is null, return the current default.
90 If DOMAINNAME is "", reset to the default of "messages". */
91 extern char *textdomain PARAMS ((const char *__domainname));
92
93 /* Specify that the DOMAINNAME message catalog will be found
94 in DIRNAME rather than in the system locale data base. */
95 extern char *bindtextdomain PARAMS ((const char *__domainname,
96 const char *__dirname));
97
98 /* Specify the character encoding in which the messages from the
99 DOMAINNAME message catalog will be returned. */
100 extern char *bind_textdomain_codeset PARAMS ((const char *__domainname,
101 const char *__codeset));
102
103
104 /* Optimized version of the functions above. */
105 #if defined __OPTIMIZED
106 /* These are macros, but could also be inline functions. */
107
108 # define gettext(msgid) \
109 dgettext (NULL, msgid)
110
111 # define dgettext(domainname, msgid) \
112 dcgettext (domainname, msgid, LC_MESSAGES)
113
114 # define ngettext(msgid1, msgid2, n) \
115 dngettext (NULL, msgid1, msgid2, n)
116
117 # define dngettext(domainname, msgid1, msgid2, n) \
118 dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES)
119
120 #endif /* Optimizing. */
121
122
123 #ifdef __cplusplus
124 }
125 #endif
126
127 #endif /* libintl.h */
0 /* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
1 This file is part of the GNU C Library.
2 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published
6 by the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public
15 License along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17 USA. */
18
19 #ifndef _LOADINFO_H
20 #define _LOADINFO_H 1
21
22 #ifndef PARAMS
23 # if __STDC__
24 # define PARAMS(args) args
25 # else
26 # define PARAMS(args) ()
27 # endif
28 #endif
29
30 #ifndef internal_function
31 # define internal_function
32 #endif
33
34 /* Tell the compiler when a conditional or integer expression is
35 almost always true or almost always false. */
36 #ifndef HAVE_BUILTIN_EXPECT
37 # define __builtin_expect(expr, val) (expr)
38 #endif
39
40 /* Separator in PATH like lists of pathnames. */
41 #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
42 /* Win32, OS/2, DOS */
43 # define PATH_SEPARATOR ';'
44 #else
45 /* Unix */
46 # define PATH_SEPARATOR ':'
47 #endif
48
49 /* Encoding of locale name parts. */
50 #define CEN_REVISION 1
51 #define CEN_SPONSOR 2
52 #define CEN_SPECIAL 4
53 #define XPG_NORM_CODESET 8
54 #define XPG_CODESET 16
55 #define TERRITORY 32
56 #define CEN_AUDIENCE 64
57 #define XPG_MODIFIER 128
58
59 #define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
60 #define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
61
62
63 struct loaded_l10nfile
64 {
65 const char *filename;
66 int decided;
67
68 const void *data;
69
70 struct loaded_l10nfile *next;
71 struct loaded_l10nfile *successor[1];
72 };
73
74
75 /* Normalize codeset name. There is no standard for the codeset
76 names. Normalization allows the user to use any of the common
77 names. The return value is dynamically allocated and has to be
78 freed by the caller. */
79 extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
80 size_t name_len));
81
82 extern struct loaded_l10nfile *
83 _nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
84 const char *dirlist, size_t dirlist_len, int mask,
85 const char *language, const char *territory,
86 const char *codeset,
87 const char *normalized_codeset,
88 const char *modifier, const char *special,
89 const char *sponsor, const char *revision,
90 const char *filename, int do_allocate));
91
92
93 extern const char *_nl_expand_alias PARAMS ((const char *name));
94
95 /* normalized_codeset is dynamically allocated and has to be freed by
96 the caller. */
97 extern int _nl_explode_name PARAMS ((char *name, const char **language,
98 const char **modifier,
99 const char **territory,
100 const char **codeset,
101 const char **normalized_codeset,
102 const char **special,
103 const char **sponsor,
104 const char **revision));
105
106 extern char *_nl_find_language PARAMS ((const char *name));
107
108 #endif /* loadinfo.h */
0 /* Load needed message catalogs.
1 Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 /* Tell glibc's <string.h> to provide a prototype for mempcpy().
19 This must come before <config.h> because <config.h> may include
20 <features.h>, and once <features.h> has been included, it's too late. */
21 #ifndef _GNU_SOURCE
22 # define _GNU_SOURCE 1
23 #endif
24
25 #ifdef HAVE_CONFIG_H
26 # include <config.h>
27 #endif
28
29 #include <ctype.h>
30 #include <errno.h>
31 #include <fcntl.h>
32 #include <sys/types.h>
33 #include <sys/stat.h>
34
35 #ifdef __GNUC__
36 # define alloca __builtin_alloca
37 # define HAVE_ALLOCA 1
38 #else
39 # if defined HAVE_ALLOCA_H || defined _LIBC
40 # include <alloca.h>
41 # else
42 # ifdef _AIX
43 #pragma alloca
44 # else
45 # ifndef alloca
46 char *alloca ();
47 # endif
48 # endif
49 # endif
50 #endif
51
52 #include <stdlib.h>
53 #include <string.h>
54
55 #if defined HAVE_UNISTD_H || defined _LIBC
56 # include <unistd.h>
57 #endif
58
59 #ifdef _LIBC
60 # include <langinfo.h>
61 # include <locale.h>
62 #endif
63
64 #if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
65 || (defined _LIBC && defined _POSIX_MAPPED_FILES)
66 # include <sys/mman.h>
67 # undef HAVE_MMAP
68 # define HAVE_MMAP 1
69 #else
70 # undef HAVE_MMAP
71 #endif
72
73 #include "gettext.h"
74 #include "gettextP.h"
75
76 #ifdef _LIBC
77 # include "../locale/localeinfo.h"
78 #endif
79
80 /* @@ end of prolog @@ */
81
82 #ifdef _LIBC
83 /* Rename the non ISO C functions. This is required by the standard
84 because some ISO C functions will require linking with this object
85 file and the name space must not be polluted. */
86 # define open __open
87 # define close __close
88 # define read __read
89 # define mmap __mmap
90 # define munmap __munmap
91 #endif
92
93 /* Names for the libintl functions are a problem. They must not clash
94 with existing names and they should follow ANSI C. But this source
95 code is also used in GNU C Library where the names have a __
96 prefix. So we have to make a difference here. */
97 #ifdef _LIBC
98 # define PLURAL_PARSE __gettextparse
99 #else
100 # define PLURAL_PARSE gettextparse__
101 #endif
102
103 /* For those losing systems which don't have `alloca' we have to add
104 some additional code emulating it. */
105 #ifdef HAVE_ALLOCA
106 # define freea(p) /* nothing */
107 #else
108 # define alloca(n) malloc (n)
109 # define freea(p) free (p)
110 #endif
111
112 /* For systems that distinguish between text and binary I/O.
113 O_BINARY is usually declared in <fcntl.h>. */
114 #if !defined O_BINARY && defined _O_BINARY
115 /* For MSC-compatible compilers. */
116 # define O_BINARY _O_BINARY
117 # define O_TEXT _O_TEXT
118 #endif
119 #ifdef __BEOS__
120 /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
121 # undef O_BINARY
122 # undef O_TEXT
123 #endif
124 /* On reasonable systems, binary I/O is the default. */
125 #ifndef O_BINARY
126 # define O_BINARY 0
127 #endif
128
129 /* We need a sign, whether a new catalog was loaded, which can be associated
130 with all translations. This is important if the translations are
131 cached by one of GCC's features. */
132 int _nl_msg_cat_cntr;
133
134 #if (defined __GNUC__ && !defined __APPLE_CC__) \
135 || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
136
137 /* These structs are the constant expression for the germanic plural
138 form determination. It represents the expression "n != 1". */
139 static const struct expression plvar =
140 {
141 .nargs = 0,
142 .operation = var,
143 };
144 static const struct expression plone =
145 {
146 .nargs = 0,
147 .operation = num,
148 .val =
149 {
150 .num = 1
151 }
152 };
153 static struct expression germanic_plural =
154 {
155 .nargs = 2,
156 .operation = not_equal,
157 .val =
158 {
159 .args =
160 {
161 [0] = (struct expression *) &plvar,
162 [1] = (struct expression *) &plone
163 }
164 }
165 };
166
167 # define INIT_GERMANIC_PLURAL()
168
169 #else
170
171 /* For compilers without support for ISO C 99 struct/union initializers:
172 Initialization at run-time. */
173
174 static struct expression plvar;
175 static struct expression plone;
176 static struct expression germanic_plural;
177
178 static void
179 init_germanic_plural ()
180 {
181 if (plone.val.num == 0)
182 {
183 plvar.nargs = 0;
184 plvar.operation = var;
185
186 plone.nargs = 0;
187 plone.operation = num;
188 plone.val.num = 1;
189
190 germanic_plural.nargs = 2;
191 germanic_plural.operation = not_equal;
192 germanic_plural.val.args[0] = &plvar;
193 germanic_plural.val.args[1] = &plone;
194 }
195 }
196
197 # define INIT_GERMANIC_PLURAL() init_germanic_plural ()
198
199 #endif
200
201
202 /* Initialize the codeset dependent parts of an opened message catalog.
203 Return the header entry. */
204 const char *
205 internal_function
206 _nl_init_domain_conv (domain_file, domain, domainbinding)
207 struct loaded_l10nfile *domain_file;
208 struct loaded_domain *domain;
209 struct binding *domainbinding;
210 {
211 /* Find out about the character set the file is encoded with.
212 This can be found (in textual form) in the entry "". If this
213 entry does not exist or if this does not contain the `charset='
214 information, we will assume the charset matches the one the
215 current locale and we don't have to perform any conversion. */
216 char *nullentry;
217 size_t nullentrylen;
218
219 /* Preinitialize fields, to avoid recursion during _nl_find_msg. */
220 domain->codeset_cntr =
221 (domainbinding != NULL ? domainbinding->codeset_cntr : 0);
222 #ifdef _LIBC
223 domain->conv = (__gconv_t) -1;
224 #else
225 # if HAVE_ICONV
226 domain->conv = (iconv_t) -1;
227 # endif
228 #endif
229 domain->conv_tab = NULL;
230
231 /* Get the header entry. */
232 nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
233
234 if (nullentry != NULL)
235 {
236 #if defined _LIBC || HAVE_ICONV
237 const char *charsetstr;
238
239 charsetstr = strstr (nullentry, "charset=");
240 if (charsetstr != NULL)
241 {
242 size_t len;
243 char *charset;
244 const char *outcharset;
245
246 charsetstr += strlen ("charset=");
247 len = strcspn (charsetstr, " \t\n");
248
249 charset = (char *) alloca (len + 1);
250 # if defined _LIBC || HAVE_MEMPCPY
251 *((char *) mempcpy (charset, charsetstr, len)) = '\0';
252 # else
253 memcpy (charset, charsetstr, len);
254 charset[len] = '\0';
255 # endif
256
257 /* The output charset should normally be determined by the
258 locale. But sometimes the locale is not used or not correctly
259 set up, so we provide a possibility for the user to override
260 this. Moreover, the value specified through
261 bind_textdomain_codeset overrides both. */
262 if (domainbinding != NULL && domainbinding->codeset != NULL)
263 outcharset = domainbinding->codeset;
264 else
265 {
266 outcharset = getenv ("OUTPUT_CHARSET");
267 if (outcharset == NULL || outcharset[0] == '\0')
268 {
269 # ifdef _LIBC
270 outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;
271 # else
272 # if HAVE_ICONV
273 extern const char *locale_charset (void);
274 outcharset = locale_charset ();
275 # endif
276 # endif
277 }
278 }
279
280 # ifdef _LIBC
281 /* We always want to use transliteration. */
282 outcharset = norm_add_slashes (outcharset, "TRANSLIT");
283 charset = norm_add_slashes (charset, NULL);
284 if (__gconv_open (outcharset, charset, &domain->conv,
285 GCONV_AVOID_NOCONV)
286 != __GCONV_OK)
287 domain->conv = (__gconv_t) -1;
288 # else
289 # if HAVE_ICONV
290 /* When using GNU libiconv, we want to use transliteration. */
291 # if _LIBICONV_VERSION >= 0x0105
292 len = strlen (outcharset);
293 {
294 char *tmp = (char *) alloca (len + 10 + 1);
295 memcpy (tmp, outcharset, len);
296 memcpy (tmp + len, "//TRANSLIT", 10 + 1);
297 outcharset = tmp;
298 }
299 # endif
300 domain->conv = iconv_open (outcharset, charset);
301 # if _LIBICONV_VERSION >= 0x0105
302 freea (outcharset);
303 # endif
304 # endif
305 # endif
306
307 freea (charset);
308 }
309 #endif /* _LIBC || HAVE_ICONV */
310 }
311
312 return nullentry;
313 }
314
315 /* Frees the codeset dependent parts of an opened message catalog. */
316 void
317 internal_function
318 _nl_free_domain_conv (domain)
319 struct loaded_domain *domain;
320 {
321 if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
322 free (domain->conv_tab);
323
324 #ifdef _LIBC
325 if (domain->conv != (__gconv_t) -1)
326 __gconv_close (domain->conv);
327 #else
328 # if HAVE_ICONV
329 if (domain->conv != (iconv_t) -1)
330 iconv_close (domain->conv);
331 # endif
332 #endif
333 }
334
335 /* Load the message catalogs specified by FILENAME. If it is no valid
336 message catalog do nothing. */
337 void
338 internal_function
339 _nl_load_domain (domain_file, domainbinding)
340 struct loaded_l10nfile *domain_file;
341 struct binding *domainbinding;
342 {
343 int fd;
344 size_t size;
345 #ifdef _LIBC
346 struct stat64 st;
347 #else
348 struct stat st;
349 #endif
350 struct mo_file_header *data = (struct mo_file_header *) -1;
351 int use_mmap = 0;
352 struct loaded_domain *domain;
353 const char *nullentry;
354
355 domain_file->decided = 1;
356 domain_file->data = NULL;
357
358 /* Note that it would be useless to store domainbinding in domain_file
359 because domainbinding might be == NULL now but != NULL later (after
360 a call to bind_textdomain_codeset). */
361
362 /* If the record does not represent a valid locale the FILENAME
363 might be NULL. This can happen when according to the given
364 specification the locale file name is different for XPG and CEN
365 syntax. */
366 if (domain_file->filename == NULL)
367 return;
368
369 /* Try to open the addressed file. */
370 fd = open (domain_file->filename, O_RDONLY | O_BINARY);
371 if (fd == -1)
372 return;
373
374 /* We must know about the size of the file. */
375 if (
376 #ifdef _LIBC
377 __builtin_expect (fstat64 (fd, &st) != 0, 0)
378 #else
379 __builtin_expect (fstat (fd, &st) != 0, 0)
380 #endif
381 || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
382 || __builtin_expect (size < sizeof (struct mo_file_header), 0))
383 {
384 /* Something went wrong. */
385 close (fd);
386 return;
387 }
388
389 #ifdef HAVE_MMAP
390 /* Now we are ready to load the file. If mmap() is available we try
391 this first. If not available or it failed we try to load it. */
392 data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
393 MAP_PRIVATE, fd, 0);
394
395 if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
396 {
397 /* mmap() call was successful. */
398 close (fd);
399 use_mmap = 1;
400 }
401 #endif
402
403 /* If the data is not yet available (i.e. mmap'ed) we try to load
404 it manually. */
405 if (data == (struct mo_file_header *) -1)
406 {
407 size_t to_read;
408 char *read_ptr;
409
410 data = (struct mo_file_header *) malloc (size);
411 if (data == NULL)
412 return;
413
414 to_read = size;
415 read_ptr = (char *) data;
416 do
417 {
418 long int nb = (long int) read (fd, read_ptr, to_read);
419 if (nb <= 0)
420 {
421 #ifdef EINTR
422 if (nb == -1 && errno == EINTR)
423 continue;
424 #endif
425 close (fd);
426 return;
427 }
428 read_ptr += nb;
429 to_read -= nb;
430 }
431 while (to_read > 0);
432
433 close (fd);
434 }
435
436 /* Using the magic number we can test whether it really is a message
437 catalog file. */
438 if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
439 0))
440 {
441 /* The magic number is wrong: not a message catalog file. */
442 #ifdef HAVE_MMAP
443 if (use_mmap)
444 munmap ((caddr_t) data, size);
445 else
446 #endif
447 free (data);
448 return;
449 }
450
451 domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
452 if (domain == NULL)
453 return;
454 domain_file->data = domain;
455
456 domain->data = (char *) data;
457 domain->use_mmap = use_mmap;
458 domain->mmap_size = size;
459 domain->must_swap = data->magic != _MAGIC;
460
461 /* Fill in the information about the available tables. */
462 switch (W (domain->must_swap, data->revision))
463 {
464 case 0:
465 domain->nstrings = W (domain->must_swap, data->nstrings);
466 domain->orig_tab = (struct string_desc *)
467 ((char *) data + W (domain->must_swap, data->orig_tab_offset));
468 domain->trans_tab = (struct string_desc *)
469 ((char *) data + W (domain->must_swap, data->trans_tab_offset));
470 domain->hash_size = W (domain->must_swap, data->hash_tab_size);
471 domain->hash_tab = (nls_uint32 *)
472 ((char *) data + W (domain->must_swap, data->hash_tab_offset));
473 break;
474 default:
475 /* This is an invalid revision. */
476 #ifdef HAVE_MMAP
477 if (use_mmap)
478 munmap ((caddr_t) data, size);
479 else
480 #endif
481 free (data);
482 free (domain);
483 domain_file->data = NULL;
484 return;
485 }
486
487 /* Now initialize the character set converter from the character set
488 the file is encoded with (found in the header entry) to the domain's
489 specified character set or the locale's character set. */
490 nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
491
492 /* Also look for a plural specification. */
493 if (nullentry != NULL)
494 {
495 const char *plural;
496 const char *nplurals;
497
498 plural = strstr (nullentry, "plural=");
499 nplurals = strstr (nullentry, "nplurals=");
500 if (plural == NULL || nplurals == NULL)
501 goto no_plural;
502 else
503 {
504 /* First get the number. */
505 char *endp;
506 unsigned long int n;
507 struct parse_args args;
508
509 nplurals += 9;
510 while (*nplurals != '\0' && isspace (*nplurals))
511 ++nplurals;
512 #if defined HAVE_STRTOUL || defined _LIBC
513 n = strtoul (nplurals, &endp, 10);
514 #else
515 for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
516 n = n * 10 + (*endp - '0');
517 #endif
518 domain->nplurals = n;
519 if (nplurals == endp)
520 goto no_plural;
521
522 /* Due to the restrictions bison imposes onto the interface of the
523 scanner function we have to put the input string and the result
524 passed up from the parser into the same structure which address
525 is passed down to the parser. */
526 plural += 7;
527 args.cp = plural;
528 if (PLURAL_PARSE (&args) != 0)
529 goto no_plural;
530 domain->plural = args.res;
531 }
532 }
533 else
534 {
535 /* By default we are using the Germanic form: singular form only
536 for `one', the plural form otherwise. Yes, this is also what
537 English is using since English is a Germanic language. */
538 no_plural:
539 INIT_GERMANIC_PLURAL ();
540 domain->plural = &germanic_plural;
541 domain->nplurals = 2;
542 }
543 }
544
545
546 #ifdef _LIBC
547 void
548 internal_function
549 _nl_unload_domain (domain)
550 struct loaded_domain *domain;
551 {
552 if (domain->plural != &germanic_plural)
553 __gettext_free_exp (domain->plural);
554
555 _nl_free_domain_conv (domain);
556
557 # ifdef _POSIX_MAPPED_FILES
558 if (domain->use_mmap)
559 munmap ((caddr_t) domain->data, domain->mmap_size);
560 else
561 # endif /* _POSIX_MAPPED_FILES */
562 free ((void *) domain->data);
563
564 free (domain);
565 }
566 #endif
0 /* Determine a canonical name for the current locale's character encoding.
1
2 Copyright (C) 2000-2001 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published
6 by the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public
15 License along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17 USA. */
18
19 /* Written by Bruno Haible <haible@clisp.cons.org>. */
20
21 #ifdef HAVE_CONFIG_H
22 # include <config.h>
23 #endif
24
25 #if HAVE_STDDEF_H
26 # include <stddef.h>
27 #endif
28
29 #include <stdio.h>
30 #if HAVE_STRING_H
31 # include <string.h>
32 #else
33 # include <strings.h>
34 #endif
35 #if HAVE_STDLIB_H
36 # include <stdlib.h>
37 #endif
38
39 #if defined _WIN32 || defined __WIN32__
40 # undef WIN32 /* avoid warning on mingw32 */
41 # define WIN32
42 #endif
43
44 #ifndef WIN32
45 # if HAVE_LANGINFO_CODESET
46 # include <langinfo.h>
47 # else
48 # if HAVE_SETLOCALE
49 # include <locale.h>
50 # endif
51 # endif
52 #else /* WIN32 */
53 # define WIN32_LEAN_AND_MEAN
54 # include <windows.h>
55 #endif
56
57 #ifndef DIRECTORY_SEPARATOR
58 # define DIRECTORY_SEPARATOR '/'
59 #endif
60
61 #ifndef ISSLASH
62 # define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
63 #endif
64
65 /* The following static variable is declared 'volatile' to avoid a
66 possible multithread problem in the function get_charset_aliases. If we
67 are running in a threaded environment, and if two threads initialize
68 'charset_aliases' simultaneously, both will produce the same value,
69 and everything will be ok if the two assignments to 'charset_aliases'
70 are atomic. But I don't know what will happen if the two assignments mix. */
71 #if __STDC__ != 1
72 # define volatile /* empty */
73 #endif
74 /* Pointer to the contents of the charset.alias file, if it has already been
75 read, else NULL. Its format is:
76 ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
77 static const char * volatile charset_aliases;
78
79 /* Return a pointer to the contents of the charset.alias file. */
80 static const char *
81 get_charset_aliases ()
82 {
83 const char *cp;
84
85 cp = charset_aliases;
86 if (cp == NULL)
87 {
88 #ifndef WIN32
89 FILE *fp;
90 const char *dir = LIBDIR;
91 const char *base = "charset.alias";
92 char *file_name;
93
94 /* Concatenate dir and base into freshly allocated file_name. */
95 {
96 size_t dir_len = strlen (dir);
97 size_t base_len = strlen (base);
98 int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
99 file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
100 if (file_name != NULL)
101 {
102 memcpy (file_name, dir, dir_len);
103 if (add_slash)
104 file_name[dir_len] = DIRECTORY_SEPARATOR;
105 memcpy (file_name + dir_len + add_slash, base, base_len + 1);
106 }
107 }
108
109 if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
110 /* Out of memory or file not found, treat it as empty. */
111 cp = "";
112 else
113 {
114 /* Parse the file's contents. */
115 int c;
116 char buf1[50+1];
117 char buf2[50+1];
118 char *res_ptr = NULL;
119 size_t res_size = 0;
120 size_t l1, l2;
121
122 for (;;)
123 {
124 c = getc (fp);
125 if (c == EOF)
126 break;
127 if (c == '\n' || c == ' ' || c == '\t')
128 continue;
129 if (c == '#')
130 {
131 /* Skip comment, to end of line. */
132 do
133 c = getc (fp);
134 while (!(c == EOF || c == '\n'));
135 if (c == EOF)
136 break;
137 continue;
138 }
139 ungetc (c, fp);
140 if (fscanf(fp, "%50s %50s", buf1, buf2) < 2)
141 break;
142 l1 = strlen (buf1);
143 l2 = strlen (buf2);
144 if (res_size == 0)
145 {
146 res_size = l1 + 1 + l2 + 1;
147 res_ptr = malloc (res_size + 1);
148 }
149 else
150 {
151 res_size += l1 + 1 + l2 + 1;
152 res_ptr = realloc (res_ptr, res_size + 1);
153 }
154 if (res_ptr == NULL)
155 {
156 /* Out of memory. */
157 res_size = 0;
158 break;
159 }
160 strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
161 strcpy (res_ptr + res_size - (l2 + 1), buf2);
162 }
163 fclose (fp);
164 if (res_size == 0)
165 cp = "";
166 else
167 {
168 *(res_ptr + res_size) = '\0';
169 cp = res_ptr;
170 }
171 }
172
173 if (file_name != NULL)
174 free (file_name);
175
176 #else /* WIN32 */
177
178 /* To avoid the troubles of installing a separate file in the same
179 directory as the DLL and of retrieving the DLL's directory at
180 runtime, simply inline the aliases here. */
181
182 cp = "CP936" "\0" "GBK" "\0"
183 "CP1361" "\0" "JOHAB" "\0";
184 #endif
185
186 charset_aliases = cp;
187 }
188
189 return cp;
190 }
191
192 /* Determine the current locale's character encoding, and canonicalize it
193 into one of the canonical names listed in config.charset.
194 The result must not be freed; it is statically allocated.
195 If the canonical name cannot be determined, the result is a non-canonical
196 name. */
197
198 #ifdef STATIC
199 STATIC
200 #endif
201 const char *
202 locale_charset ()
203 {
204 const char *codeset;
205 const char *aliases;
206
207 #ifndef WIN32
208
209 # if HAVE_LANGINFO_CODESET
210
211 /* Most systems support nl_langinfo (CODESET) nowadays. */
212 codeset = nl_langinfo (CODESET);
213
214 # else
215
216 /* On old systems which lack it, use setlocale or getenv. */
217 const char *locale = NULL;
218
219 /* But most old systems don't have a complete set of locales. Some
220 (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
221 use setlocale here; it would return "C" when it doesn't support the
222 locale name the user has set. */
223 # if HAVE_SETLOCALE && 0
224 locale = setlocale (LC_CTYPE, NULL);
225 # endif
226 if (locale == NULL || locale[0] == '\0')
227 {
228 locale = getenv ("LC_ALL");
229 if (locale == NULL || locale[0] == '\0')
230 {
231 locale = getenv ("LC_CTYPE");
232 if (locale == NULL || locale[0] == '\0')
233 locale = getenv ("LANG");
234 }
235 }
236
237 /* On some old systems, one used to set locale = "iso8859_1". On others,
238 you set it to "language_COUNTRY.charset". In any case, we resolve it
239 through the charset.alias file. */
240 codeset = locale;
241
242 # endif
243
244 #else /* WIN32 */
245
246 static char buf[2 + 10 + 1];
247
248 /* Win32 has a function returning the locale's codepage as a number. */
249 sprintf (buf, "CP%u", GetACP ());
250 codeset = buf;
251
252 #endif
253
254 if (codeset == NULL)
255 /* The canonical name cannot be determined. */
256 codeset = "";
257
258 /* Resolve alias. */
259 for (aliases = get_charset_aliases ();
260 *aliases != '\0';
261 aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
262 if (strcmp (codeset, aliases) == 0
263 || (aliases[0] == '*' && aliases[1] == '\0'))
264 {
265 codeset = aliases + strlen (aliases) + 1;
266 break;
267 }
268
269 return codeset;
270 }
0 # Locale name alias data base.
1 # Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
2 #
3 # This program is free software; you can redistribute it and/or modify it
4 # under the terms of the GNU Library General Public License as published
5 # by the Free Software Foundation; either version 2, or (at your option)
6 # any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Library General Public License for more details.
12 #
13 # You should have received a copy of the GNU Library General Public
14 # License along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 # USA.
17
18 # The format of this file is the same as for the corresponding file of
19 # the X Window System, which normally can be found in
20 # /usr/lib/X11/locale/locale.alias
21 # A single line contains two fields: an alias and a substitution value.
22 # All entries are case independent.
23
24 # Note: This file is far from being complete. If you have a value for
25 # your own site which you think might be useful for others too, share
26 # it with the rest of us. Send it using the `glibcbug' script to
27 # bugs@gnu.org.
28
29 # Packages using this file:
30
31 bokmal no_NO.ISO-8859-1
32 bokmål no_NO.ISO-8859-1
33 catalan ca_ES.ISO-8859-1
34 croatian hr_HR.ISO-8859-2
35 czech cs_CZ.ISO-8859-2
36 danish da_DK.ISO-8859-1
37 dansk da_DK.ISO-8859-1
38 deutsch de_DE.ISO-8859-1
39 dutch nl_NL.ISO-8859-1
40 eesti et_EE.ISO-8859-1
41 estonian et_EE.ISO-8859-1
42 finnish fi_FI.ISO-8859-1
43 français fr_FR.ISO-8859-1
44 french fr_FR.ISO-8859-1
45 galego gl_ES.ISO-8859-1
46 galician gl_ES.ISO-8859-1
47 german de_DE.ISO-8859-1
48 greek el_GR.ISO-8859-7
49 hebrew he_IL.ISO-8859-8
50 hrvatski hr_HR.ISO-8859-2
51 hungarian hu_HU.ISO-8859-2
52 icelandic is_IS.ISO-8859-1
53 italian it_IT.ISO-8859-1
54 japanese ja_JP.eucJP
55 japanese.euc ja_JP.eucJP
56 ja_JP ja_JP.eucJP
57 ja_JP.ujis ja_JP.eucJP
58 japanese.sjis ja_JP.SJIS
59 korean ko_KR.eucKR
60 korean.euc ko_KR.eucKR
61 ko_KR ko_KR.eucKR
62 lithuanian lt_LT.ISO-8859-13
63 nb_NO no_NO.ISO-8859-1
64 nb_NO.ISO-8859-1 no_NO.ISO-8859-1
65 norwegian no_NO.ISO-8859-1
66 nynorsk nn_NO.ISO-8859-1
67 polish pl_PL.ISO-8859-2
68 portuguese pt_PT.ISO-8859-1
69 romanian ro_RO.ISO-8859-2
70 russian ru_RU.ISO-8859-5
71 slovak sk_SK.ISO-8859-2
72 slovene sl_SI.ISO-8859-2
73 slovenian sl_SI.ISO-8859-2
74 spanish es_ES.ISO-8859-1
75 swedish sv_SE.ISO-8859-1
76 thai th_TH.TIS-620
77 turkish tr_TR.ISO-8859-9
0 /* Handle aliases for locale names.
1 Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 /* Tell glibc's <string.h> to provide a prototype for mempcpy().
19 This must come before <config.h> because <config.h> may include
20 <features.h>, and once <features.h> has been included, it's too late. */
21 #ifndef _GNU_SOURCE
22 # define _GNU_SOURCE 1
23 #endif
24
25 #ifdef HAVE_CONFIG_H
26 # include <config.h>
27 #endif
28
29 #include <ctype.h>
30 #include <stdio.h>
31 #include <sys/types.h>
32
33 #ifdef __GNUC__
34 # define alloca __builtin_alloca
35 # define HAVE_ALLOCA 1
36 #else
37 # if defined HAVE_ALLOCA_H || defined _LIBC
38 # include <alloca.h>
39 # else
40 # ifdef _AIX
41 #pragma alloca
42 # else
43 # ifndef alloca
44 char *alloca ();
45 # endif
46 # endif
47 # endif
48 #endif
49
50 #include <stdlib.h>
51
52 #include <string.h>
53 #if !HAVE_STRCHR && !defined _LIBC
54 # ifndef strchr
55 # define strchr index
56 # endif
57 #endif
58
59 #include "gettextP.h"
60
61 /* @@ end of prolog @@ */
62
63 #ifdef _LIBC
64 /* Rename the non ANSI C functions. This is required by the standard
65 because some ANSI C functions will require linking with this object
66 file and the name space must not be polluted. */
67 # define strcasecmp __strcasecmp
68
69 # ifndef mempcpy
70 # define mempcpy __mempcpy
71 # endif
72 # define HAVE_MEMPCPY 1
73
74 /* We need locking here since we can be called from different places. */
75 # include <bits/libc-lock.h>
76
77 __libc_lock_define_initialized (static, lock);
78 #endif
79
80 #ifndef internal_function
81 # define internal_function
82 #endif
83
84 /* For those losing systems which don't have `alloca' we have to add
85 some additional code emulating it. */
86 #ifdef HAVE_ALLOCA
87 # define freea(p) /* nothing */
88 #else
89 # define alloca(n) malloc (n)
90 # define freea(p) free (p)
91 #endif
92
93 #if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED
94 # undef fgets
95 # define fgets(buf, len, s) fgets_unlocked (buf, len, s)
96 #endif
97 #if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED
98 # undef feof
99 # define feof(s) feof_unlocked (s)
100 #endif
101
102
103 struct alias_map
104 {
105 const char *alias;
106 const char *value;
107 };
108
109
110 static char *string_space;
111 static size_t string_space_act;
112 static size_t string_space_max;
113 static struct alias_map *map;
114 static size_t nmap;
115 static size_t maxmap;
116
117
118 /* Prototypes for local functions. */
119 static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
120 internal_function;
121 static int extend_alias_table PARAMS ((void));
122 static int alias_compare PARAMS ((const struct alias_map *map1,
123 const struct alias_map *map2));
124
125
126 const char *
127 _nl_expand_alias (name)
128 const char *name;
129 {
130 static const char *locale_alias_path = LOCALE_ALIAS_PATH;
131 struct alias_map *retval;
132 const char *result = NULL;
133 size_t added;
134
135 #ifdef _LIBC
136 __libc_lock_lock (lock);
137 #endif
138
139 do
140 {
141 struct alias_map item;
142
143 item.alias = name;
144
145 if (nmap > 0)
146 retval = (struct alias_map *) bsearch (&item, map, nmap,
147 sizeof (struct alias_map),
148 (int (*) PARAMS ((const void *,
149 const void *))
150 ) alias_compare);
151 else
152 retval = NULL;
153
154 /* We really found an alias. Return the value. */
155 if (retval != NULL)
156 {
157 result = retval->value;
158 break;
159 }
160
161 /* Perhaps we can find another alias file. */
162 added = 0;
163 while (added == 0 && locale_alias_path[0] != '\0')
164 {
165 const char *start;
166
167 while (locale_alias_path[0] == PATH_SEPARATOR)
168 ++locale_alias_path;
169 start = locale_alias_path;
170
171 while (locale_alias_path[0] != '\0'
172 && locale_alias_path[0] != PATH_SEPARATOR)
173 ++locale_alias_path;
174
175 if (start < locale_alias_path)
176 added = read_alias_file (start, locale_alias_path - start);
177 }
178 }
179 while (added != 0);
180
181 #ifdef _LIBC
182 __libc_lock_unlock (lock);
183 #endif
184
185 return result;
186 }
187
188
189 static size_t
190 internal_function
191 read_alias_file (fname, fname_len)
192 const char *fname;
193 int fname_len;
194 {
195 FILE *fp;
196 char *full_fname;
197 size_t added;
198 static const char aliasfile[] = "/locale.alias";
199
200 full_fname = (char *) alloca (fname_len + sizeof aliasfile);
201 #ifdef HAVE_MEMPCPY
202 mempcpy (mempcpy (full_fname, fname, fname_len),
203 aliasfile, sizeof aliasfile);
204 #else
205 memcpy (full_fname, fname, fname_len);
206 memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
207 #endif
208
209 fp = fopen (full_fname, "r");
210 freea (full_fname);
211 if (fp == NULL)
212 return 0;
213
214 added = 0;
215 while (!feof (fp))
216 {
217 /* It is a reasonable approach to use a fix buffer here because
218 a) we are only interested in the first two fields
219 b) these fields must be usable as file names and so must not
220 be that long
221 */
222 char buf[BUFSIZ];
223 char *alias;
224 char *value;
225 char *cp;
226
227 if (fgets (buf, sizeof buf, fp) == NULL)
228 /* EOF reached. */
229 break;
230
231 /* Possibly not the whole line fits into the buffer. Ignore
232 the rest of the line. */
233 if (strchr (buf, '\n') == NULL)
234 {
235 char altbuf[BUFSIZ];
236 do
237 if (fgets (altbuf, sizeof altbuf, fp) == NULL)
238 /* Make sure the inner loop will be left. The outer loop
239 will exit at the `feof' test. */
240 break;
241 while (strchr (altbuf, '\n') == NULL);
242 }
243
244 cp = buf;
245 /* Ignore leading white space. */
246 while (isspace (cp[0]))
247 ++cp;
248
249 /* A leading '#' signals a comment line. */
250 if (cp[0] != '\0' && cp[0] != '#')
251 {
252 alias = cp++;
253 while (cp[0] != '\0' && !isspace (cp[0]))
254 ++cp;
255 /* Terminate alias name. */
256 if (cp[0] != '\0')
257 *cp++ = '\0';
258
259 /* Now look for the beginning of the value. */
260 while (isspace (cp[0]))
261 ++cp;
262
263 if (cp[0] != '\0')
264 {
265 size_t alias_len;
266 size_t value_len;
267
268 value = cp++;
269 while (cp[0] != '\0' && !isspace (cp[0]))
270 ++cp;
271 /* Terminate value. */
272 if (cp[0] == '\n')
273 {
274 /* This has to be done to make the following test
275 for the end of line possible. We are looking for
276 the terminating '\n' which do not overwrite here. */
277 *cp++ = '\0';
278 *cp = '\n';
279 }
280 else if (cp[0] != '\0')
281 *cp++ = '\0';
282
283 if (nmap >= maxmap)
284 if (__builtin_expect (extend_alias_table (), 0))
285 return added;
286
287 alias_len = strlen (alias) + 1;
288 value_len = strlen (value) + 1;
289
290 if (string_space_act + alias_len + value_len > string_space_max)
291 {
292 /* Increase size of memory pool. */
293 size_t new_size = (string_space_max
294 + (alias_len + value_len > 1024
295 ? alias_len + value_len : 1024));
296 char *new_pool = (char *) realloc (string_space, new_size);
297 if (new_pool == NULL)
298 return added;
299
300 if (__builtin_expect (string_space != new_pool, 0))
301 {
302 size_t i;
303
304 for (i = 0; i < nmap; i++)
305 {
306 map[i].alias += new_pool - string_space;
307 map[i].value += new_pool - string_space;
308 }
309 }
310
311 string_space = new_pool;
312 string_space_max = new_size;
313 }
314
315 map[nmap].alias = memcpy (&string_space[string_space_act],
316 alias, alias_len);
317 string_space_act += alias_len;
318
319 map[nmap].value = memcpy (&string_space[string_space_act],
320 value, value_len);
321 string_space_act += value_len;
322
323 ++nmap;
324 ++added;
325 }
326 }
327 }
328
329 /* Should we test for ferror()? I think we have to silently ignore
330 errors. --drepper */
331 fclose (fp);
332
333 if (added > 0)
334 qsort (map, nmap, sizeof (struct alias_map),
335 (int (*) PARAMS ((const void *, const void *))) alias_compare);
336
337 return added;
338 }
339
340
341 static int
342 extend_alias_table ()
343 {
344 size_t new_size;
345 struct alias_map *new_map;
346
347 new_size = maxmap == 0 ? 100 : 2 * maxmap;
348 new_map = (struct alias_map *) realloc (map, (new_size
349 * sizeof (struct alias_map)));
350 if (new_map == NULL)
351 /* Simply don't extend: we don't have any more core. */
352 return -1;
353
354 map = new_map;
355 maxmap = new_size;
356 return 0;
357 }
358
359
360 #ifdef _LIBC
361 static void __attribute__ ((unused))
362 free_mem (void)
363 {
364 if (string_space != NULL)
365 free (string_space);
366 if (map != NULL)
367 free (map);
368 }
369 text_set_element (__libc_subfreeres, free_mem);
370 #endif
371
372
373 static int
374 alias_compare (map1, map2)
375 const struct alias_map *map1;
376 const struct alias_map *map2;
377 {
378 #if defined _LIBC || defined HAVE_STRCASECMP
379 return strcasecmp (map1->alias, map2->alias);
380 #else
381 const unsigned char *p1 = (const unsigned char *) map1->alias;
382 const unsigned char *p2 = (const unsigned char *) map2->alias;
383 unsigned char c1, c2;
384
385 if (p1 == p2)
386 return 0;
387
388 do
389 {
390 /* I know this seems to be odd but the tolower() function in
391 some systems libc cannot handle nonalpha characters. */
392 c1 = isupper (*p1) ? tolower (*p1) : *p1;
393 c2 = isupper (*p2) ? tolower (*p2) : *p2;
394 if (c1 == '\0')
395 break;
396 ++p1;
397 ++p2;
398 }
399 while (c1 == c2);
400
401 return c1 - c2;
402 #endif
403 }
0 /* Implementation of ngettext(3) function.
1 Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 #ifdef HAVE_CONFIG_H
19 # include <config.h>
20 #endif
21
22 #ifdef _LIBC
23 # define __need_NULL
24 # include <stddef.h>
25 #else
26 # include <stdlib.h> /* Just for NULL. */
27 #endif
28
29 #include "gettextP.h"
30 #ifdef _LIBC
31 # include <libintl.h>
32 #else
33 # include "libgnuintl.h"
34 #endif
35
36 #include <locale.h>
37
38 /* @@ end of prolog @@ */
39
40 /* Names for the libintl functions are a problem. They must not clash
41 with existing names and they should follow ANSI C. But this source
42 code is also used in GNU C Library where the names have a __
43 prefix. So we have to make a difference here. */
44 #ifdef _LIBC
45 # define NGETTEXT __ngettext
46 # define DCNGETTEXT __dcngettext
47 #else
48 # define NGETTEXT ngettext__
49 # define DCNGETTEXT dcngettext__
50 #endif
51
52 /* Look up MSGID in the current default message catalog for the current
53 LC_MESSAGES locale. If not found, returns MSGID itself (the default
54 text). */
55 char *
56 NGETTEXT (msgid1, msgid2, n)
57 const char *msgid1;
58 const char *msgid2;
59 unsigned long int n;
60 {
61 return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
62 }
63
64 #ifdef _LIBC
65 /* Alias for function name in GNU C Library. */
66 weak_alias (__ngettext, ngettext);
67 #endif
0 /* A Bison parser, made by GNU Bison 1.875d. */
1
2 /* Skeleton parser for Yacc-like parsing with Bison,
3 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
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, or (at your option)
8 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,
18 Boston, MA 02111-1307, USA. */
19
20 /* As a special exception, when this file is copied by Bison into a
21 Bison output file, you may use that output file without restriction.
22 This special exception was added by the Free Software Foundation
23 in version 1.24 of Bison. */
24
25 /* Written by Richard Stallman by simplifying the original so called
26 ``semantic'' parser. */
27
28 /* All symbols defined below should begin with yy or YY, to avoid
29 infringing on user name space. This should be done even for local
30 variables, as they might otherwise be expanded by user macros.
31 There are some unavoidable exceptions within include files to
32 define necessary library symbols; they are noted "INFRINGES ON
33 USER NAME SPACE" below. */
34
35 /* Identify Bison output. */
36 #define YYBISON 1
37
38 /* Skeleton name. */
39 #define YYSKELETON_NAME "yacc.c"
40
41 /* Pure parsers. */
42 #define YYPURE 1
43
44 /* Using locations. */
45 #define YYLSP_NEEDED 0
46
47 /* If NAME_PREFIX is specified substitute the variables and functions
48 names. */
49 #define yyparse __gettextparse
50 #define yylex __gettextlex
51 #define yyerror __gettexterror
52 #define yylval __gettextlval
53 #define yychar __gettextchar
54 #define yydebug __gettextdebug
55 #define yynerrs __gettextnerrs
56
57
58 /* Tokens. */
59 #ifndef YYTOKENTYPE
60 # define YYTOKENTYPE
61 /* Put the tokens into the symbol table, so that GDB and other debuggers
62 know about them. */
63 enum yytokentype {
64 EQUOP2 = 258,
65 CMPOP2 = 259,
66 ADDOP2 = 260,
67 MULOP2 = 261,
68 NUMBER = 262
69 };
70 #endif
71 #define EQUOP2 258
72 #define CMPOP2 259
73 #define ADDOP2 260
74 #define MULOP2 261
75 #define NUMBER 262
76
77
78
79
80 /* Copy the first part of user declarations. */
81 #line 1 "plural.y"
82
83 /* Expression parsing for plural form selection.
84 Copyright (C) 2000, 2001 Free Software Foundation, Inc.
85 Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
86
87 This program is free software; you can redistribute it and/or modify it
88 under the terms of the GNU Library General Public License as published
89 by the Free Software Foundation; either version 2, or (at your option)
90 any later version.
91
92 This program is distributed in the hope that it will be useful,
93 but WITHOUT ANY WARRANTY; without even the implied warranty of
94 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
95 Library General Public License for more details.
96
97 You should have received a copy of the GNU Library General Public
98 License along with this program; if not, write to the Free Software
99 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
100 USA. */
101
102 /* The bison generated parser uses alloca. AIX 3 forces us to put this
103 declaration at the beginning of the file. The declaration in bison's
104 skeleton file comes too late. This must come before <config.h>
105 because <config.h> may include arbitrary system headers. */
106 #if defined _AIX && !defined __GNUC__
107 #pragma alloca
108 #endif
109
110 #ifdef HAVE_CONFIG_H
111 # include <config.h>
112 #endif
113
114 #include <stdlib.h>
115 #include "gettextP.h"
116
117 /* Names for the libintl functions are a problem. They must not clash
118 with existing names and they should follow ANSI C. But this source
119 code is also used in GNU C Library where the names have a __
120 prefix. So we have to make a difference here. */
121 #ifdef _LIBC
122 # define FREE_EXPRESSION __gettext_free_exp
123 #else
124 # define FREE_EXPRESSION gettext_free_exp__
125 # define __gettextparse gettextparse__
126 #endif
127
128 #define YYLEX_PARAM &((struct parse_args *) arg)->cp
129 #define YYPARSE_PARAM arg
130
131
132 /* Enabling traces. */
133 #ifndef YYDEBUG
134 # define YYDEBUG 0
135 #endif
136
137 /* Enabling verbose error messages. */
138 #ifdef YYERROR_VERBOSE
139 # undef YYERROR_VERBOSE
140 # define YYERROR_VERBOSE 1
141 #else
142 # define YYERROR_VERBOSE 0
143 #endif
144
145 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
146 #line 53 "plural.y"
147 typedef union YYSTYPE {
148 unsigned long int num;
149 enum operator op;
150 struct expression *exp;
151 } YYSTYPE;
152 /* Line 191 of yacc.c. */
153 #line 155 "plural.c"
154 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
155 # define YYSTYPE_IS_DECLARED 1
156 # define YYSTYPE_IS_TRIVIAL 1
157 #endif
158
159
160
161 /* Copy the second part of user declarations. */
162 #line 59 "plural.y"
163
164 /* Prototypes for local functions. */
165 static struct expression *new_exp PARAMS ((int nargs, enum operator op,
166 struct expression * const *args));
167 static inline struct expression *new_exp_0 PARAMS ((enum operator op));
168 static inline struct expression *new_exp_1 PARAMS ((enum operator op,
169 struct expression *right));
170 static struct expression *new_exp_2 PARAMS ((enum operator op,
171 struct expression *left,
172 struct expression *right));
173 static inline struct expression *new_exp_3 PARAMS ((enum operator op,
174 struct expression *bexp,
175 struct expression *tbranch,
176 struct expression *fbranch));
177 static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
178 static void yyerror PARAMS ((const char *str));
179
180 /* Allocation of expressions. */
181
182 static struct expression *
183 new_exp (nargs, op, args)
184 int nargs;
185 enum operator op;
186 struct expression * const *args;
187 {
188 int i;
189 struct expression *newp;
190
191 /* If any of the argument could not be malloc'ed, just return NULL. */
192 for (i = nargs - 1; i >= 0; i--)
193 if (args[i] == NULL)
194 goto fail;
195
196 /* Allocate a new expression. */
197 newp = (struct expression *) malloc (sizeof (*newp));
198 if (newp != NULL)
199 {
200 newp->nargs = nargs;
201 newp->operation = op;
202 for (i = nargs - 1; i >= 0; i--)
203 newp->val.args[i] = args[i];
204 return newp;
205 }
206
207 fail:
208 for (i = nargs - 1; i >= 0; i--)
209 FREE_EXPRESSION (args[i]);
210
211 return NULL;
212 }
213
214 static inline struct expression *
215 new_exp_0 (op)
216 enum operator op;
217 {
218 return new_exp (0, op, NULL);
219 }
220
221 static inline struct expression *
222 new_exp_1 (op, right)
223 enum operator op;
224 struct expression *right;
225 {
226 struct expression *args[1];
227
228 args[0] = right;
229 return new_exp (1, op, args);
230 }
231
232 static struct expression *
233 new_exp_2 (op, left, right)
234 enum operator op;
235 struct expression *left;
236 struct expression *right;
237 {
238 struct expression *args[2];
239
240 args[0] = left;
241 args[1] = right;
242 return new_exp (2, op, args);
243 }
244
245 static inline struct expression *
246 new_exp_3 (op, bexp, tbranch, fbranch)
247 enum operator op;
248 struct expression *bexp;
249 struct expression *tbranch;
250 struct expression *fbranch;
251 {
252 struct expression *args[3];
253
254 args[0] = bexp;
255 args[1] = tbranch;
256 args[2] = fbranch;
257 return new_exp (3, op, args);
258 }
259
260
261
262 /* Line 214 of yacc.c. */
263 #line 265 "plural.c"
264
265 #if ! defined (yyoverflow) || YYERROR_VERBOSE
266
267 # ifndef YYFREE
268 # define YYFREE free
269 # endif
270 # ifndef YYMALLOC
271 # define YYMALLOC malloc
272 # endif
273
274 /* The parser invokes alloca or malloc; define the necessary symbols. */
275
276 # ifdef YYSTACK_USE_ALLOCA
277 # if YYSTACK_USE_ALLOCA
278 # define YYSTACK_ALLOC alloca
279 # endif
280 # else
281 # if defined (alloca) || defined (_ALLOCA_H)
282 # define YYSTACK_ALLOC alloca
283 # else
284 # ifdef __GNUC__
285 # define YYSTACK_ALLOC __builtin_alloca
286 # endif
287 # endif
288 # endif
289
290 # ifdef YYSTACK_ALLOC
291 /* Pacify GCC's `empty if-body' warning. */
292 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
293 # else
294 # if defined (__STDC__) || defined (__cplusplus)
295 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
296 # define YYSIZE_T size_t
297 # endif
298 # define YYSTACK_ALLOC YYMALLOC
299 # define YYSTACK_FREE YYFREE
300 # endif
301 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
302
303
304 #if (! defined (yyoverflow) \
305 && (! defined (__cplusplus) \
306 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
307
308 /* A type that is properly aligned for any stack member. */
309 union yyalloc
310 {
311 short int yyss;
312 YYSTYPE yyvs;
313 };
314
315 /* The size of the maximum gap between one aligned stack and the next. */
316 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
317
318 /* The size of an array large to enough to hold all stacks, each with
319 N elements. */
320 # define YYSTACK_BYTES(N) \
321 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
322 + YYSTACK_GAP_MAXIMUM)
323
324 /* Copy COUNT objects from FROM to TO. The source and destination do
325 not overlap. */
326 # ifndef YYCOPY
327 # if defined (__GNUC__) && 1 < __GNUC__
328 # define YYCOPY(To, From, Count) \
329 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
330 # else
331 # define YYCOPY(To, From, Count) \
332 do \
333 { \
334 register YYSIZE_T yyi; \
335 for (yyi = 0; yyi < (Count); yyi++) \
336 (To)[yyi] = (From)[yyi]; \
337 } \
338 while (0)
339 # endif
340 # endif
341
342 /* Relocate STACK from its old location to the new one. The
343 local variables YYSIZE and YYSTACKSIZE give the old and new number of
344 elements in the stack, and YYPTR gives the new location of the
345 stack. Advance YYPTR to a properly aligned location for the next
346 stack. */
347 # define YYSTACK_RELOCATE(Stack) \
348 do \
349 { \
350 YYSIZE_T yynewbytes; \
351 YYCOPY (&yyptr->Stack, Stack, yysize); \
352 Stack = &yyptr->Stack; \
353 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
354 yyptr += yynewbytes / sizeof (*yyptr); \
355 } \
356 while (0)
357
358 #endif
359
360 #if defined (__STDC__) || defined (__cplusplus)
361 typedef signed char yysigned_char;
362 #else
363 typedef short int yysigned_char;
364 #endif
365
366 /* YYFINAL -- State number of the termination state. */
367 #define YYFINAL 9
368 /* YYLAST -- Last index in YYTABLE. */
369 #define YYLAST 54
370
371 /* YYNTOKENS -- Number of terminals. */
372 #define YYNTOKENS 16
373 /* YYNNTS -- Number of nonterminals. */
374 #define YYNNTS 3
375 /* YYNRULES -- Number of rules. */
376 #define YYNRULES 13
377 /* YYNRULES -- Number of states. */
378 #define YYNSTATES 27
379
380 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
381 #define YYUNDEFTOK 2
382 #define YYMAXUTOK 262
383
384 #define YYTRANSLATE(YYX) \
385 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
386
387 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
388 static const unsigned char yytranslate[] =
389 {
390 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
391 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
392 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
393 2, 2, 2, 10, 2, 2, 2, 2, 5, 2,
394 14, 15, 2, 2, 2, 2, 2, 2, 2, 2,
395 2, 2, 2, 2, 2, 2, 2, 2, 12, 2,
396 2, 2, 2, 3, 2, 2, 2, 2, 2, 2,
397 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
398 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
399 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
400 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
401 13, 2, 2, 2, 2, 2, 2, 2, 2, 2,
402 2, 2, 2, 2, 4, 2, 2, 2, 2, 2,
403 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
404 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
405 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
406 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
407 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
408 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
409 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
410 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
411 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
412 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
413 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
414 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
415 2, 2, 2, 2, 2, 2, 1, 2, 6, 7,
416 8, 9, 11
417 };
418
419 #if YYDEBUG
420 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
421 YYRHS. */
422 static const unsigned char yyprhs[] =
423 {
424 0, 0, 3, 5, 11, 15, 19, 23, 27, 31,
425 35, 38, 40, 42
426 };
427
428 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
429 static const yysigned_char yyrhs[] =
430 {
431 17, 0, -1, 18, -1, 18, 3, 18, 12, 18,
432 -1, 18, 4, 18, -1, 18, 5, 18, -1, 18,
433 6, 18, -1, 18, 7, 18, -1, 18, 8, 18,
434 -1, 18, 9, 18, -1, 10, 18, -1, 13, -1,
435 11, -1, 14, 18, 15, -1
436 };
437
438 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
439 static const unsigned char yyrline[] =
440 {
441 0, 178, 178, 186, 190, 194, 198, 202, 206, 210,
442 214, 218, 222, 227
443 };
444 #endif
445
446 #if YYDEBUG || YYERROR_VERBOSE
447 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
448 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
449 static const char *const yytname[] =
450 {
451 "$end", "error", "$undefined", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2",
452 "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'",
453 "$accept", "start", "exp", 0
454 };
455 #endif
456
457 # ifdef YYPRINT
458 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
459 token YYLEX-NUM. */
460 static const unsigned short int yytoknum[] =
461 {
462 0, 256, 257, 63, 124, 38, 258, 259, 260, 261,
463 33, 262, 58, 110, 40, 41
464 };
465 # endif
466
467 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
468 static const unsigned char yyr1[] =
469 {
470 0, 16, 17, 18, 18, 18, 18, 18, 18, 18,
471 18, 18, 18, 18
472 };
473
474 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
475 static const unsigned char yyr2[] =
476 {
477 0, 2, 1, 5, 3, 3, 3, 3, 3, 3,
478 2, 1, 1, 3
479 };
480
481 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
482 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
483 means the default is an error. */
484 static const unsigned char yydefact[] =
485 {
486 0, 0, 12, 11, 0, 0, 2, 10, 0, 1,
487 0, 0, 0, 0, 0, 0, 0, 13, 0, 4,
488 5, 6, 7, 8, 9, 0, 3
489 };
490
491 /* YYDEFGOTO[NTERM-NUM]. */
492 static const yysigned_char yydefgoto[] =
493 {
494 -1, 5, 6
495 };
496
497 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
498 STATE-NUM. */
499 #define YYPACT_NINF -10
500 static const yysigned_char yypact[] =
501 {
502 -9, -9, -10, -10, -9, 8, 36, -10, 13, -10,
503 -9, -9, -9, -9, -9, -9, -9, -10, 26, 41,
504 45, 18, -2, 14, -10, -9, 36
505 };
506
507 /* YYPGOTO[NTERM-NUM]. */
508 static const yysigned_char yypgoto[] =
509 {
510 -10, -10, -1
511 };
512
513 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
514 positive, shift that token. If negative, reduce the rule which
515 number is the opposite. If zero, do what YYDEFACT says.
516 If YYTABLE_NINF, syntax error. */
517 #define YYTABLE_NINF -1
518 static const unsigned char yytable[] =
519 {
520 7, 1, 2, 8, 3, 4, 15, 16, 9, 18,
521 19, 20, 21, 22, 23, 24, 10, 11, 12, 13,
522 14, 15, 16, 16, 26, 14, 15, 16, 17, 10,
523 11, 12, 13, 14, 15, 16, 0, 0, 25, 10,
524 11, 12, 13, 14, 15, 16, 12, 13, 14, 15,
525 16, 13, 14, 15, 16
526 };
527
528 static const yysigned_char yycheck[] =
529 {
530 1, 10, 11, 4, 13, 14, 8, 9, 0, 10,
531 11, 12, 13, 14, 15, 16, 3, 4, 5, 6,
532 7, 8, 9, 9, 25, 7, 8, 9, 15, 3,
533 4, 5, 6, 7, 8, 9, -1, -1, 12, 3,
534 4, 5, 6, 7, 8, 9, 5, 6, 7, 8,
535 9, 6, 7, 8, 9
536 };
537
538 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
539 symbol of state STATE-NUM. */
540 static const unsigned char yystos[] =
541 {
542 0, 10, 11, 13, 14, 17, 18, 18, 18, 0,
543 3, 4, 5, 6, 7, 8, 9, 15, 18, 18,
544 18, 18, 18, 18, 18, 12, 18
545 };
546
547 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
548 # define YYSIZE_T __SIZE_TYPE__
549 #endif
550 #if ! defined (YYSIZE_T) && defined (size_t)
551 # define YYSIZE_T size_t
552 #endif
553 #if ! defined (YYSIZE_T)
554 # if defined (__STDC__) || defined (__cplusplus)
555 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
556 # define YYSIZE_T size_t
557 # endif
558 #endif
559 #if ! defined (YYSIZE_T)
560 # define YYSIZE_T unsigned int
561 #endif
562
563 #define yyerrok (yyerrstatus = 0)
564 #define yyclearin (yychar = YYEMPTY)
565 #define YYEMPTY (-2)
566 #define YYEOF 0
567
568 #define YYACCEPT goto yyacceptlab
569 #define YYABORT goto yyabortlab
570 #define YYERROR goto yyerrorlab
571
572
573 /* Like YYERROR except do call yyerror. This remains here temporarily
574 to ease the transition to the new meaning of YYERROR, for GCC.
575 Once GCC version 2 has supplanted version 1, this can go. */
576
577 #define YYFAIL goto yyerrlab
578
579 #define YYRECOVERING() (!!yyerrstatus)
580
581 #define YYBACKUP(Token, Value) \
582 do \
583 if (yychar == YYEMPTY && yylen == 1) \
584 { \
585 yychar = (Token); \
586 yylval = (Value); \
587 yytoken = YYTRANSLATE (yychar); \
588 YYPOPSTACK; \
589 goto yybackup; \
590 } \
591 else \
592 { \
593 yyerror ("syntax error: cannot back up");\
594 YYERROR; \
595 } \
596 while (0)
597
598 #define YYTERROR 1
599 #define YYERRCODE 256
600
601 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
602 are run). */
603
604 #ifndef YYLLOC_DEFAULT
605 # define YYLLOC_DEFAULT(Current, Rhs, N) \
606 ((Current).first_line = (Rhs)[1].first_line, \
607 (Current).first_column = (Rhs)[1].first_column, \
608 (Current).last_line = (Rhs)[N].last_line, \
609 (Current).last_column = (Rhs)[N].last_column)
610 #endif
611
612 /* YYLEX -- calling `yylex' with the right arguments. */
613
614 #ifdef YYLEX_PARAM
615 # define YYLEX yylex (&yylval, YYLEX_PARAM)
616 #else
617 # define YYLEX yylex (&yylval)
618 #endif
619
620 /* Enable debugging if requested. */
621 #if YYDEBUG
622
623 # ifndef YYFPRINTF
624 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
625 # define YYFPRINTF fprintf
626 # endif
627
628 # define YYDPRINTF(Args) \
629 do { \
630 if (yydebug) \
631 YYFPRINTF Args; \
632 } while (0)
633
634 # define YYDSYMPRINT(Args) \
635 do { \
636 if (yydebug) \
637 yysymprint Args; \
638 } while (0)
639
640 # define YYDSYMPRINTF(Title, Token, Value, Location) \
641 do { \
642 if (yydebug) \
643 { \
644 YYFPRINTF (stderr, "%s ", Title); \
645 yysymprint (stderr, \
646 Token, Value); \
647 YYFPRINTF (stderr, "\n"); \
648 } \
649 } while (0)
650
651 /*------------------------------------------------------------------.
652 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
653 | TOP (included). |
654 `------------------------------------------------------------------*/
655
656 #if defined (__STDC__) || defined (__cplusplus)
657 static void
658 yy_stack_print (short int *bottom, short int *top)
659 #else
660 static void
661 yy_stack_print (bottom, top)
662 short int *bottom;
663 short int *top;
664 #endif
665 {
666 YYFPRINTF (stderr, "Stack now");
667 for (/* Nothing. */; bottom <= top; ++bottom)
668 YYFPRINTF (stderr, " %d", *bottom);
669 YYFPRINTF (stderr, "\n");
670 }
671
672 # define YY_STACK_PRINT(Bottom, Top) \
673 do { \
674 if (yydebug) \
675 yy_stack_print ((Bottom), (Top)); \
676 } while (0)
677
678
679 /*------------------------------------------------.
680 | Report that the YYRULE is going to be reduced. |
681 `------------------------------------------------*/
682
683 #if defined (__STDC__) || defined (__cplusplus)
684 static void
685 yy_reduce_print (int yyrule)
686 #else
687 static void
688 yy_reduce_print (yyrule)
689 int yyrule;
690 #endif
691 {
692 int yyi;
693 unsigned int yylno = yyrline[yyrule];
694 YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
695 yyrule - 1, yylno);
696 /* Print the symbols being reduced, and their result. */
697 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
698 YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
699 YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
700 }
701
702 # define YY_REDUCE_PRINT(Rule) \
703 do { \
704 if (yydebug) \
705 yy_reduce_print (Rule); \
706 } while (0)
707
708 /* Nonzero means print parse trace. It is left uninitialized so that
709 multiple parsers can coexist. */
710 int yydebug;
711 #else /* !YYDEBUG */
712 # define YYDPRINTF(Args)
713 # define YYDSYMPRINT(Args)
714 # define YYDSYMPRINTF(Title, Token, Value, Location)
715 # define YY_STACK_PRINT(Bottom, Top)
716 # define YY_REDUCE_PRINT(Rule)
717 #endif /* !YYDEBUG */
718
719
720 /* YYINITDEPTH -- initial size of the parser's stacks. */
721 #ifndef YYINITDEPTH
722 # define YYINITDEPTH 200
723 #endif
724
725 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
726 if the built-in stack extension method is used).
727
728 Do not make this value too large; the results are undefined if
729 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
730 evaluated with infinite-precision integer arithmetic. */
731
732 #if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
733 # undef YYMAXDEPTH
734 #endif
735
736 #ifndef YYMAXDEPTH
737 # define YYMAXDEPTH 10000
738 #endif
739
740
741
742 #if YYERROR_VERBOSE
743
744 # ifndef yystrlen
745 # if defined (__GLIBC__) && defined (_STRING_H)
746 # define yystrlen strlen
747 # else
748 /* Return the length of YYSTR. */
749 static YYSIZE_T
750 # if defined (__STDC__) || defined (__cplusplus)
751 yystrlen (const char *yystr)
752 # else
753 yystrlen (yystr)
754 const char *yystr;
755 # endif
756 {
757 register const char *yys = yystr;
758
759 while (*yys++ != '\0')
760 continue;
761
762 return yys - yystr - 1;
763 }
764 # endif
765 # endif
766
767 # ifndef yystpcpy
768 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
769 # define yystpcpy stpcpy
770 # else
771 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
772 YYDEST. */
773 static char *
774 # if defined (__STDC__) || defined (__cplusplus)
775 yystpcpy (char *yydest, const char *yysrc)
776 # else
777 yystpcpy (yydest, yysrc)
778 char *yydest;
779 const char *yysrc;
780 # endif
781 {
782 register char *yyd = yydest;
783 register const char *yys = yysrc;
784
785 while ((*yyd++ = *yys++) != '\0')
786 continue;
787
788 return yyd - 1;
789 }
790 # endif
791 # endif
792
793 #endif /* !YYERROR_VERBOSE */
794
795
796
797 #if YYDEBUG
798 /*--------------------------------.
799 | Print this symbol on YYOUTPUT. |
800 `--------------------------------*/
801
802 #if defined (__STDC__) || defined (__cplusplus)
803 static void
804 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
805 #else
806 static void
807 yysymprint (yyoutput, yytype, yyvaluep)
808 FILE *yyoutput;
809 int yytype;
810 YYSTYPE *yyvaluep;
811 #endif
812 {
813 /* Pacify ``unused variable'' warnings. */
814 (void) yyvaluep;
815
816 if (yytype < YYNTOKENS)
817 {
818 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
819 # ifdef YYPRINT
820 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
821 # endif
822 }
823 else
824 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
825
826 switch (yytype)
827 {
828 default:
829 break;
830 }
831 YYFPRINTF (yyoutput, ")");
832 }
833
834 #endif /* ! YYDEBUG */
835 /*-----------------------------------------------.
836 | Release the memory associated to this symbol. |
837 `-----------------------------------------------*/
838
839 #if defined (__STDC__) || defined (__cplusplus)
840 static void
841 yydestruct (int yytype, YYSTYPE *yyvaluep)
842 #else
843 static void
844 yydestruct (yytype, yyvaluep)
845 int yytype;
846 YYSTYPE *yyvaluep;
847 #endif
848 {
849 /* Pacify ``unused variable'' warnings. */
850 (void) yyvaluep;
851
852 switch (yytype)
853 {
854
855 default:
856 break;
857 }
858 }
859
860
861 /* Prevent warnings from -Wmissing-prototypes. */
862
863 #ifdef YYPARSE_PARAM
864 # if defined (__STDC__) || defined (__cplusplus)
865 int yyparse (void *YYPARSE_PARAM);
866 # else
867 int yyparse ();
868 # endif
869 #else /* ! YYPARSE_PARAM */
870 #if defined (__STDC__) || defined (__cplusplus)
871 int yyparse (void);
872 #else
873 int yyparse ();
874 #endif
875 #endif /* ! YYPARSE_PARAM */
876
877
878
879
880
881
882 /*----------.
883 | yyparse. |
884 `----------*/
885
886 #ifdef YYPARSE_PARAM
887 # if defined (__STDC__) || defined (__cplusplus)
888 int yyparse (void *YYPARSE_PARAM)
889 # else
890 int yyparse (YYPARSE_PARAM)
891 void *YYPARSE_PARAM;
892 # endif
893 #else /* ! YYPARSE_PARAM */
894 #if defined (__STDC__) || defined (__cplusplus)
895 int
896 yyparse (void)
897 #else
898 int
899 yyparse ()
900
901 #endif
902 #endif
903 {
904 /* The lookahead symbol. */
905 int yychar;
906
907 /* The semantic value of the lookahead symbol. */
908 YYSTYPE yylval;
909
910 /* Number of syntax errors so far. */
911 int yynerrs;
912
913 register int yystate;
914 register int yyn;
915 int yyresult;
916 /* Number of tokens to shift before error messages enabled. */
917 int yyerrstatus;
918 /* Lookahead token as an internal (translated) token number. */
919 int yytoken = 0;
920
921 /* Three stacks and their tools:
922 `yyss': related to states,
923 `yyvs': related to semantic values,
924 `yyls': related to locations.
925
926 Refer to the stacks thru separate pointers, to allow yyoverflow
927 to reallocate them elsewhere. */
928
929 /* The state stack. */
930 short int yyssa[YYINITDEPTH];
931 short int *yyss = yyssa;
932 register short int *yyssp;
933
934 /* The semantic value stack. */
935 YYSTYPE yyvsa[YYINITDEPTH];
936 YYSTYPE *yyvs = yyvsa;
937 register YYSTYPE *yyvsp;
938
939
940
941 #define YYPOPSTACK (yyvsp--, yyssp--)
942
943 YYSIZE_T yystacksize = YYINITDEPTH;
944
945 /* The variables used to return semantic value and location from the
946 action routines. */
947 YYSTYPE yyval;
948
949
950 /* When reducing, the number of symbols on the RHS of the reduced
951 rule. */
952 int yylen;
953
954 YYDPRINTF ((stderr, "Starting parse\n"));
955
956 yystate = 0;
957 yyerrstatus = 0;
958 yynerrs = 0;
959 yychar = YYEMPTY; /* Cause a token to be read. */
960
961 /* Initialize stack pointers.
962 Waste one element of value and location stack
963 so that they stay on the same level as the state stack.
964 The wasted elements are never initialized. */
965
966 yyssp = yyss;
967 yyvsp = yyvs;
968
969
970 goto yysetstate;
971
972 /*------------------------------------------------------------.
973 | yynewstate -- Push a new state, which is found in yystate. |
974 `------------------------------------------------------------*/
975 yynewstate:
976 /* In all cases, when you get here, the value and location stacks
977 have just been pushed. so pushing a state here evens the stacks.
978 */
979 yyssp++;
980
981 yysetstate:
982 *yyssp = yystate;
983
984 if (yyss + yystacksize - 1 <= yyssp)
985 {
986 /* Get the current used size of the three stacks, in elements. */
987 YYSIZE_T yysize = yyssp - yyss + 1;
988
989 #ifdef yyoverflow
990 {
991 /* Give user a chance to reallocate the stack. Use copies of
992 these so that the &'s don't force the real ones into
993 memory. */
994 YYSTYPE *yyvs1 = yyvs;
995 short int *yyss1 = yyss;
996
997
998 /* Each stack pointer address is followed by the size of the
999 data in use in that stack, in bytes. This used to be a
1000 conditional around just the two extra args, but that might
1001 be undefined if yyoverflow is a macro. */
1002 yyoverflow ("parser stack overflow",
1003 &yyss1, yysize * sizeof (*yyssp),
1004 &yyvs1, yysize * sizeof (*yyvsp),
1005
1006 &yystacksize);
1007
1008 yyss = yyss1;
1009 yyvs = yyvs1;
1010 }
1011 #else /* no yyoverflow */
1012 # ifndef YYSTACK_RELOCATE
1013 goto yyoverflowlab;
1014 # else
1015 /* Extend the stack our own way. */
1016 if (YYMAXDEPTH <= yystacksize)
1017 goto yyoverflowlab;
1018 yystacksize *= 2;
1019 if (YYMAXDEPTH < yystacksize)
1020 yystacksize = YYMAXDEPTH;
1021
1022 {
1023 short int *yyss1 = yyss;
1024 union yyalloc *yyptr =
1025 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1026 if (! yyptr)
1027 goto yyoverflowlab;
1028 YYSTACK_RELOCATE (yyss);
1029 YYSTACK_RELOCATE (yyvs);
1030
1031 # undef YYSTACK_RELOCATE
1032 if (yyss1 != yyssa)
1033 YYSTACK_FREE (yyss1);
1034 }
1035 # endif
1036 #endif /* no yyoverflow */
1037
1038 yyssp = yyss + yysize - 1;
1039 yyvsp = yyvs + yysize - 1;
1040
1041
1042 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1043 (unsigned long int) yystacksize));
1044
1045 if (yyss + yystacksize - 1 <= yyssp)
1046 YYABORT;
1047 }
1048
1049 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1050
1051 goto yybackup;
1052
1053 /*-----------.
1054 | yybackup. |
1055 `-----------*/
1056 yybackup:
1057
1058 /* Do appropriate processing given the current state. */
1059 /* Read a lookahead token if we need one and don't already have one. */
1060 /* yyresume: */
1061
1062 /* First try to decide what to do without reference to lookahead token. */
1063
1064 yyn = yypact[yystate];
1065 if (yyn == YYPACT_NINF)
1066 goto yydefault;
1067
1068 /* Not known => get a lookahead token if don't already have one. */
1069
1070 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1071 if (yychar == YYEMPTY)
1072 {
1073 YYDPRINTF ((stderr, "Reading a token: "));
1074 yychar = YYLEX;
1075 }
1076
1077 if (yychar <= YYEOF)
1078 {
1079 yychar = yytoken = YYEOF;
1080 YYDPRINTF ((stderr, "Now at end of input.\n"));
1081 }
1082 else
1083 {
1084 yytoken = YYTRANSLATE (yychar);
1085 YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
1086 }
1087
1088 /* If the proper action on seeing token YYTOKEN is to reduce or to
1089 detect an error, take that action. */
1090 yyn += yytoken;
1091 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1092 goto yydefault;
1093 yyn = yytable[yyn];
1094 if (yyn <= 0)
1095 {
1096 if (yyn == 0 || yyn == YYTABLE_NINF)
1097 goto yyerrlab;
1098 yyn = -yyn;
1099 goto yyreduce;
1100 }
1101
1102 if (yyn == YYFINAL)
1103 YYACCEPT;
1104
1105 /* Shift the lookahead token. */
1106 YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
1107
1108 /* Discard the token being shifted unless it is eof. */
1109 if (yychar != YYEOF)
1110 yychar = YYEMPTY;
1111
1112 *++yyvsp = yylval;
1113
1114
1115 /* Count tokens shifted since error; after three, turn off error
1116 status. */
1117 if (yyerrstatus)
1118 yyerrstatus--;
1119
1120 yystate = yyn;
1121 goto yynewstate;
1122
1123
1124 /*-----------------------------------------------------------.
1125 | yydefault -- do the default action for the current state. |
1126 `-----------------------------------------------------------*/
1127 yydefault:
1128 yyn = yydefact[yystate];
1129 if (yyn == 0)
1130 goto yyerrlab;
1131 goto yyreduce;
1132
1133
1134 /*-----------------------------.
1135 | yyreduce -- Do a reduction. |
1136 `-----------------------------*/
1137 yyreduce:
1138 /* yyn is the number of a rule to reduce with. */
1139 yylen = yyr2[yyn];
1140
1141 /* If YYLEN is nonzero, implement the default value of the action:
1142 `$$ = $1'.
1143
1144 Otherwise, the following line sets YYVAL to garbage.
1145 This behavior is undocumented and Bison
1146 users should not rely upon it. Assigning to YYVAL
1147 unconditionally makes the parser a bit smaller, and it avoids a
1148 GCC warning that YYVAL may be used uninitialized. */
1149 yyval = yyvsp[1-yylen];
1150
1151
1152 YY_REDUCE_PRINT (yyn);
1153 switch (yyn)
1154 {
1155 case 2:
1156 #line 179 "plural.y"
1157 {
1158 if (yyvsp[0].exp == NULL)
1159 YYABORT;
1160 ((struct parse_args *) arg)->res = yyvsp[0].exp;
1161 }
1162 break;
1163
1164 case 3:
1165 #line 187 "plural.y"
1166 {
1167 yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
1168 }
1169 break;
1170
1171 case 4:
1172 #line 191 "plural.y"
1173 {
1174 yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
1175 }
1176 break;
1177
1178 case 5:
1179 #line 195 "plural.y"
1180 {
1181 yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
1182 }
1183 break;
1184
1185 case 6:
1186 #line 199 "plural.y"
1187 {
1188 yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
1189 }
1190 break;
1191
1192 case 7:
1193 #line 203 "plural.y"
1194 {
1195 yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
1196 }
1197 break;
1198
1199 case 8:
1200 #line 207 "plural.y"
1201 {
1202 yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
1203 }
1204 break;
1205
1206 case 9:
1207 #line 211 "plural.y"
1208 {
1209 yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
1210 }
1211 break;
1212
1213 case 10:
1214 #line 215 "plural.y"
1215 {
1216 yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
1217 }
1218 break;
1219
1220 case 11:
1221 #line 219 "plural.y"
1222 {
1223 yyval.exp = new_exp_0 (var);
1224 }
1225 break;
1226
1227 case 12:
1228 #line 223 "plural.y"
1229 {
1230 if ((yyval.exp = new_exp_0 (num)) != NULL)
1231 yyval.exp->val.num = yyvsp[0].num;
1232 }
1233 break;
1234
1235 case 13:
1236 #line 228 "plural.y"
1237 {
1238 yyval.exp = yyvsp[-1].exp;
1239 }
1240 break;
1241
1242
1243 }
1244
1245 /* Line 1010 of yacc.c. */
1246 #line 1248 "plural.c"
1247
1248 yyvsp -= yylen;
1249 yyssp -= yylen;
1250
1251
1252 YY_STACK_PRINT (yyss, yyssp);
1253
1254 *++yyvsp = yyval;
1255
1256
1257 /* Now `shift' the result of the reduction. Determine what state
1258 that goes to, based on the state we popped back to and the rule
1259 number reduced by. */
1260
1261 yyn = yyr1[yyn];
1262
1263 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1264 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1265 yystate = yytable[yystate];
1266 else
1267 yystate = yydefgoto[yyn - YYNTOKENS];
1268
1269 goto yynewstate;
1270
1271
1272 /*------------------------------------.
1273 | yyerrlab -- here on detecting error |
1274 `------------------------------------*/
1275 yyerrlab:
1276 /* If not already recovering from an error, report this error. */
1277 if (!yyerrstatus)
1278 {
1279 ++yynerrs;
1280 #if YYERROR_VERBOSE
1281 yyn = yypact[yystate];
1282
1283 if (YYPACT_NINF < yyn && yyn < YYLAST)
1284 {
1285 YYSIZE_T yysize = 0;
1286 int yytype = YYTRANSLATE (yychar);
1287 const char* yyprefix;
1288 char *yymsg;
1289 int yyx;
1290
1291 /* Start YYX at -YYN if negative to avoid negative indexes in
1292 YYCHECK. */
1293 int yyxbegin = yyn < 0 ? -yyn : 0;
1294
1295 /* Stay within bounds of both yycheck and yytname. */
1296 int yychecklim = YYLAST - yyn;
1297 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1298 int yycount = 0;
1299
1300 yyprefix = ", expecting ";
1301 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1302 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1303 {
1304 yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
1305 yycount += 1;
1306 if (yycount == 5)
1307 {
1308 yysize = 0;
1309 break;
1310 }
1311 }
1312 yysize += (sizeof ("syntax error, unexpected ")
1313 + yystrlen (yytname[yytype]));
1314 yymsg = (char *) YYSTACK_ALLOC (yysize);
1315 if (yymsg != 0)
1316 {
1317 char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
1318 yyp = yystpcpy (yyp, yytname[yytype]);
1319
1320 if (yycount < 5)
1321 {
1322 yyprefix = ", expecting ";
1323 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1324 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1325 {
1326 yyp = yystpcpy (yyp, yyprefix);
1327 yyp = yystpcpy (yyp, yytname[yyx]);
1328 yyprefix = " or ";
1329 }
1330 }
1331 yyerror (yymsg);
1332 YYSTACK_FREE (yymsg);
1333 }
1334 else
1335 yyerror ("syntax error; also virtual memory exhausted");
1336 }
1337 else
1338 #endif /* YYERROR_VERBOSE */
1339 yyerror ("syntax error");
1340 }
1341
1342
1343
1344 if (yyerrstatus == 3)
1345 {
1346 /* If just tried and failed to reuse lookahead token after an
1347 error, discard it. */
1348
1349 if (yychar <= YYEOF)
1350 {
1351 /* If at end of input, pop the error token,
1352 then the rest of the stack, then return failure. */
1353 if (yychar == YYEOF)
1354 for (;;)
1355 {
1356 YYPOPSTACK;
1357 if (yyssp == yyss)
1358 YYABORT;
1359 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1360 yydestruct (yystos[*yyssp], yyvsp);
1361 }
1362 }
1363 else
1364 {
1365 YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
1366 yydestruct (yytoken, &yylval);
1367 yychar = YYEMPTY;
1368
1369 }
1370 }
1371
1372 /* Else will try to reuse lookahead token after shifting the error
1373 token. */
1374 goto yyerrlab1;
1375
1376
1377 /*---------------------------------------------------.
1378 | yyerrorlab -- error raised explicitly by YYERROR. |
1379 `---------------------------------------------------*/
1380 yyerrorlab:
1381
1382 #ifdef __GNUC__
1383 /* Pacify GCC when the user code never invokes YYERROR and the label
1384 yyerrorlab therefore never appears in user code. */
1385 if (0)
1386 goto yyerrorlab;
1387 #endif
1388
1389 yyvsp -= yylen;
1390 yyssp -= yylen;
1391 yystate = *yyssp;
1392 goto yyerrlab1;
1393
1394
1395 /*-------------------------------------------------------------.
1396 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1397 `-------------------------------------------------------------*/
1398 yyerrlab1:
1399 yyerrstatus = 3; /* Each real token shifted decrements this. */
1400
1401 for (;;)
1402 {
1403 yyn = yypact[yystate];
1404 if (yyn != YYPACT_NINF)
1405 {
1406 yyn += YYTERROR;
1407 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1408 {
1409 yyn = yytable[yyn];
1410 if (0 < yyn)
1411 break;
1412 }
1413 }
1414
1415 /* Pop the current state because it cannot handle the error token. */
1416 if (yyssp == yyss)
1417 YYABORT;
1418
1419 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1420 yydestruct (yystos[yystate], yyvsp);
1421 YYPOPSTACK;
1422 yystate = *yyssp;
1423 YY_STACK_PRINT (yyss, yyssp);
1424 }
1425
1426 if (yyn == YYFINAL)
1427 YYACCEPT;
1428
1429 YYDPRINTF ((stderr, "Shifting error token, "));
1430
1431 *++yyvsp = yylval;
1432
1433
1434 yystate = yyn;
1435 goto yynewstate;
1436
1437
1438 /*-------------------------------------.
1439 | yyacceptlab -- YYACCEPT comes here. |
1440 `-------------------------------------*/
1441 yyacceptlab:
1442 yyresult = 0;
1443 goto yyreturn;
1444
1445 /*-----------------------------------.
1446 | yyabortlab -- YYABORT comes here. |
1447 `-----------------------------------*/
1448 yyabortlab:
1449 yyresult = 1;
1450 goto yyreturn;
1451
1452 #ifndef yyoverflow
1453 /*----------------------------------------------.
1454 | yyoverflowlab -- parser overflow comes here. |
1455 `----------------------------------------------*/
1456 yyoverflowlab:
1457 yyerror ("parser stack overflow");
1458 yyresult = 2;
1459 /* Fall through. */
1460 #endif
1461
1462 yyreturn:
1463 #ifndef yyoverflow
1464 if (yyss != yyssa)
1465 YYSTACK_FREE (yyss);
1466 #endif
1467 return yyresult;
1468 }
1469
1470
1471 #line 233 "plural.y"
1472
1473
1474 void
1475 internal_function
1476 FREE_EXPRESSION (exp)
1477 struct expression *exp;
1478 {
1479 if (exp == NULL)
1480 return;
1481
1482 /* Handle the recursive case. */
1483 switch (exp->nargs)
1484 {
1485 case 3:
1486 FREE_EXPRESSION (exp->val.args[2]);
1487 /* FALLTHROUGH */
1488 case 2:
1489 FREE_EXPRESSION (exp->val.args[1]);
1490 /* FALLTHROUGH */
1491 case 1:
1492 FREE_EXPRESSION (exp->val.args[0]);
1493 /* FALLTHROUGH */
1494 default:
1495 break;
1496 }
1497
1498 free (exp);
1499 }
1500
1501
1502 static int
1503 yylex (lval, pexp)
1504 YYSTYPE *lval;
1505 const char **pexp;
1506 {
1507 const char *exp = *pexp;
1508 int result;
1509
1510 while (1)
1511 {
1512 if (exp[0] == '\0')
1513 {
1514 *pexp = exp;
1515 return YYEOF;
1516 }
1517
1518 if (exp[0] != ' ' && exp[0] != '\t')
1519 break;
1520
1521 ++exp;
1522 }
1523
1524 result = *exp++;
1525 switch (result)
1526 {
1527 case '0': case '1': case '2': case '3': case '4':
1528 case '5': case '6': case '7': case '8': case '9':
1529 {
1530 unsigned long int n = result - '0';
1531 while (exp[0] >= '0' && exp[0] <= '9')
1532 {
1533 n *= 10;
1534 n += exp[0] - '0';
1535 ++exp;
1536 }
1537 lval->num = n;
1538 result = NUMBER;
1539 }
1540 break;
1541
1542 case '=':
1543 if (exp[0] == '=')
1544 {
1545 ++exp;
1546 lval->op = equal;
1547 result = EQUOP2;
1548 }
1549 else
1550 result = YYERRCODE;
1551 break;
1552
1553 case '!':
1554 if (exp[0] == '=')
1555 {
1556 ++exp;
1557 lval->op = not_equal;
1558 result = EQUOP2;
1559 }
1560 break;
1561
1562 case '&':
1563 case '|':
1564 if (exp[0] == result)
1565 ++exp;
1566 else
1567 result = YYERRCODE;
1568 break;
1569
1570 case '<':
1571 if (exp[0] == '=')
1572 {
1573 ++exp;
1574 lval->op = less_or_equal;
1575 }
1576 else
1577 lval->op = less_than;
1578 result = CMPOP2;
1579 break;
1580
1581 case '>':
1582 if (exp[0] == '=')
1583 {
1584 ++exp;
1585 lval->op = greater_or_equal;
1586 }
1587 else
1588 lval->op = greater_than;
1589 result = CMPOP2;
1590 break;
1591
1592 case '*':
1593 lval->op = mult;
1594 result = MULOP2;
1595 break;
1596
1597 case '/':
1598 lval->op = divide;
1599 result = MULOP2;
1600 break;
1601
1602 case '%':
1603 lval->op = module;
1604 result = MULOP2;
1605 break;
1606
1607 case '+':
1608 lval->op = plus;
1609 result = ADDOP2;
1610 break;
1611
1612 case '-':
1613 lval->op = minus;
1614 result = ADDOP2;
1615 break;
1616
1617 case 'n':
1618 case '?':
1619 case ':':
1620 case '(':
1621 case ')':
1622 /* Nothing, just return the character. */
1623 break;
1624
1625 case ';':
1626 case '\n':
1627 case '\0':
1628 /* Be safe and let the user call this function again. */
1629 --exp;
1630 result = YYEOF;
1631 break;
1632
1633 default:
1634 result = YYERRCODE;
1635 #if YYDEBUG != 0
1636 --exp;
1637 #endif
1638 break;
1639 }
1640
1641 *pexp = exp;
1642
1643 return result;
1644 }
1645
1646
1647 static void
1648 yyerror (str)
1649 const char *str;
1650 {
1651 /* Do nothing. We don't print error messages here. */
1652 }
1653
0 %{
1 /* Expression parsing for plural form selection.
2 Copyright (C) 2000, 2001 Free Software Foundation, Inc.
3 Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
4
5 This program is free software; you can redistribute it and/or modify it
6 under the terms of the GNU Library General Public License as published
7 by the Free Software Foundation; either version 2, or (at your option)
8 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 GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18 USA. */
19
20 /* The bison generated parser uses alloca. AIX 3 forces us to put this
21 declaration at the beginning of the file. The declaration in bison's
22 skeleton file comes too late. This must come before <config.h>
23 because <config.h> may include arbitrary system headers. */
24 #if defined _AIX && !defined __GNUC__
25 #pragma alloca
26 #endif
27
28 #ifdef HAVE_CONFIG_H
29 # include <config.h>
30 #endif
31
32 #include <stdlib.h>
33 #include "gettextP.h"
34
35 /* Names for the libintl functions are a problem. They must not clash
36 with existing names and they should follow ANSI C. But this source
37 code is also used in GNU C Library where the names have a __
38 prefix. So we have to make a difference here. */
39 #ifdef _LIBC
40 # define FREE_EXPRESSION __gettext_free_exp
41 #else
42 # define FREE_EXPRESSION gettext_free_exp__
43 # define __gettextparse gettextparse__
44 #endif
45
46 #define YYLEX_PARAM &((struct parse_args *) arg)->cp
47 #define YYPARSE_PARAM arg
48 %}
49 %pure_parser
50 %expect 10
51
52 %union {
53 unsigned long int num;
54 enum operator op;
55 struct expression *exp;
56 }
57
58 %{
59 /* Prototypes for local functions. */
60 static struct expression *new_exp PARAMS ((int nargs, enum operator op,
61 struct expression * const *args));
62 static inline struct expression *new_exp_0 PARAMS ((enum operator op));
63 static inline struct expression *new_exp_1 PARAMS ((enum operator op,
64 struct expression *right));
65 static struct expression *new_exp_2 PARAMS ((enum operator op,
66 struct expression *left,
67 struct expression *right));
68 static inline struct expression *new_exp_3 PARAMS ((enum operator op,
69 struct expression *bexp,
70 struct expression *tbranch,
71 struct expression *fbranch));
72 static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
73 static void yyerror PARAMS ((const char *str));
74
75 /* Allocation of expressions. */
76
77 static struct expression *
78 new_exp (nargs, op, args)
79 int nargs;
80 enum operator op;
81 struct expression * const *args;
82 {
83 int i;
84 struct expression *newp;
85
86 /* If any of the argument could not be malloc'ed, just return NULL. */
87 for (i = nargs - 1; i >= 0; i--)
88 if (args[i] == NULL)
89 goto fail;
90
91 /* Allocate a new expression. */
92 newp = (struct expression *) malloc (sizeof (*newp));
93 if (newp != NULL)
94 {
95 newp->nargs = nargs;
96 newp->operation = op;
97 for (i = nargs - 1; i >= 0; i--)
98 newp->val.args[i] = args[i];
99 return newp;
100 }
101
102 fail:
103 for (i = nargs - 1; i >= 0; i--)
104 FREE_EXPRESSION (args[i]);
105
106 return NULL;
107 }
108
109 static inline struct expression *
110 new_exp_0 (op)
111 enum operator op;
112 {
113 return new_exp (0, op, NULL);
114 }
115
116 static inline struct expression *
117 new_exp_1 (op, right)
118 enum operator op;
119 struct expression *right;
120 {
121 struct expression *args[1];
122
123 args[0] = right;
124 return new_exp (1, op, args);
125 }
126
127 static struct expression *
128 new_exp_2 (op, left, right)
129 enum operator op;
130 struct expression *left;
131 struct expression *right;
132 {
133 struct expression *args[2];
134
135 args[0] = left;
136 args[1] = right;
137 return new_exp (2, op, args);
138 }
139
140 static inline struct expression *
141 new_exp_3 (op, bexp, tbranch, fbranch)
142 enum operator op;
143 struct expression *bexp;
144 struct expression *tbranch;
145 struct expression *fbranch;
146 {
147 struct expression *args[3];
148
149 args[0] = bexp;
150 args[1] = tbranch;
151 args[2] = fbranch;
152 return new_exp (3, op, args);
153 }
154
155 %}
156
157 /* This declares that all operators have the same associativity and the
158 precedence order as in C. See [Harbison, Steele: C, A Reference Manual].
159 There is no unary minus and no bitwise operators.
160 Operators with the same syntactic behaviour have been merged into a single
161 token, to save space in the array generated by bison. */
162 %right '?' /* ? */
163 %left '|' /* || */
164 %left '&' /* && */
165 %left EQUOP2 /* == != */
166 %left CMPOP2 /* < > <= >= */
167 %left ADDOP2 /* + - */
168 %left MULOP2 /* * / % */
169 %right '!' /* ! */
170
171 %token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
172 %token <num> NUMBER
173 %type <exp> exp
174
175 %%
176
177 start: exp
178 {
179 if ($1 == NULL)
180 YYABORT;
181 ((struct parse_args *) arg)->res = $1;
182 }
183 ;
184
185 exp: exp '?' exp ':' exp
186 {
187 $$ = new_exp_3 (qmop, $1, $3, $5);
188 }
189 | exp '|' exp
190 {
191 $$ = new_exp_2 (lor, $1, $3);
192 }
193 | exp '&' exp
194 {
195 $$ = new_exp_2 (land, $1, $3);
196 }
197 | exp EQUOP2 exp
198 {
199 $$ = new_exp_2 ($2, $1, $3);
200 }
201 | exp CMPOP2 exp
202 {
203 $$ = new_exp_2 ($2, $1, $3);
204 }
205 | exp ADDOP2 exp
206 {
207 $$ = new_exp_2 ($2, $1, $3);
208 }
209 | exp MULOP2 exp
210 {
211 $$ = new_exp_2 ($2, $1, $3);
212 }
213 | '!' exp
214 {
215 $$ = new_exp_1 (lnot, $2);
216 }
217 | 'n'
218 {
219 $$ = new_exp_0 (var);
220 }
221 | NUMBER
222 {
223 if (($$ = new_exp_0 (num)) != NULL)
224 $$->val.num = $1;
225 }
226 | '(' exp ')'
227 {
228 $$ = $2;
229 }
230 ;
231
232 %%
233
234 void
235 internal_function
236 FREE_EXPRESSION (exp)
237 struct expression *exp;
238 {
239 if (exp == NULL)
240 return;
241
242 /* Handle the recursive case. */
243 switch (exp->nargs)
244 {
245 case 3:
246 FREE_EXPRESSION (exp->val.args[2]);
247 /* FALLTHROUGH */
248 case 2:
249 FREE_EXPRESSION (exp->val.args[1]);
250 /* FALLTHROUGH */
251 case 1:
252 FREE_EXPRESSION (exp->val.args[0]);
253 /* FALLTHROUGH */
254 default:
255 break;
256 }
257
258 free (exp);
259 }
260
261
262 static int
263 yylex (lval, pexp)
264 YYSTYPE *lval;
265 const char **pexp;
266 {
267 const char *exp = *pexp;
268 int result;
269
270 while (1)
271 {
272 if (exp[0] == '\0')
273 {
274 *pexp = exp;
275 return YYEOF;
276 }
277
278 if (exp[0] != ' ' && exp[0] != '\t')
279 break;
280
281 ++exp;
282 }
283
284 result = *exp++;
285 switch (result)
286 {
287 case '0': case '1': case '2': case '3': case '4':
288 case '5': case '6': case '7': case '8': case '9':
289 {
290 unsigned long int n = result - '0';
291 while (exp[0] >= '0' && exp[0] <= '9')
292 {
293 n *= 10;
294 n += exp[0] - '0';
295 ++exp;
296 }
297 lval->num = n;
298 result = NUMBER;
299 }
300 break;
301
302 case '=':
303 if (exp[0] == '=')
304 {
305 ++exp;
306 lval->op = equal;
307 result = EQUOP2;
308 }
309 else
310 result = YYERRCODE;
311 break;
312
313 case '!':
314 if (exp[0] == '=')
315 {
316 ++exp;
317 lval->op = not_equal;
318 result = EQUOP2;
319 }
320 break;
321
322 case '&':
323 case '|':
324 if (exp[0] == result)
325 ++exp;
326 else
327 result = YYERRCODE;
328 break;
329
330 case '<':
331 if (exp[0] == '=')
332 {
333 ++exp;
334 lval->op = less_or_equal;
335 }
336 else
337 lval->op = less_than;
338 result = CMPOP2;
339 break;
340
341 case '>':
342 if (exp[0] == '=')
343 {
344 ++exp;
345 lval->op = greater_or_equal;
346 }
347 else
348 lval->op = greater_than;
349 result = CMPOP2;
350 break;
351
352 case '*':
353 lval->op = mult;
354 result = MULOP2;
355 break;
356
357 case '/':
358 lval->op = divide;
359 result = MULOP2;
360 break;
361
362 case '%':
363 lval->op = module;
364 result = MULOP2;
365 break;
366
367 case '+':
368 lval->op = plus;
369 result = ADDOP2;
370 break;
371
372 case '-':
373 lval->op = minus;
374 result = ADDOP2;
375 break;
376
377 case 'n':
378 case '?':
379 case ':':
380 case '(':
381 case ')':
382 /* Nothing, just return the character. */
383 break;
384
385 case ';':
386 case '\n':
387 case '\0':
388 /* Be safe and let the user call this function again. */
389 --exp;
390 result = YYEOF;
391 break;
392
393 default:
394 result = YYERRCODE;
395 #if YYDEBUG != 0
396 --exp;
397 #endif
398 break;
399 }
400
401 *pexp = exp;
402
403 return result;
404 }
405
406
407 static void
408 yyerror (str)
409 const char *str;
410 {
411 /* Do nothing. We don't print error messages here. */
412 }
0 # Add this package to a list of references stored in a text file.
1 #
2 # Copyright (C) 2000 Free Software Foundation, Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU Library General Public License as published
6 # by the Free Software Foundation; either version 2, or (at your option)
7 # any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Library General Public License for more details.
13 #
14 # You should have received a copy of the GNU Library General Public
15 # License along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17 # USA.
18 #
19 # Written by Bruno Haible <haible@clisp.cons.org>.
20 #
21 /^# Packages using this file: / {
22 s/# Packages using this file://
23 ta
24 :a
25 s/ @PACKAGE@ / @PACKAGE@ /
26 tb
27 s/ $/ @PACKAGE@ /
28 :b
29 s/^/# Packages using this file:/
30 }
0 # Remove this package from a list of references stored in a text file.
1 #
2 # Copyright (C) 2000 Free Software Foundation, Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU Library General Public License as published
6 # by the Free Software Foundation; either version 2, or (at your option)
7 # any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Library General Public License for more details.
13 #
14 # You should have received a copy of the GNU Library General Public
15 # License along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17 # USA.
18 #
19 # Written by Bruno Haible <haible@clisp.cons.org>.
20 #
21 /^# Packages using this file: / {
22 s/# Packages using this file://
23 s/ @PACKAGE@ / /
24 s/^/# Packages using this file:/
25 }
0 /* Implementation of the textdomain(3) function.
1 Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 #ifdef HAVE_CONFIG_H
19 # include <config.h>
20 #endif
21
22 #include <stdlib.h>
23 #include <string.h>
24
25 #ifdef _LIBC
26 # include <libintl.h>
27 #else
28 # include "libgnuintl.h"
29 #endif
30 #include "gettextP.h"
31
32 #ifdef _LIBC
33 /* We have to handle multi-threaded applications. */
34 # include <bits/libc-lock.h>
35 #else
36 /* Provide dummy implementation if this is outside glibc. */
37 # define __libc_rwlock_define(CLASS, NAME)
38 # define __libc_rwlock_wrlock(NAME)
39 # define __libc_rwlock_unlock(NAME)
40 #endif
41
42 /* The internal variables in the standalone libintl.a must have different
43 names than the internal variables in GNU libc, otherwise programs
44 using libintl.a cannot be linked statically. */
45 #if !defined _LIBC
46 # define _nl_default_default_domain _nl_default_default_domain__
47 # define _nl_current_default_domain _nl_current_default_domain__
48 #endif
49
50 /* @@ end of prolog @@ */
51
52 /* Name of the default text domain. */
53 extern const char _nl_default_default_domain[];
54
55 /* Default text domain in which entries for gettext(3) are to be found. */
56 extern const char *_nl_current_default_domain;
57
58
59 /* Names for the libintl functions are a problem. They must not clash
60 with existing names and they should follow ANSI C. But this source
61 code is also used in GNU C Library where the names have a __
62 prefix. So we have to make a difference here. */
63 #ifdef _LIBC
64 # define TEXTDOMAIN __textdomain
65 # ifndef strdup
66 # define strdup(str) __strdup (str)
67 # endif
68 #else
69 # define TEXTDOMAIN textdomain__
70 #endif
71
72 /* Lock variable to protect the global data in the gettext implementation. */
73 __libc_rwlock_define (extern, _nl_state_lock)
74
75 /* Set the current default message catalog to DOMAINNAME.
76 If DOMAINNAME is null, return the current default.
77 If DOMAINNAME is "", reset to the default of "messages". */
78 char *
79 TEXTDOMAIN (domainname)
80 const char *domainname;
81 {
82 char *new_domain;
83 char *old_domain;
84
85 /* A NULL pointer requests the current setting. */
86 if (domainname == NULL)
87 return (char *) _nl_current_default_domain;
88
89 __libc_rwlock_wrlock (_nl_state_lock);
90
91 old_domain = (char *) _nl_current_default_domain;
92
93 /* If domain name is the null string set to default domain "messages". */
94 if (domainname[0] == '\0'
95 || strcmp (domainname, _nl_default_default_domain) == 0)
96 {
97 _nl_current_default_domain = _nl_default_default_domain;
98 new_domain = (char *) _nl_current_default_domain;
99 }
100 else if (strcmp (domainname, old_domain) == 0)
101 /* This can happen and people will use it to signal that some
102 environment variable changed. */
103 new_domain = old_domain;
104 else
105 {
106 /* If the following malloc fails `_nl_current_default_domain'
107 will be NULL. This value will be returned and so signals we
108 are out of core. */
109 #if defined _LIBC || defined HAVE_STRDUP
110 new_domain = strdup (domainname);
111 #else
112 size_t len = strlen (domainname) + 1;
113 new_domain = (char *) malloc (len);
114 if (new_domain != NULL)
115 memcpy (new_domain, domainname, len);
116 #endif
117
118 if (new_domain != NULL)
119 _nl_current_default_domain = new_domain;
120 }
121
122 /* We use this possibility to signal a change of the loaded catalogs
123 since this is most likely the case and there is no other easy we
124 to do it. Do it only when the call was successful. */
125 if (new_domain != NULL)
126 {
127 ++_nl_msg_cat_cntr;
128
129 if (old_domain != new_domain && old_domain != _nl_default_default_domain)
130 free (old_domain);
131 }
132
133 __libc_rwlock_unlock (_nl_state_lock);
134
135 return new_domain;
136 }
137
138 #ifdef _LIBC
139 /* Alias for function name in GNU C Library. */
140 weak_alias (__textdomain, textdomain);
141 #endif
0 prefix=/usr
1 exec_prefix=${prefix}
2 libdir=${exec_prefix}/lib
3 includedir=${prefix}/include
4
5 Name: libhdate
6 Description: A c/cpp library for hebrew dates
7 Version: @VERSION@
8 Libs: -L${libdir} -lm -lhdate
9 Cflags: -I${includedir}
0 Summary: A library that help use hebrew dates.
1 Name: libhdate
2 Version: 1.4.8
3 Release: 1
4 License: GPL
5 Group: System Environment/Libraries
6 Source: libhdate-%{version}.tar.gz
7
8 BuildRoot: /var/tmp/%{name}-buildroot
9
10 %description
11 LibHdate is a small C,C++ library for Hebrew dates,
12 holidays, and reading sequence (parasha). It is using
13 the source code from Amos Shapir's "hdate" package fixed and
14 patched by Nadav Har'El. The Torah reading sequence
15 is from tables by Zvi Har'El.
16
17 Install libhdate to use Hebrew dates,
18 or build applications that use them.
19
20 Yaacov Zamir <kzamir@walla.co.il>
21
22 %prep
23
24 %setup
25
26 %build
27 %configure --enable-python --enable-perl --enable-pascal --with-perl-sitelib-dir=/usr/lib/perl5/site_perl --with-python-sitelib-dir=/usr/lib/python2.4
28
29 %{__make} %{?_smp_mflags}
30
31 %install
32 %__make DESTDIR=$RPM_BUILD_ROOT install
33
34 # Remove duplicate docs (oron)
35 rm -rf $RPM_BUILD_ROOT/usr/doc
36 # Remove duplicate mans (kobi)
37 rm -rf $RPM_BUILD_ROOT/usr/man
38
39 %clean
40 %__rm -r $RPM_BUILD_ROOT
41
42 %files
43 %defattr(-,root,root)
44 %{_libdir}/libhdate.so*
45 %{_prefix}/share/locale/*
46 %{_bindir}/*
47 %{_prefix}/share/man/man1/*
48 %{_prefix}/share/doc/libhdate/README
49 %{_prefix}/share/doc/libhdate/hdate_README
50 %{_prefix}/share/doc/libhdate/COPYING
51 %{_prefix}/share/doc/libhdate/AUTHORS
52 %{_prefix}/share/doc/libhdate/ChangeLog
53 %{_prefix}/share/doc/libhdate/INSTALL
54 %{_prefix}/share/doc/libhdate/NEWS
55 %{_prefix}/share/doc/libhdate/TODO
56 %{_prefix}/share/doc/libhdate/USE
57 %{_prefix}/share/doc/libhdate/ABOUT-NLS
58
59 %doc hdate_README README AUTHORS NEWS USE ABOUT-NLS COPYING ChangeLog INSTALL TODO USE
60
61 %package devel
62 Summary: Development files for %{name}
63 Group: Development/Libraries
64 Requires: %{name} = %{version}
65
66 %description devel
67 This package contains headers and support files required
68 to build new applications with %{name}
69
70 %files devel
71 %defattr(-,root,root)
72 %{_libdir}/libhdate.a
73 %{_libdir}/libhdate.la
74 %{_includedir}/hdate.h
75 %{_includedir}/hdatepp.h
76 %{_libdir}/pkgconfig/*
77 %{_prefix}/share/man/man3/hdate.h.3.gz
78 %{_prefix}/share/man/man3/hdate_struct.3.gz
79 %{_prefix}/share/doc/libhdate/examples/*
80
81 %package python
82 Summary: Python binding for %{name}
83 Group: Development/Libraries
84 Requires: %{name} = %{version}
85
86 %description python
87 This package contains %{name} binding to python
88
89 %files python
90 %defattr(-,root,root)
91 %{_libdir}/python2.4/_hdate.so
92 %{_libdir}/python2.4/hdate.py
93
94 %package perl
95 Summary: Perl binding for %{name}
96 Group: Development/Libraries
97 Requires: %{name} = %{version}
98
99 %description perl
100 This package contains %{name} binding to perl
101
102 %files perl
103 %defattr(-,root,root)
104 %{_libdir}/perl5/site_perl/hdate.pm
105 %{_libdir}/perl5/site_perl/auto/hdate/hdate.so
106
107 %package pascal
108 Summary: free pascal binding for %{name}
109 Group: Development/Libraries
110 Requires: %{name} = %{version}
111
112 %description pascal
113 This package contains %{name} binding to free pascal
114
115 %files pascal
116 %defattr(-,root,root)
117 %{_libdir}/fpc/2.0.2/units/linux/hdate/*
118
119 %post
120 /sbin/ldconfig
121
122 %postun
123 /sbin/ldconfig
124
125 %changelog
126 * Fri Nov 25 2005 Oron Peled <oron@actcom.co.il>
127 - Fix ownership of -devel packages.
128
129 * Thu Mar 4 2005 Yaacov Zamir
130 - Add python and perl packages
131 - Add manfiles
132
133 * Thu Feb 24 2005 Oron Peled <oron@actcom.co.il>
134 - Split to normal runtime and -devel packages (like most
135 libraries do)
136 - Run ldconfig in post install/uninstall
137 - Remove duplicate documentation in /usr/doc (bad location
138 anyway)
139 - Run configure macro, so all dirs get their default values
140 - Use smp_mflags macro for build
141 - Change tagname from Copyright (deprecated) to License
142 - Format header tags and spell correction in description
0 Summary: A library that help use hebrew dates.
1 Name: libhdate
2 Version: @VERSION@
3 Release: 1
4 License: GPL
5 Group: System Environment/Libraries
6 Source: libhdate-%{version}.tar.gz
7
8 BuildRoot: /var/tmp/%{name}-buildroot
9
10 %description
11 LibHdate is a small C,C++ library for Hebrew dates,
12 holidays, and reading sequence (parasha). It is using
13 the source code from Amos Shapir's "hdate" package fixed and
14 patched by Nadav Har'El. The Torah reading sequence
15 is from tables by Zvi Har'El.
16
17 Install libhdate to use Hebrew dates,
18 or build applications that use them.
19
20 Yaacov Zamir <kzamir@walla.co.il>
21
22 %prep
23
24 %setup
25
26 %build
27 %configure --enable-python --enable-perl --enable-pascal --with-perl-sitelib-dir=/usr/lib/perl5/site_perl --with-python-sitelib-dir=/usr/lib/python@PY_VERSION@
28
29 %{__make} %{?_smp_mflags}
30
31 %install
32 %__make DESTDIR=$RPM_BUILD_ROOT install
33
34 # Remove duplicate docs (oron)
35 rm -rf $RPM_BUILD_ROOT/usr/doc
36 # Remove duplicate mans (kobi)
37 rm -rf $RPM_BUILD_ROOT/usr/man
38
39 %clean
40 %__rm -r $RPM_BUILD_ROOT
41
42 %files
43 %defattr(-,root,root)
44 %{_libdir}/libhdate.so*
45 %{_prefix}/share/locale/*
46 %{_bindir}/*
47 %{_prefix}/share/man/man1/*
48 %{_prefix}/share/doc/libhdate/README
49 %{_prefix}/share/doc/libhdate/hdate_README
50 %{_prefix}/share/doc/libhdate/COPYING
51 %{_prefix}/share/doc/libhdate/AUTHORS
52 %{_prefix}/share/doc/libhdate/ChangeLog
53 %{_prefix}/share/doc/libhdate/INSTALL
54 %{_prefix}/share/doc/libhdate/NEWS
55 %{_prefix}/share/doc/libhdate/TODO
56 %{_prefix}/share/doc/libhdate/USE
57 %{_prefix}/share/doc/libhdate/ABOUT-NLS
58
59 %doc hdate_README README AUTHORS NEWS USE ABOUT-NLS COPYING ChangeLog INSTALL TODO USE
60
61 %package devel
62 Summary: Development files for %{name}
63 Group: Development/Libraries
64 Requires: %{name} = %{version}
65
66 %description devel
67 This package contains headers and support files required
68 to build new applications with %{name}
69
70 %files devel
71 %defattr(-,root,root)
72 %{_libdir}/libhdate.a
73 %{_libdir}/libhdate.la
74 %{_includedir}/hdate.h
75 %{_includedir}/hdatepp.h
76 %{_libdir}/pkgconfig/*
77 %{_prefix}/share/man/man3/hdate.h.3.gz
78 %{_prefix}/share/man/man3/hdate_struct.3.gz
79 %{_prefix}/share/doc/libhdate/examples/*
80
81 %package python
82 Summary: Python binding for %{name}
83 Group: Development/Libraries
84 Requires: %{name} = %{version}
85
86 %description python
87 This package contains %{name} binding to python
88
89 %files python
90 %defattr(-,root,root)
91 %{_libdir}/python@PY_VERSION@/_hdate.so
92 %{_libdir}/python@PY_VERSION@/hdate.py
93
94 %package perl
95 Summary: Perl binding for %{name}
96 Group: Development/Libraries
97 Requires: %{name} = %{version}
98
99 %description perl
100 This package contains %{name} binding to perl
101
102 %files perl
103 %defattr(-,root,root)
104 %{_libdir}/perl5/site_perl/hdate.pm
105 %{_libdir}/perl5/site_perl/auto/hdate/hdate.so
106
107 %package pascal
108 Summary: free pascal binding for %{name}
109 Group: Development/Libraries
110 Requires: %{name} = %{version}
111
112 %description pascal
113 This package contains %{name} binding to free pascal
114
115 %files pascal
116 %defattr(-,root,root)
117 %{_libdir}/fpc/@PA_VERSION@/units/linux/hdate/*
118
119 %post
120 /sbin/ldconfig
121
122 %postun
123 /sbin/ldconfig
124
125 %changelog
126 * Fri Nov 25 2005 Oron Peled <oron@actcom.co.il>
127 - Fix ownership of -devel packages.
128
129 * Thu Mar 4 2005 Yaacov Zamir
130 - Add python and perl packages
131 - Add manfiles
132
133 * Thu Feb 24 2005 Oron Peled <oron@actcom.co.il>
134 - Split to normal runtime and -devel packages (like most
135 libraries do)
136 - Run ldconfig in post install/uninstall
137 - Remove duplicate documentation in /usr/doc (bad location
138 anyway)
139 - Run configure macro, so all dirs get their default values
140 - Use smp_mflags macro for build
141 - Change tagname from Copyright (deprecated) to License
142 - Format header tags and spell correction in description
0 # ltmain.sh - Provide generalized library-building support services.
1 # NOTE: Changing this file will not affect anything until you rerun configure.
2 #
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
4 # Free Software Foundation, Inc.
5 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
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 basename="s,^.*/,,g"
27
28 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
29 # is ksh but when the shell is invoked as "sh" and the current value of
30 # the _XPG environment variable is not equal to 1 (one), the special
31 # positional parameter $0, within a function call, is the name of the
32 # function.
33 progpath="$0"
34
35 # The name of this program:
36 progname=`echo "$progpath" | $SED $basename`
37 modename="$progname"
38
39 # Global variables:
40 EXIT_SUCCESS=0
41 EXIT_FAILURE=1
42
43 PROGRAM=ltmain.sh
44 PACKAGE=libtool
45 VERSION="1.5.22 Debian 1.5.22-2"
46 TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
47
48 # See if we are running on zsh, and set the options which allow our
49 # commands through without removal of \ escapes.
50 if test -n "${ZSH_VERSION+set}" ; then
51 setopt NO_GLOB_SUBST
52 fi
53
54 # Check that we have a working $echo.
55 if test "X$1" = X--no-reexec; then
56 # Discard the --no-reexec flag, and continue.
57 shift
58 elif test "X$1" = X--fallback-echo; then
59 # Avoid inline document here, it may be left over
60 :
61 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
62 # Yippee, $echo works!
63 :
64 else
65 # Restart under the correct shell, and then maybe $echo will work.
66 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
67 fi
68
69 if test "X$1" = X--fallback-echo; then
70 # used as fallback echo
71 shift
72 cat <<EOF
73 $*
74 EOF
75 exit $EXIT_SUCCESS
76 fi
77
78 default_mode=
79 help="Try \`$progname --help' for more information."
80 magic="%%%MAGIC variable%%%"
81 mkdir="mkdir"
82 mv="mv -f"
83 rm="rm -f"
84
85 # Sed substitution that helps us do robust quoting. It backslashifies
86 # metacharacters that are still active within double-quoted strings.
87 Xsed="${SED}"' -e 1s/^X//'
88 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
89 # test EBCDIC or ASCII
90 case `echo X|tr X '\101'` in
91 A) # ASCII based system
92 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
93 SP2NL='tr \040 \012'
94 NL2SP='tr \015\012 \040\040'
95 ;;
96 *) # EBCDIC based system
97 SP2NL='tr \100 \n'
98 NL2SP='tr \r\n \100\100'
99 ;;
100 esac
101
102 # NLS nuisances.
103 # Only set LANG and LC_ALL to C if already set.
104 # These must not be set unconditionally because not all systems understand
105 # e.g. LANG=C (notably SCO).
106 # We save the old values to restore during execute mode.
107 if test "${LC_ALL+set}" = set; then
108 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
109 fi
110 if test "${LANG+set}" = set; then
111 save_LANG="$LANG"; LANG=C; export LANG
112 fi
113
114 # Make sure IFS has a sensible default
115 lt_nl='
116 '
117 IFS=" $lt_nl"
118
119 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
120 $echo "$modename: not configured to build any kind of library" 1>&2
121 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
122 exit $EXIT_FAILURE
123 fi
124
125 # Global variables.
126 mode=$default_mode
127 nonopt=
128 prev=
129 prevopt=
130 run=
131 show="$echo"
132 show_help=
133 execute_dlfiles=
134 duplicate_deps=no
135 preserve_args=
136 lo2o="s/\\.lo\$/.${objext}/"
137 o2lo="s/\\.${objext}\$/.lo/"
138
139 #####################################
140 # Shell function definitions:
141 # This seems to be the best place for them
142
143 # func_mktempdir [string]
144 # Make a temporary directory that won't clash with other running
145 # libtool processes, and avoids race conditions if possible. If
146 # given, STRING is the basename for that directory.
147 func_mktempdir ()
148 {
149 my_template="${TMPDIR-/tmp}/${1-$progname}"
150
151 if test "$run" = ":"; then
152 # Return a directory name, but don't create it in dry-run mode
153 my_tmpdir="${my_template}-$$"
154 else
155
156 # If mktemp works, use that first and foremost
157 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
158
159 if test ! -d "$my_tmpdir"; then
160 # Failing that, at least try and use $RANDOM to avoid a race
161 my_tmpdir="${my_template}-${RANDOM-0}$$"
162
163 save_mktempdir_umask=`umask`
164 umask 0077
165 $mkdir "$my_tmpdir"
166 umask $save_mktempdir_umask
167 fi
168
169 # If we're not in dry-run mode, bomb out on failure
170 test -d "$my_tmpdir" || {
171 $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
172 exit $EXIT_FAILURE
173 }
174 fi
175
176 $echo "X$my_tmpdir" | $Xsed
177 }
178
179
180 # func_win32_libid arg
181 # return the library type of file 'arg'
182 #
183 # Need a lot of goo to handle *both* DLLs and import libs
184 # Has to be a shell function in order to 'eat' the argument
185 # that is supplied when $file_magic_command is called.
186 func_win32_libid ()
187 {
188 win32_libid_type="unknown"
189 win32_fileres=`file -L $1 2>/dev/null`
190 case $win32_fileres in
191 *ar\ archive\ import\ library*) # definitely import
192 win32_libid_type="x86 archive import"
193 ;;
194 *ar\ archive*) # could be an import, or static
195 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
196 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
197 win32_nmres=`eval $NM -f posix -A $1 | \
198 $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
199 case $win32_nmres in
200 import*) win32_libid_type="x86 archive import";;
201 *) win32_libid_type="x86 archive static";;
202 esac
203 fi
204 ;;
205 *DLL*)
206 win32_libid_type="x86 DLL"
207 ;;
208 *executable*) # but shell scripts are "executable" too...
209 case $win32_fileres in
210 *MS\ Windows\ PE\ Intel*)
211 win32_libid_type="x86 DLL"
212 ;;
213 esac
214 ;;
215 esac
216 $echo $win32_libid_type
217 }
218
219
220 # func_infer_tag arg
221 # Infer tagged configuration to use if any are available and
222 # if one wasn't chosen via the "--tag" command line option.
223 # Only attempt this if the compiler in the base compile
224 # command doesn't match the default compiler.
225 # arg is usually of the form 'gcc ...'
226 func_infer_tag ()
227 {
228 if test -n "$available_tags" && test -z "$tagname"; then
229 CC_quoted=
230 for arg in $CC; do
231 case $arg in
232 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
233 arg="\"$arg\""
234 ;;
235 esac
236 CC_quoted="$CC_quoted $arg"
237 done
238 case $@ in
239 # Blanks in the command may have been stripped by the calling shell,
240 # but not from the CC environment variable when configure was run.
241 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
242 # Blanks at the start of $base_compile will cause this to fail
243 # if we don't check for them as well.
244 *)
245 for z in $available_tags; do
246 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
247 # Evaluate the configuration.
248 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
249 CC_quoted=
250 for arg in $CC; do
251 # Double-quote args containing other shell metacharacters.
252 case $arg in
253 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
254 arg="\"$arg\""
255 ;;
256 esac
257 CC_quoted="$CC_quoted $arg"
258 done
259 case "$@ " in
260 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
261 # The compiler in the base compile command matches
262 # the one in the tagged configuration.
263 # Assume this is the tagged configuration we want.
264 tagname=$z
265 break
266 ;;
267 esac
268 fi
269 done
270 # If $tagname still isn't set, then no tagged configuration
271 # was found and let the user know that the "--tag" command
272 # line option must be used.
273 if test -z "$tagname"; then
274 $echo "$modename: unable to infer tagged configuration"
275 $echo "$modename: specify a tag with \`--tag'" 1>&2
276 exit $EXIT_FAILURE
277 # else
278 # $echo "$modename: using $tagname tagged configuration"
279 fi
280 ;;
281 esac
282 fi
283 }
284
285
286 # func_extract_an_archive dir oldlib
287 func_extract_an_archive ()
288 {
289 f_ex_an_ar_dir="$1"; shift
290 f_ex_an_ar_oldlib="$1"
291
292 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
293 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
294 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
295 :
296 else
297 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
298 exit $EXIT_FAILURE
299 fi
300 }
301
302 # func_extract_archives gentop oldlib ...
303 func_extract_archives ()
304 {
305 my_gentop="$1"; shift
306 my_oldlibs=${1+"$@"}
307 my_oldobjs=""
308 my_xlib=""
309 my_xabs=""
310 my_xdir=""
311 my_status=""
312
313 $show "${rm}r $my_gentop"
314 $run ${rm}r "$my_gentop"
315 $show "$mkdir $my_gentop"
316 $run $mkdir "$my_gentop"
317 my_status=$?
318 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
319 exit $my_status
320 fi
321
322 for my_xlib in $my_oldlibs; do
323 # Extract the objects.
324 case $my_xlib in
325 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
326 *) my_xabs=`pwd`"/$my_xlib" ;;
327 esac
328 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
329 my_xdir="$my_gentop/$my_xlib"
330
331 $show "${rm}r $my_xdir"
332 $run ${rm}r "$my_xdir"
333 $show "$mkdir $my_xdir"
334 $run $mkdir "$my_xdir"
335 exit_status=$?
336 if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
337 exit $exit_status
338 fi
339 case $host in
340 *-darwin*)
341 $show "Extracting $my_xabs"
342 # Do not bother doing anything if just a dry run
343 if test -z "$run"; then
344 darwin_orig_dir=`pwd`
345 cd $my_xdir || exit $?
346 darwin_archive=$my_xabs
347 darwin_curdir=`pwd`
348 darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
349 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
350 if test -n "$darwin_arches"; then
351 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
352 darwin_arch=
353 $show "$darwin_base_archive has multiple architectures $darwin_arches"
354 for darwin_arch in $darwin_arches ; do
355 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
356 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
357 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
358 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
359 cd "$darwin_curdir"
360 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
361 done # $darwin_arches
362 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
363 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
364 darwin_file=
365 darwin_files=
366 for darwin_file in $darwin_filelist; do
367 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
368 lipo -create -output "$darwin_file" $darwin_files
369 done # $darwin_filelist
370 ${rm}r unfat-$$
371 cd "$darwin_orig_dir"
372 else
373 cd "$darwin_orig_dir"
374 func_extract_an_archive "$my_xdir" "$my_xabs"
375 fi # $darwin_arches
376 fi # $run
377 ;;
378 *)
379 func_extract_an_archive "$my_xdir" "$my_xabs"
380 ;;
381 esac
382 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
383 done
384 func_extract_archives_result="$my_oldobjs"
385 }
386 # End of Shell function definitions
387 #####################################
388
389 # Darwin sucks
390 eval std_shrext=\"$shrext_cmds\"
391
392 disable_libs=no
393
394 # Parse our command line options once, thoroughly.
395 while test "$#" -gt 0
396 do
397 arg="$1"
398 shift
399
400 case $arg in
401 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
402 *) optarg= ;;
403 esac
404
405 # If the previous option needs an argument, assign it.
406 if test -n "$prev"; then
407 case $prev in
408 execute_dlfiles)
409 execute_dlfiles="$execute_dlfiles $arg"
410 ;;
411 tag)
412 tagname="$arg"
413 preserve_args="${preserve_args}=$arg"
414
415 # Check whether tagname contains only valid characters
416 case $tagname in
417 *[!-_A-Za-z0-9,/]*)
418 $echo "$progname: invalid tag name: $tagname" 1>&2
419 exit $EXIT_FAILURE
420 ;;
421 esac
422
423 case $tagname in
424 CC)
425 # Don't test for the "default" C tag, as we know, it's there, but
426 # not specially marked.
427 ;;
428 *)
429 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
430 taglist="$taglist $tagname"
431 # Evaluate the configuration.
432 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
433 else
434 $echo "$progname: ignoring unknown tag $tagname" 1>&2
435 fi
436 ;;
437 esac
438 ;;
439 *)
440 eval "$prev=\$arg"
441 ;;
442 esac
443
444 prev=
445 prevopt=
446 continue
447 fi
448
449 # Have we seen a non-optional argument yet?
450 case $arg in
451 --help)
452 show_help=yes
453 ;;
454
455 --version)
456 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
457 $echo
458 $echo "Copyright (C) 2005 Free Software Foundation, Inc."
459 $echo "This is free software; see the source for copying conditions. There is NO"
460 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
461 exit $?
462 ;;
463
464 --config)
465 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
466 # Now print the configurations for the tags.
467 for tagname in $taglist; do
468 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
469 done
470 exit $?
471 ;;
472
473 --debug)
474 $echo "$progname: enabling shell trace mode"
475 set -x
476 preserve_args="$preserve_args $arg"
477 ;;
478
479 --dry-run | -n)
480 run=:
481 ;;
482
483 --features)
484 $echo "host: $host"
485 if test "$build_libtool_libs" = yes; then
486 $echo "enable shared libraries"
487 else
488 $echo "disable shared libraries"
489 fi
490 if test "$build_old_libs" = yes; then
491 $echo "enable static libraries"
492 else
493 $echo "disable static libraries"
494 fi
495 exit $?
496 ;;
497
498 --finish) mode="finish" ;;
499
500 --mode) prevopt="--mode" prev=mode ;;
501 --mode=*) mode="$optarg" ;;
502
503 --preserve-dup-deps) duplicate_deps="yes" ;;
504
505 --quiet | --silent)
506 show=:
507 preserve_args="$preserve_args $arg"
508 ;;
509
510 --tag)
511 prevopt="--tag"
512 prev=tag
513 preserve_args="$preserve_args --tag"
514 ;;
515 --tag=*)
516 set tag "$optarg" ${1+"$@"}
517 shift
518 prev=tag
519 preserve_args="$preserve_args --tag"
520 ;;
521
522 -dlopen)
523 prevopt="-dlopen"
524 prev=execute_dlfiles
525 ;;
526
527 -*)
528 $echo "$modename: unrecognized option \`$arg'" 1>&2
529 $echo "$help" 1>&2
530 exit $EXIT_FAILURE
531 ;;
532
533 *)
534 nonopt="$arg"
535 break
536 ;;
537 esac
538 done
539
540 if test -n "$prevopt"; then
541 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
542 $echo "$help" 1>&2
543 exit $EXIT_FAILURE
544 fi
545
546 case $disable_libs in
547 no)
548 ;;
549 shared)
550 build_libtool_libs=no
551 build_old_libs=yes
552 ;;
553 static)
554 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
555 ;;
556 esac
557
558 # If this variable is set in any of the actions, the command in it
559 # will be execed at the end. This prevents here-documents from being
560 # left over by shells.
561 exec_cmd=
562
563 if test -z "$show_help"; then
564
565 # Infer the operation mode.
566 if test -z "$mode"; then
567 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
568 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
569 case $nonopt in
570 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
571 mode=link
572 for arg
573 do
574 case $arg in
575 -c)
576 mode=compile
577 break
578 ;;
579 esac
580 done
581 ;;
582 *db | *dbx | *strace | *truss)
583 mode=execute
584 ;;
585 *install*|cp|mv)
586 mode=install
587 ;;
588 *rm)
589 mode=uninstall
590 ;;
591 *)
592 # If we have no mode, but dlfiles were specified, then do execute mode.
593 test -n "$execute_dlfiles" && mode=execute
594
595 # Just use the default operation mode.
596 if test -z "$mode"; then
597 if test -n "$nonopt"; then
598 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
599 else
600 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
601 fi
602 fi
603 ;;
604 esac
605 fi
606
607 # Only execute mode is allowed to have -dlopen flags.
608 if test -n "$execute_dlfiles" && test "$mode" != execute; then
609 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
610 $echo "$help" 1>&2
611 exit $EXIT_FAILURE
612 fi
613
614 # Change the help message to a mode-specific one.
615 generic_help="$help"
616 help="Try \`$modename --help --mode=$mode' for more information."
617
618 # These modes are in order of execution frequency so that they run quickly.
619 case $mode in
620 # libtool compile mode
621 compile)
622 modename="$modename: compile"
623 # Get the compilation command and the source file.
624 base_compile=
625 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
626 suppress_opt=yes
627 suppress_output=
628 arg_mode=normal
629 libobj=
630 later=
631
632 for arg
633 do
634 case $arg_mode in
635 arg )
636 # do not "continue". Instead, add this to base_compile
637 lastarg="$arg"
638 arg_mode=normal
639 ;;
640
641 target )
642 libobj="$arg"
643 arg_mode=normal
644 continue
645 ;;
646
647 normal )
648 # Accept any command-line options.
649 case $arg in
650 -o)
651 if test -n "$libobj" ; then
652 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
653 exit $EXIT_FAILURE
654 fi
655 arg_mode=target
656 continue
657 ;;
658
659 -static | -prefer-pic | -prefer-non-pic)
660 later="$later $arg"
661 continue
662 ;;
663
664 -no-suppress)
665 suppress_opt=no
666 continue
667 ;;
668
669 -Xcompiler)
670 arg_mode=arg # the next one goes into the "base_compile" arg list
671 continue # The current "srcfile" will either be retained or
672 ;; # replaced later. I would guess that would be a bug.
673
674 -Wc,*)
675 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
676 lastarg=
677 save_ifs="$IFS"; IFS=','
678 for arg in $args; do
679 IFS="$save_ifs"
680
681 # Double-quote args containing other shell metacharacters.
682 # Many Bourne shells cannot handle close brackets correctly
683 # in scan sets, so we specify it separately.
684 case $arg in
685 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
686 arg="\"$arg\""
687 ;;
688 esac
689 lastarg="$lastarg $arg"
690 done
691 IFS="$save_ifs"
692 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
693
694 # Add the arguments to base_compile.
695 base_compile="$base_compile $lastarg"
696 continue
697 ;;
698
699 * )
700 # Accept the current argument as the source file.
701 # The previous "srcfile" becomes the current argument.
702 #
703 lastarg="$srcfile"
704 srcfile="$arg"
705 ;;
706 esac # case $arg
707 ;;
708 esac # case $arg_mode
709
710 # Aesthetically quote the previous argument.
711 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
712
713 case $lastarg in
714 # Double-quote args containing other shell metacharacters.
715 # Many Bourne shells cannot handle close brackets correctly
716 # in scan sets, and some SunOS ksh mistreat backslash-escaping
717 # in scan sets (worked around with variable expansion),
718 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
719 # at all, so we specify them separately.
720 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
721 lastarg="\"$lastarg\""
722 ;;
723 esac
724
725 base_compile="$base_compile $lastarg"
726 done # for arg
727
728 case $arg_mode in
729 arg)
730 $echo "$modename: you must specify an argument for -Xcompile"
731 exit $EXIT_FAILURE
732 ;;
733 target)
734 $echo "$modename: you must specify a target with \`-o'" 1>&2
735 exit $EXIT_FAILURE
736 ;;
737 *)
738 # Get the name of the library object.
739 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
740 ;;
741 esac
742
743 # Recognize several different file suffixes.
744 # If the user specifies -o file.o, it is replaced with file.lo
745 xform='[cCFSifmso]'
746 case $libobj in
747 *.ada) xform=ada ;;
748 *.adb) xform=adb ;;
749 *.ads) xform=ads ;;
750 *.asm) xform=asm ;;
751 *.c++) xform=c++ ;;
752 *.cc) xform=cc ;;
753 *.ii) xform=ii ;;
754 *.class) xform=class ;;
755 *.cpp) xform=cpp ;;
756 *.cxx) xform=cxx ;;
757 *.f90) xform=f90 ;;
758 *.for) xform=for ;;
759 *.java) xform=java ;;
760 esac
761
762 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
763
764 case $libobj in
765 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
766 *)
767 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
768 exit $EXIT_FAILURE
769 ;;
770 esac
771
772 func_infer_tag $base_compile
773
774 for arg in $later; do
775 case $arg in
776 -static)
777 build_old_libs=yes
778 continue
779 ;;
780
781 -prefer-pic)
782 pic_mode=yes
783 continue
784 ;;
785
786 -prefer-non-pic)
787 pic_mode=no
788 continue
789 ;;
790 esac
791 done
792
793 qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
794 case $qlibobj in
795 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
796 qlibobj="\"$qlibobj\"" ;;
797 esac
798 test "X$libobj" != "X$qlibobj" \
799 && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
800 && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
801 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
802 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
803 if test "X$xdir" = "X$obj"; then
804 xdir=
805 else
806 xdir=$xdir/
807 fi
808 lobj=${xdir}$objdir/$objname
809
810 if test -z "$base_compile"; then
811 $echo "$modename: you must specify a compilation command" 1>&2
812 $echo "$help" 1>&2
813 exit $EXIT_FAILURE
814 fi
815
816 # Delete any leftover library objects.
817 if test "$build_old_libs" = yes; then
818 removelist="$obj $lobj $libobj ${libobj}T"
819 else
820 removelist="$lobj $libobj ${libobj}T"
821 fi
822
823 $run $rm $removelist
824 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
825
826 # On Cygwin there's no "real" PIC flag so we must build both object types
827 case $host_os in
828 cygwin* | mingw* | pw32* | os2*)
829 pic_mode=default
830 ;;
831 esac
832 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
833 # non-PIC code in shared libraries is not supported
834 pic_mode=default
835 fi
836
837 # Calculate the filename of the output object if compiler does
838 # not support -o with -c
839 if test "$compiler_c_o" = no; then
840 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
841 lockfile="$output_obj.lock"
842 removelist="$removelist $output_obj $lockfile"
843 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
844 else
845 output_obj=
846 need_locks=no
847 lockfile=
848 fi
849
850 # Lock this critical section if it is needed
851 # We use this script file to make the link, it avoids creating a new file
852 if test "$need_locks" = yes; then
853 until $run ln "$progpath" "$lockfile" 2>/dev/null; do
854 $show "Waiting for $lockfile to be removed"
855 sleep 2
856 done
857 elif test "$need_locks" = warn; then
858 if test -f "$lockfile"; then
859 $echo "\
860 *** ERROR, $lockfile exists and contains:
861 `cat $lockfile 2>/dev/null`
862
863 This indicates that another process is trying to use the same
864 temporary object file, and libtool could not work around it because
865 your compiler does not support \`-c' and \`-o' together. If you
866 repeat this compilation, it may succeed, by chance, but you had better
867 avoid parallel builds (make -j) in this platform, or get a better
868 compiler."
869
870 $run $rm $removelist
871 exit $EXIT_FAILURE
872 fi
873 $echo "$srcfile" > "$lockfile"
874 fi
875
876 if test -n "$fix_srcfile_path"; then
877 eval srcfile=\"$fix_srcfile_path\"
878 fi
879 qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
880 case $qsrcfile in
881 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
882 qsrcfile="\"$qsrcfile\"" ;;
883 esac
884
885 $run $rm "$libobj" "${libobj}T"
886
887 # Create a libtool object file (analogous to a ".la" file),
888 # but don't create it if we're doing a dry run.
889 test -z "$run" && cat > ${libobj}T <<EOF
890 # $libobj - a libtool object file
891 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
892 #
893 # Please DO NOT delete this file!
894 # It is necessary for linking the library.
895
896 # Name of the PIC object.
897 EOF
898
899 # Only build a PIC object if we are building libtool libraries.
900 if test "$build_libtool_libs" = yes; then
901 # Without this assignment, base_compile gets emptied.
902 fbsd_hideous_sh_bug=$base_compile
903
904 if test "$pic_mode" != no; then
905 command="$base_compile $qsrcfile $pic_flag"
906 else
907 # Don't build PIC code
908 command="$base_compile $qsrcfile"
909 fi
910
911 if test ! -d "${xdir}$objdir"; then
912 $show "$mkdir ${xdir}$objdir"
913 $run $mkdir ${xdir}$objdir
914 exit_status=$?
915 if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
916 exit $exit_status
917 fi
918 fi
919
920 if test -z "$output_obj"; then
921 # Place PIC objects in $objdir
922 command="$command -o $lobj"
923 fi
924
925 $run $rm "$lobj" "$output_obj"
926
927 $show "$command"
928 if $run eval "$command"; then :
929 else
930 test -n "$output_obj" && $run $rm $removelist
931 exit $EXIT_FAILURE
932 fi
933
934 if test "$need_locks" = warn &&
935 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
936 $echo "\
937 *** ERROR, $lockfile contains:
938 `cat $lockfile 2>/dev/null`
939
940 but it should contain:
941 $srcfile
942
943 This indicates that another process is trying to use the same
944 temporary object file, and libtool could not work around it because
945 your compiler does not support \`-c' and \`-o' together. If you
946 repeat this compilation, it may succeed, by chance, but you had better
947 avoid parallel builds (make -j) in this platform, or get a better
948 compiler."
949
950 $run $rm $removelist
951 exit $EXIT_FAILURE
952 fi
953
954 # Just move the object if needed, then go on to compile the next one
955 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
956 $show "$mv $output_obj $lobj"
957 if $run $mv $output_obj $lobj; then :
958 else
959 error=$?
960 $run $rm $removelist
961 exit $error
962 fi
963 fi
964
965 # Append the name of the PIC object to the libtool object file.
966 test -z "$run" && cat >> ${libobj}T <<EOF
967 pic_object='$objdir/$objname'
968
969 EOF
970
971 # Allow error messages only from the first compilation.
972 if test "$suppress_opt" = yes; then
973 suppress_output=' >/dev/null 2>&1'
974 fi
975 else
976 # No PIC object so indicate it doesn't exist in the libtool
977 # object file.
978 test -z "$run" && cat >> ${libobj}T <<EOF
979 pic_object=none
980
981 EOF
982 fi
983
984 # Only build a position-dependent object if we build old libraries.
985 if test "$build_old_libs" = yes; then
986 if test "$pic_mode" != yes; then
987 # Don't build PIC code
988 command="$base_compile $qsrcfile"
989 else
990 command="$base_compile $qsrcfile $pic_flag"
991 fi
992 if test "$compiler_c_o" = yes; then
993 command="$command -o $obj"
994 fi
995
996 # Suppress compiler output if we already did a PIC compilation.
997 command="$command$suppress_output"
998 $run $rm "$obj" "$output_obj"
999 $show "$command"
1000 if $run eval "$command"; then :
1001 else
1002 $run $rm $removelist
1003 exit $EXIT_FAILURE
1004 fi
1005
1006 if test "$need_locks" = warn &&
1007 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1008 $echo "\
1009 *** ERROR, $lockfile contains:
1010 `cat $lockfile 2>/dev/null`
1011
1012 but it should contain:
1013 $srcfile
1014
1015 This indicates that another process is trying to use the same
1016 temporary object file, and libtool could not work around it because
1017 your compiler does not support \`-c' and \`-o' together. If you
1018 repeat this compilation, it may succeed, by chance, but you had better
1019 avoid parallel builds (make -j) in this platform, or get a better
1020 compiler."
1021
1022 $run $rm $removelist
1023 exit $EXIT_FAILURE
1024 fi
1025
1026 # Just move the object if needed
1027 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1028 $show "$mv $output_obj $obj"
1029 if $run $mv $output_obj $obj; then :
1030 else
1031 error=$?
1032 $run $rm $removelist
1033 exit $error
1034 fi
1035 fi
1036
1037 # Append the name of the non-PIC object the libtool object file.
1038 # Only append if the libtool object file exists.
1039 test -z "$run" && cat >> ${libobj}T <<EOF
1040 # Name of the non-PIC object.
1041 non_pic_object='$objname'
1042
1043 EOF
1044 else
1045 # Append the name of the non-PIC object the libtool object file.
1046 # Only append if the libtool object file exists.
1047 test -z "$run" && cat >> ${libobj}T <<EOF
1048 # Name of the non-PIC object.
1049 non_pic_object=none
1050
1051 EOF
1052 fi
1053
1054 $run $mv "${libobj}T" "${libobj}"
1055
1056 # Unlock the critical section if it was locked
1057 if test "$need_locks" != no; then
1058 $run $rm "$lockfile"
1059 fi
1060
1061 exit $EXIT_SUCCESS
1062 ;;
1063
1064 # libtool link mode
1065 link | relink)
1066 modename="$modename: link"
1067 case $host in
1068 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1069 # It is impossible to link a dll without this setting, and
1070 # we shouldn't force the makefile maintainer to figure out
1071 # which system we are compiling for in order to pass an extra
1072 # flag for every libtool invocation.
1073 # allow_undefined=no
1074
1075 # FIXME: Unfortunately, there are problems with the above when trying
1076 # to make a dll which has undefined symbols, in which case not
1077 # even a static library is built. For now, we need to specify
1078 # -no-undefined on the libtool link line when we can be certain
1079 # that all symbols are satisfied, otherwise we get a static library.
1080 allow_undefined=yes
1081 ;;
1082 *)
1083 allow_undefined=yes
1084 ;;
1085 esac
1086 libtool_args="$nonopt"
1087 base_compile="$nonopt $@"
1088 compile_command="$nonopt"
1089 finalize_command="$nonopt"
1090
1091 compile_rpath=
1092 finalize_rpath=
1093 compile_shlibpath=
1094 finalize_shlibpath=
1095 convenience=
1096 old_convenience=
1097 deplibs=
1098 old_deplibs=
1099 compiler_flags=
1100 linker_flags=
1101 dllsearchpath=
1102 lib_search_path=`pwd`
1103 inst_prefix_dir=
1104
1105 avoid_version=no
1106 dlfiles=
1107 dlprefiles=
1108 dlself=no
1109 export_dynamic=no
1110 export_symbols=
1111 export_symbols_regex=
1112 generated=
1113 libobjs=
1114 ltlibs=
1115 module=no
1116 no_install=no
1117 objs=
1118 non_pic_objects=
1119 notinst_path= # paths that contain not-installed libtool libraries
1120 precious_files_regex=
1121 prefer_static_libs=no
1122 preload=no
1123 prev=
1124 prevarg=
1125 release=
1126 rpath=
1127 xrpath=
1128 perm_rpath=
1129 temp_rpath=
1130 thread_safe=no
1131 vinfo=
1132 vinfo_number=no
1133
1134 func_infer_tag $base_compile
1135
1136 # We need to know -static, to get the right output filenames.
1137 for arg
1138 do
1139 case $arg in
1140 -all-static | -static)
1141 if test "X$arg" = "X-all-static"; then
1142 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1143 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1144 fi
1145 if test -n "$link_static_flag"; then
1146 dlopen_self=$dlopen_self_static
1147 fi
1148 prefer_static_libs=yes
1149 else
1150 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1151 dlopen_self=$dlopen_self_static
1152 fi
1153 prefer_static_libs=built
1154 fi
1155 build_libtool_libs=no
1156 build_old_libs=yes
1157 break
1158 ;;
1159 esac
1160 done
1161
1162 # See if our shared archives depend on static archives.
1163 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1164
1165 # Go through the arguments, transforming them on the way.
1166 while test "$#" -gt 0; do
1167 arg="$1"
1168 shift
1169 case $arg in
1170 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1171 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1172 ;;
1173 *) qarg=$arg ;;
1174 esac
1175 libtool_args="$libtool_args $qarg"
1176
1177 # If the previous option needs an argument, assign it.
1178 if test -n "$prev"; then
1179 case $prev in
1180 output)
1181 compile_command="$compile_command @OUTPUT@"
1182 finalize_command="$finalize_command @OUTPUT@"
1183 ;;
1184 esac
1185
1186 case $prev in
1187 dlfiles|dlprefiles)
1188 if test "$preload" = no; then
1189 # Add the symbol object into the linking commands.
1190 compile_command="$compile_command @SYMFILE@"
1191 finalize_command="$finalize_command @SYMFILE@"
1192 preload=yes
1193 fi
1194 case $arg in
1195 *.la | *.lo) ;; # We handle these cases below.
1196 force)
1197 if test "$dlself" = no; then
1198 dlself=needless
1199 export_dynamic=yes
1200 fi
1201 prev=
1202 continue
1203 ;;
1204 self)
1205 if test "$prev" = dlprefiles; then
1206 dlself=yes
1207 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1208 dlself=yes
1209 else
1210 dlself=needless
1211 export_dynamic=yes
1212 fi
1213 prev=
1214 continue
1215 ;;
1216 *)
1217 if test "$prev" = dlfiles; then
1218 dlfiles="$dlfiles $arg"
1219 else
1220 dlprefiles="$dlprefiles $arg"
1221 fi
1222 prev=
1223 continue
1224 ;;
1225 esac
1226 ;;
1227 expsyms)
1228 export_symbols="$arg"
1229 if test ! -f "$arg"; then
1230 $echo "$modename: symbol file \`$arg' does not exist"
1231 exit $EXIT_FAILURE
1232 fi
1233 prev=
1234 continue
1235 ;;
1236 expsyms_regex)
1237 export_symbols_regex="$arg"
1238 prev=
1239 continue
1240 ;;
1241 inst_prefix)
1242 inst_prefix_dir="$arg"
1243 prev=
1244 continue
1245 ;;
1246 precious_regex)
1247 precious_files_regex="$arg"
1248 prev=
1249 continue
1250 ;;
1251 release)
1252 release="-$arg"
1253 prev=
1254 continue
1255 ;;
1256 objectlist)
1257 if test -f "$arg"; then
1258 save_arg=$arg
1259 moreargs=
1260 for fil in `cat $save_arg`
1261 do
1262 # moreargs="$moreargs $fil"
1263 arg=$fil
1264 # A libtool-controlled object.
1265
1266 # Check to see that this really is a libtool object.
1267 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1268 pic_object=
1269 non_pic_object=
1270
1271 # Read the .lo file
1272 # If there is no directory component, then add one.
1273 case $arg in
1274 */* | *\\*) . $arg ;;
1275 *) . ./$arg ;;
1276 esac
1277
1278 if test -z "$pic_object" || \
1279 test -z "$non_pic_object" ||
1280 test "$pic_object" = none && \
1281 test "$non_pic_object" = none; then
1282 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1283 exit $EXIT_FAILURE
1284 fi
1285
1286 # Extract subdirectory from the argument.
1287 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1288 if test "X$xdir" = "X$arg"; then
1289 xdir=
1290 else
1291 xdir="$xdir/"
1292 fi
1293
1294 if test "$pic_object" != none; then
1295 # Prepend the subdirectory the object is found in.
1296 pic_object="$xdir$pic_object"
1297
1298 if test "$prev" = dlfiles; then
1299 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1300 dlfiles="$dlfiles $pic_object"
1301 prev=
1302 continue
1303 else
1304 # If libtool objects are unsupported, then we need to preload.
1305 prev=dlprefiles
1306 fi
1307 fi
1308
1309 # CHECK ME: I think I busted this. -Ossama
1310 if test "$prev" = dlprefiles; then
1311 # Preload the old-style object.
1312 dlprefiles="$dlprefiles $pic_object"
1313 prev=
1314 fi
1315
1316 # A PIC object.
1317 libobjs="$libobjs $pic_object"
1318 arg="$pic_object"
1319 fi
1320
1321 # Non-PIC object.
1322 if test "$non_pic_object" != none; then
1323 # Prepend the subdirectory the object is found in.
1324 non_pic_object="$xdir$non_pic_object"
1325
1326 # A standard non-PIC object
1327 non_pic_objects="$non_pic_objects $non_pic_object"
1328 if test -z "$pic_object" || test "$pic_object" = none ; then
1329 arg="$non_pic_object"
1330 fi
1331 else
1332 # If the PIC object exists, use it instead.
1333 # $xdir was prepended to $pic_object above.
1334 non_pic_object="$pic_object"
1335 non_pic_objects="$non_pic_objects $non_pic_object"
1336 fi
1337 else
1338 # Only an error if not doing a dry-run.
1339 if test -z "$run"; then
1340 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1341 exit $EXIT_FAILURE
1342 else
1343 # Dry-run case.
1344
1345 # Extract subdirectory from the argument.
1346 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1347 if test "X$xdir" = "X$arg"; then
1348 xdir=
1349 else
1350 xdir="$xdir/"
1351 fi
1352
1353 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1354 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1355 libobjs="$libobjs $pic_object"
1356 non_pic_objects="$non_pic_objects $non_pic_object"
1357 fi
1358 fi
1359 done
1360 else
1361 $echo "$modename: link input file \`$save_arg' does not exist"
1362 exit $EXIT_FAILURE
1363 fi
1364 arg=$save_arg
1365 prev=
1366 continue
1367 ;;
1368 rpath | xrpath)
1369 # We need an absolute path.
1370 case $arg in
1371 [\\/]* | [A-Za-z]:[\\/]*) ;;
1372 *)
1373 $echo "$modename: only absolute run-paths are allowed" 1>&2
1374 exit $EXIT_FAILURE
1375 ;;
1376 esac
1377 if test "$prev" = rpath; then
1378 case "$rpath " in
1379 *" $arg "*) ;;
1380 *) rpath="$rpath $arg" ;;
1381 esac
1382 else
1383 case "$xrpath " in
1384 *" $arg "*) ;;
1385 *) xrpath="$xrpath $arg" ;;
1386 esac
1387 fi
1388 prev=
1389 continue
1390 ;;
1391 xcompiler)
1392 compiler_flags="$compiler_flags $qarg"
1393 prev=
1394 compile_command="$compile_command $qarg"
1395 finalize_command="$finalize_command $qarg"
1396 continue
1397 ;;
1398 xlinker)
1399 linker_flags="$linker_flags $qarg"
1400 compiler_flags="$compiler_flags $wl$qarg"
1401 prev=
1402 compile_command="$compile_command $wl$qarg"
1403 finalize_command="$finalize_command $wl$qarg"
1404 continue
1405 ;;
1406 xcclinker)
1407 linker_flags="$linker_flags $qarg"
1408 compiler_flags="$compiler_flags $qarg"
1409 prev=
1410 compile_command="$compile_command $qarg"
1411 finalize_command="$finalize_command $qarg"
1412 continue
1413 ;;
1414 shrext)
1415 shrext_cmds="$arg"
1416 prev=
1417 continue
1418 ;;
1419 darwin_framework|darwin_framework_skip)
1420 test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
1421 compile_command="$compile_command $arg"
1422 finalize_command="$finalize_command $arg"
1423 prev=
1424 continue
1425 ;;
1426 *)
1427 eval "$prev=\"\$arg\""
1428 prev=
1429 continue
1430 ;;
1431 esac
1432 fi # test -n "$prev"
1433
1434 prevarg="$arg"
1435
1436 case $arg in
1437 -all-static)
1438 if test -n "$link_static_flag"; then
1439 compile_command="$compile_command $link_static_flag"
1440 finalize_command="$finalize_command $link_static_flag"
1441 fi
1442 continue
1443 ;;
1444
1445 -allow-undefined)
1446 # FIXME: remove this flag sometime in the future.
1447 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1448 continue
1449 ;;
1450
1451 -avoid-version)
1452 avoid_version=yes
1453 continue
1454 ;;
1455
1456 -dlopen)
1457 prev=dlfiles
1458 continue
1459 ;;
1460
1461 -dlpreopen)
1462 prev=dlprefiles
1463 continue
1464 ;;
1465
1466 -export-dynamic)
1467 export_dynamic=yes
1468 continue
1469 ;;
1470
1471 -export-symbols | -export-symbols-regex)
1472 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1473 $echo "$modename: more than one -exported-symbols argument is not allowed"
1474 exit $EXIT_FAILURE
1475 fi
1476 if test "X$arg" = "X-export-symbols"; then
1477 prev=expsyms
1478 else
1479 prev=expsyms_regex
1480 fi
1481 continue
1482 ;;
1483
1484 -framework|-arch|-isysroot)
1485 case " $CC " in
1486 *" ${arg} ${1} "* | *" ${arg} ${1} "*)
1487 prev=darwin_framework_skip ;;
1488 *) compiler_flags="$compiler_flags $arg"
1489 prev=darwin_framework ;;
1490 esac
1491 compile_command="$compile_command $arg"
1492 finalize_command="$finalize_command $arg"
1493 continue
1494 ;;
1495
1496 -inst-prefix-dir)
1497 prev=inst_prefix
1498 continue
1499 ;;
1500
1501 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1502 # so, if we see these flags be careful not to treat them like -L
1503 -L[A-Z][A-Z]*:*)
1504 case $with_gcc/$host in
1505 no/*-*-irix* | /*-*-irix*)
1506 compile_command="$compile_command $arg"
1507 finalize_command="$finalize_command $arg"
1508 ;;
1509 esac
1510 continue
1511 ;;
1512
1513 -L*)
1514 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1515 # We need an absolute path.
1516 case $dir in
1517 [\\/]* | [A-Za-z]:[\\/]*) ;;
1518 *)
1519 absdir=`cd "$dir" && pwd`
1520 if test -z "$absdir"; then
1521 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1522 absdir="$dir"
1523 notinst_path="$notinst_path $dir"
1524 fi
1525 dir="$absdir"
1526 ;;
1527 esac
1528 case "$deplibs " in
1529 *" -L$dir "*) ;;
1530 *)
1531 deplibs="$deplibs -L$dir"
1532 lib_search_path="$lib_search_path $dir"
1533 ;;
1534 esac
1535 case $host in
1536 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1537 testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1538 case :$dllsearchpath: in
1539 *":$dir:"*) ;;
1540 *) dllsearchpath="$dllsearchpath:$dir";;
1541 esac
1542 case :$dllsearchpath: in
1543 *":$testbindir:"*) ;;
1544 *) dllsearchpath="$dllsearchpath:$testbindir";;
1545 esac
1546 ;;
1547 esac
1548 continue
1549 ;;
1550
1551 -l*)
1552 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1553 case $host in
1554 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
1555 # These systems don't actually have a C or math library (as such)
1556 continue
1557 ;;
1558 *-*-os2*)
1559 # These systems don't actually have a C library (as such)
1560 test "X$arg" = "X-lc" && continue
1561 ;;
1562 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1563 # Do not include libc due to us having libc/libc_r.
1564 test "X$arg" = "X-lc" && continue
1565 ;;
1566 *-*-rhapsody* | *-*-darwin1.[012])
1567 # Rhapsody C and math libraries are in the System framework
1568 deplibs="$deplibs -framework System"
1569 continue
1570 ;;
1571 *-*-sco3.2v5* | *-*-sco5v6*)
1572 # Causes problems with __ctype
1573 test "X$arg" = "X-lc" && continue
1574 ;;
1575 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
1576 # Compiler inserts libc in the correct place for threads to work
1577 test "X$arg" = "X-lc" && continue
1578 ;;
1579 esac
1580 elif test "X$arg" = "X-lc_r"; then
1581 case $host in
1582 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1583 # Do not include libc_r directly, use -pthread flag.
1584 continue
1585 ;;
1586 esac
1587 fi
1588 deplibs="$deplibs $arg"
1589 continue
1590 ;;
1591
1592 # Tru64 UNIX uses -model [arg] to determine the layout of C++
1593 # classes, name mangling, and exception handling.
1594 -model)
1595 compile_command="$compile_command $arg"
1596 compiler_flags="$compiler_flags $arg"
1597 finalize_command="$finalize_command $arg"
1598 prev=xcompiler
1599 continue
1600 ;;
1601
1602 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1603 compiler_flags="$compiler_flags $arg"
1604 compile_command="$compile_command $arg"
1605 finalize_command="$finalize_command $arg"
1606 continue
1607 ;;
1608
1609 -module)
1610 module=yes
1611 continue
1612 ;;
1613
1614 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1615 # -r[0-9][0-9]* specifies the processor on the SGI compiler
1616 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1617 # +DA*, +DD* enable 64-bit mode on the HP compiler
1618 # -q* pass through compiler args for the IBM compiler
1619 # -m* pass through architecture-specific compiler args for GCC
1620 # -m*, -t[45]*, -txscale* pass through architecture-specific
1621 # compiler args for GCC
1622 # -pg pass through profiling flag for GCC
1623 # @file GCC response files
1624 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
1625 -t[45]*|-txscale*|@*)
1626
1627 # Unknown arguments in both finalize_command and compile_command need
1628 # to be aesthetically quoted because they are evaled later.
1629 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1630 case $arg in
1631 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1632 arg="\"$arg\""
1633 ;;
1634 esac
1635 compile_command="$compile_command $arg"
1636 finalize_command="$finalize_command $arg"
1637 compiler_flags="$compiler_flags $arg"
1638 continue
1639 ;;
1640
1641 -shrext)
1642 prev=shrext
1643 continue
1644 ;;
1645
1646 -no-fast-install)
1647 fast_install=no
1648 continue
1649 ;;
1650
1651 -no-install)
1652 case $host in
1653 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1654 # The PATH hackery in wrapper scripts is required on Windows
1655 # in order for the loader to find any dlls it needs.
1656 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1657 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1658 fast_install=no
1659 ;;
1660 *) no_install=yes ;;
1661 esac
1662 continue
1663 ;;
1664
1665 -no-undefined)
1666 allow_undefined=no
1667 continue
1668 ;;
1669
1670 -objectlist)
1671 prev=objectlist
1672 continue
1673 ;;
1674
1675 -o) prev=output ;;
1676
1677 -precious-files-regex)
1678 prev=precious_regex
1679 continue
1680 ;;
1681
1682 -release)
1683 prev=release
1684 continue
1685 ;;
1686
1687 -rpath)
1688 prev=rpath
1689 continue
1690 ;;
1691
1692 -R)
1693 prev=xrpath
1694 continue
1695 ;;
1696
1697 -R*)
1698 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1699 # We need an absolute path.
1700 case $dir in
1701 [\\/]* | [A-Za-z]:[\\/]*) ;;
1702 *)
1703 $echo "$modename: only absolute run-paths are allowed" 1>&2
1704 exit $EXIT_FAILURE
1705 ;;
1706 esac
1707 case "$xrpath " in
1708 *" $dir "*) ;;
1709 *) xrpath="$xrpath $dir" ;;
1710 esac
1711 continue
1712 ;;
1713
1714 -static)
1715 # The effects of -static are defined in a previous loop.
1716 # We used to do the same as -all-static on platforms that
1717 # didn't have a PIC flag, but the assumption that the effects
1718 # would be equivalent was wrong. It would break on at least
1719 # Digital Unix and AIX.
1720 continue
1721 ;;
1722
1723 -thread-safe)
1724 thread_safe=yes
1725 continue
1726 ;;
1727
1728 -version-info)
1729 prev=vinfo
1730 continue
1731 ;;
1732 -version-number)
1733 prev=vinfo
1734 vinfo_number=yes
1735 continue
1736 ;;
1737
1738 -Wc,*)
1739 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1740 arg=
1741 save_ifs="$IFS"; IFS=','
1742 for flag in $args; do
1743 IFS="$save_ifs"
1744 case $flag in
1745 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1746 flag="\"$flag\""
1747 ;;
1748 esac
1749 arg="$arg $wl$flag"
1750 compiler_flags="$compiler_flags $flag"
1751 done
1752 IFS="$save_ifs"
1753 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1754 ;;
1755
1756 -Wl,*)
1757 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1758 arg=
1759 save_ifs="$IFS"; IFS=','
1760 for flag in $args; do
1761 IFS="$save_ifs"
1762 case $flag in
1763 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1764 flag="\"$flag\""
1765 ;;
1766 esac
1767 arg="$arg $wl$flag"
1768 compiler_flags="$compiler_flags $wl$flag"
1769 linker_flags="$linker_flags $flag"
1770 done
1771 IFS="$save_ifs"
1772 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1773 ;;
1774
1775 -Xcompiler)
1776 prev=xcompiler
1777 continue
1778 ;;
1779
1780 -Xlinker)
1781 prev=xlinker
1782 continue
1783 ;;
1784
1785 -XCClinker)
1786 prev=xcclinker
1787 continue
1788 ;;
1789
1790 # Some other compiler flag.
1791 -* | +*)
1792 # Unknown arguments in both finalize_command and compile_command need
1793 # to be aesthetically quoted because they are evaled later.
1794 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1795 case $arg in
1796 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1797 arg="\"$arg\""
1798 ;;
1799 esac
1800 ;;
1801
1802 *.$objext)
1803 # A standard object.
1804 objs="$objs $arg"
1805 ;;
1806
1807 *.lo)
1808 # A libtool-controlled object.
1809
1810 # Check to see that this really is a libtool object.
1811 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1812 pic_object=
1813 non_pic_object=
1814
1815 # Read the .lo file
1816 # If there is no directory component, then add one.
1817 case $arg in
1818 */* | *\\*) . $arg ;;
1819 *) . ./$arg ;;
1820 esac
1821
1822 if test -z "$pic_object" || \
1823 test -z "$non_pic_object" ||
1824 test "$pic_object" = none && \
1825 test "$non_pic_object" = none; then
1826 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1827 exit $EXIT_FAILURE
1828 fi
1829
1830 # Extract subdirectory from the argument.
1831 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1832 if test "X$xdir" = "X$arg"; then
1833 xdir=
1834 else
1835 xdir="$xdir/"
1836 fi
1837
1838 if test "$pic_object" != none; then
1839 # Prepend the subdirectory the object is found in.
1840 pic_object="$xdir$pic_object"
1841
1842 if test "$prev" = dlfiles; then
1843 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1844 dlfiles="$dlfiles $pic_object"
1845 prev=
1846 continue
1847 else
1848 # If libtool objects are unsupported, then we need to preload.
1849 prev=dlprefiles
1850 fi
1851 fi
1852
1853 # CHECK ME: I think I busted this. -Ossama
1854 if test "$prev" = dlprefiles; then
1855 # Preload the old-style object.
1856 dlprefiles="$dlprefiles $pic_object"
1857 prev=
1858 fi
1859
1860 # A PIC object.
1861 libobjs="$libobjs $pic_object"
1862 arg="$pic_object"
1863 fi
1864
1865 # Non-PIC object.
1866 if test "$non_pic_object" != none; then
1867 # Prepend the subdirectory the object is found in.
1868 non_pic_object="$xdir$non_pic_object"
1869
1870 # A standard non-PIC object
1871 non_pic_objects="$non_pic_objects $non_pic_object"
1872 if test -z "$pic_object" || test "$pic_object" = none ; then
1873 arg="$non_pic_object"
1874 fi
1875 else
1876 # If the PIC object exists, use it instead.
1877 # $xdir was prepended to $pic_object above.
1878 non_pic_object="$pic_object"
1879 non_pic_objects="$non_pic_objects $non_pic_object"
1880 fi
1881 else
1882 # Only an error if not doing a dry-run.
1883 if test -z "$run"; then
1884 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1885 exit $EXIT_FAILURE
1886 else
1887 # Dry-run case.
1888
1889 # Extract subdirectory from the argument.
1890 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1891 if test "X$xdir" = "X$arg"; then
1892 xdir=
1893 else
1894 xdir="$xdir/"
1895 fi
1896
1897 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1898 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1899 libobjs="$libobjs $pic_object"
1900 non_pic_objects="$non_pic_objects $non_pic_object"
1901 fi
1902 fi
1903 ;;
1904
1905 *.$libext)
1906 # An archive.
1907 deplibs="$deplibs $arg"
1908 old_deplibs="$old_deplibs $arg"
1909 continue
1910 ;;
1911
1912 *.la)
1913 # A libtool-controlled library.
1914
1915 if test "$prev" = dlfiles; then
1916 # This library was specified with -dlopen.
1917 dlfiles="$dlfiles $arg"
1918 prev=
1919 elif test "$prev" = dlprefiles; then
1920 # The library was specified with -dlpreopen.
1921 dlprefiles="$dlprefiles $arg"
1922 prev=
1923 else
1924 deplibs="$deplibs $arg"
1925 fi
1926 continue
1927 ;;
1928
1929 # Some other compiler argument.
1930 *)
1931 # Unknown arguments in both finalize_command and compile_command need
1932 # to be aesthetically quoted because they are evaled later.
1933 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1934 case $arg in
1935 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1936 arg="\"$arg\""
1937 ;;
1938 esac
1939 ;;
1940 esac # arg
1941
1942 # Now actually substitute the argument into the commands.
1943 if test -n "$arg"; then
1944 compile_command="$compile_command $arg"
1945 finalize_command="$finalize_command $arg"
1946 fi
1947 done # argument parsing loop
1948
1949 if test -n "$prev"; then
1950 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1951 $echo "$help" 1>&2
1952 exit $EXIT_FAILURE
1953 fi
1954
1955 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1956 eval arg=\"$export_dynamic_flag_spec\"
1957 compile_command="$compile_command $arg"
1958 finalize_command="$finalize_command $arg"
1959 fi
1960
1961 oldlibs=
1962 # calculate the name of the file, without its directory
1963 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
1964 libobjs_save="$libobjs"
1965
1966 if test -n "$shlibpath_var"; then
1967 # get the directories listed in $shlibpath_var
1968 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
1969 else
1970 shlib_search_path=
1971 fi
1972 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
1973 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
1974
1975 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1976 if test "X$output_objdir" = "X$output"; then
1977 output_objdir="$objdir"
1978 else
1979 output_objdir="$output_objdir/$objdir"
1980 fi
1981 # Create the object directory.
1982 if test ! -d "$output_objdir"; then
1983 $show "$mkdir $output_objdir"
1984 $run $mkdir $output_objdir
1985 exit_status=$?
1986 if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
1987 exit $exit_status
1988 fi
1989 fi
1990
1991 # Determine the type of output
1992 case $output in
1993 "")
1994 $echo "$modename: you must specify an output file" 1>&2
1995 $echo "$help" 1>&2
1996 exit $EXIT_FAILURE
1997 ;;
1998 *.$libext) linkmode=oldlib ;;
1999 *.lo | *.$objext) linkmode=obj ;;
2000 *.la) linkmode=lib ;;
2001 *) linkmode=prog ;; # Anything else should be a program.
2002 esac
2003
2004 case $host in
2005 *cygwin* | *mingw* | *pw32*)
2006 # don't eliminate duplications in $postdeps and $predeps
2007 duplicate_compiler_generated_deps=yes
2008 ;;
2009 *)
2010 duplicate_compiler_generated_deps=$duplicate_deps
2011 ;;
2012 esac
2013 specialdeplibs=
2014
2015 libs=
2016 # Find all interdependent deplibs by searching for libraries
2017 # that are linked more than once (e.g. -la -lb -la)
2018 for deplib in $deplibs; do
2019 if test "X$duplicate_deps" = "Xyes" ; then
2020 case "$libs " in
2021 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2022 esac
2023 fi
2024 libs="$libs $deplib"
2025 done
2026
2027 if test "$linkmode" = lib; then
2028 libs="$predeps $libs $compiler_lib_search_path $postdeps"
2029
2030 # Compute libraries that are listed more than once in $predeps
2031 # $postdeps and mark them as special (i.e., whose duplicates are
2032 # not to be eliminated).
2033 pre_post_deps=
2034 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2035 for pre_post_dep in $predeps $postdeps; do
2036 case "$pre_post_deps " in
2037 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
2038 esac
2039 pre_post_deps="$pre_post_deps $pre_post_dep"
2040 done
2041 fi
2042 pre_post_deps=
2043 fi
2044
2045 deplibs=
2046 newdependency_libs=
2047 newlib_search_path=
2048 need_relink=no # whether we're linking any uninstalled libtool libraries
2049 notinst_deplibs= # not-installed libtool libraries
2050 case $linkmode in
2051 lib)
2052 passes="conv link"
2053 for file in $dlfiles $dlprefiles; do
2054 case $file in
2055 *.la) ;;
2056 *)
2057 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2058 exit $EXIT_FAILURE
2059 ;;
2060 esac
2061 done
2062 ;;
2063 prog)
2064 compile_deplibs=
2065 finalize_deplibs=
2066 alldeplibs=no
2067 newdlfiles=
2068 newdlprefiles=
2069 passes="conv scan dlopen dlpreopen link"
2070 ;;
2071 *) passes="conv"
2072 ;;
2073 esac
2074 for pass in $passes; do
2075 if test "$linkmode,$pass" = "lib,link" ||
2076 test "$linkmode,$pass" = "prog,scan"; then
2077 libs="$deplibs"
2078 deplibs=
2079 fi
2080 if test "$linkmode" = prog; then
2081 case $pass in
2082 dlopen) libs="$dlfiles" ;;
2083 dlpreopen) libs="$dlprefiles" ;;
2084 link)
2085 libs="$deplibs %DEPLIBS%"
2086 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
2087 ;;
2088 esac
2089 fi
2090 if test "$pass" = dlopen; then
2091 # Collect dlpreopened libraries
2092 save_deplibs="$deplibs"
2093 deplibs=
2094 fi
2095 for deplib in $libs; do
2096 lib=
2097 found=no
2098 case $deplib in
2099 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
2100 if test "$linkmode,$pass" = "prog,link"; then
2101 compile_deplibs="$deplib $compile_deplibs"
2102 finalize_deplibs="$deplib $finalize_deplibs"
2103 else
2104 compiler_flags="$compiler_flags $deplib"
2105 fi
2106 continue
2107 ;;
2108 -l*)
2109 if test "$linkmode" != lib && test "$linkmode" != prog; then
2110 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2111 continue
2112 fi
2113 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2114 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2115 for search_ext in .la $std_shrext .so .a; do
2116 # Search the libtool library
2117 lib="$searchdir/lib${name}${search_ext}"
2118 if test -f "$lib"; then
2119 if test "$search_ext" = ".la"; then
2120 found=yes
2121 else
2122 found=no
2123 fi
2124 break 2
2125 fi
2126 done
2127 done
2128 if test "$found" != yes; then
2129 # deplib doesn't seem to be a libtool library
2130 if test "$linkmode,$pass" = "prog,link"; then
2131 compile_deplibs="$deplib $compile_deplibs"
2132 finalize_deplibs="$deplib $finalize_deplibs"
2133 else
2134 deplibs="$deplib $deplibs"
2135 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2136 fi
2137 continue
2138 else # deplib is a libtool library
2139 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2140 # We need to do some special things here, and not later.
2141 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2142 case " $predeps $postdeps " in
2143 *" $deplib "*)
2144 if (${SED} -e '2q' $lib |
2145 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2146 library_names=
2147 old_library=
2148 case $lib in
2149 */* | *\\*) . $lib ;;
2150 *) . ./$lib ;;
2151 esac
2152 for l in $old_library $library_names; do
2153 ll="$l"
2154 done
2155 if test "X$ll" = "X$old_library" ; then # only static version available
2156 found=no
2157 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2158 test "X$ladir" = "X$lib" && ladir="."
2159 lib=$ladir/$old_library
2160 if test "$linkmode,$pass" = "prog,link"; then
2161 compile_deplibs="$deplib $compile_deplibs"
2162 finalize_deplibs="$deplib $finalize_deplibs"
2163 else
2164 deplibs="$deplib $deplibs"
2165 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2166 fi
2167 continue
2168 fi
2169 fi
2170 ;;
2171 *) ;;
2172 esac
2173 fi
2174 fi
2175 ;; # -l
2176 -L*)
2177 case $linkmode in
2178 lib)
2179 deplibs="$deplib $deplibs"
2180 test "$pass" = conv && continue
2181 newdependency_libs="$deplib $newdependency_libs"
2182 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2183 ;;
2184 prog)
2185 if test "$pass" = conv; then
2186 deplibs="$deplib $deplibs"
2187 continue
2188 fi
2189 if test "$pass" = scan; then
2190 deplibs="$deplib $deplibs"
2191 else
2192 compile_deplibs="$deplib $compile_deplibs"
2193 finalize_deplibs="$deplib $finalize_deplibs"
2194 fi
2195 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2196 ;;
2197 *)
2198 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2199 ;;
2200 esac # linkmode
2201 continue
2202 ;; # -L
2203 -R*)
2204 if test "$pass" = link; then
2205 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2206 # Make sure the xrpath contains only unique directories.
2207 case "$xrpath " in
2208 *" $dir "*) ;;
2209 *) xrpath="$xrpath $dir" ;;
2210 esac
2211 fi
2212 deplibs="$deplib $deplibs"
2213 continue
2214 ;;
2215 *.la) lib="$deplib" ;;
2216 *.$libext)
2217 if test "$pass" = conv; then
2218 deplibs="$deplib $deplibs"
2219 continue
2220 fi
2221 case $linkmode in
2222 lib)
2223 valid_a_lib=no
2224 case $deplibs_check_method in
2225 match_pattern*)
2226 set dummy $deplibs_check_method
2227 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2228 if eval $echo \"$deplib\" 2>/dev/null \
2229 | $SED 10q \
2230 | $EGREP "$match_pattern_regex" > /dev/null; then
2231 valid_a_lib=yes
2232 fi
2233 ;;
2234 pass_all)
2235 valid_a_lib=yes
2236 ;;
2237 esac
2238 if test "$valid_a_lib" != yes; then
2239 $echo
2240 $echo "*** Warning: Trying to link with static lib archive $deplib."
2241 $echo "*** I have the capability to make that library automatically link in when"
2242 $echo "*** you link to this library. But I can only do this if you have a"
2243 $echo "*** shared version of the library, which you do not appear to have"
2244 $echo "*** because the file extensions .$libext of this argument makes me believe"
2245 $echo "*** that it is just a static archive that I should not used here."
2246 else
2247 $echo
2248 $echo "*** Warning: Linking the shared library $output against the"
2249 $echo "*** static library $deplib is not portable!"
2250 deplibs="$deplib $deplibs"
2251 fi
2252 continue
2253 ;;
2254 prog)
2255 if test "$pass" != link; then
2256 deplibs="$deplib $deplibs"
2257 else
2258 compile_deplibs="$deplib $compile_deplibs"
2259 finalize_deplibs="$deplib $finalize_deplibs"
2260 fi
2261 continue
2262 ;;
2263 esac # linkmode
2264 ;; # *.$libext
2265 *.lo | *.$objext)
2266 if test "$pass" = conv; then
2267 deplibs="$deplib $deplibs"
2268 elif test "$linkmode" = prog; then
2269 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2270 # If there is no dlopen support or we're linking statically,
2271 # we need to preload.
2272 newdlprefiles="$newdlprefiles $deplib"
2273 compile_deplibs="$deplib $compile_deplibs"
2274 finalize_deplibs="$deplib $finalize_deplibs"
2275 else
2276 newdlfiles="$newdlfiles $deplib"
2277 fi
2278 fi
2279 continue
2280 ;;
2281 %DEPLIBS%)
2282 alldeplibs=yes
2283 continue
2284 ;;
2285 esac # case $deplib
2286 if test "$found" = yes || test -f "$lib"; then :
2287 else
2288 $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2289 exit $EXIT_FAILURE
2290 fi
2291
2292 # Check to see that this really is a libtool archive.
2293 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2294 else
2295 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2296 exit $EXIT_FAILURE
2297 fi
2298
2299 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2300 test "X$ladir" = "X$lib" && ladir="."
2301
2302 dlname=
2303 dlopen=
2304 dlpreopen=
2305 libdir=
2306 library_names=
2307 old_library=
2308 # If the library was installed with an old release of libtool,
2309 # it will not redefine variables installed, or shouldnotlink
2310 installed=yes
2311 shouldnotlink=no
2312 avoidtemprpath=
2313
2314
2315 # Read the .la file
2316 case $lib in
2317 */* | *\\*) . $lib ;;
2318 *) . ./$lib ;;
2319 esac
2320
2321 if test "$linkmode,$pass" = "lib,link" ||
2322 test "$linkmode,$pass" = "prog,scan" ||
2323 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
2324 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
2325 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
2326 fi
2327
2328 if test "$pass" = conv; then
2329 # Only check for convenience libraries
2330 deplibs="$lib $deplibs"
2331 if test -z "$libdir"; then
2332 if test -z "$old_library"; then
2333 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2334 exit $EXIT_FAILURE
2335 fi
2336 # It is a libtool convenience library, so add in its objects.
2337 convenience="$convenience $ladir/$objdir/$old_library"
2338 old_convenience="$old_convenience $ladir/$objdir/$old_library"
2339 tmp_libs=
2340 for deplib in $dependency_libs; do
2341 deplibs="$deplib $deplibs"
2342 if test "X$duplicate_deps" = "Xyes" ; then
2343 case "$tmp_libs " in
2344 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2345 esac
2346 fi
2347 tmp_libs="$tmp_libs $deplib"
2348 done
2349 elif test "$linkmode" != prog && test "$linkmode" != lib; then
2350 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2351 exit $EXIT_FAILURE
2352 fi
2353 continue
2354 fi # $pass = conv
2355
2356
2357 # Get the name of the library we link against.
2358 linklib=
2359 for l in $old_library $library_names; do
2360 linklib="$l"
2361 done
2362 if test -z "$linklib"; then
2363 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2364 exit $EXIT_FAILURE
2365 fi
2366
2367 # This library was specified with -dlopen.
2368 if test "$pass" = dlopen; then
2369 if test -z "$libdir"; then
2370 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2371 exit $EXIT_FAILURE
2372 fi
2373 if test -z "$dlname" ||
2374 test "$dlopen_support" != yes ||
2375 test "$build_libtool_libs" = no; then
2376 # If there is no dlname, no dlopen support or we're linking
2377 # statically, we need to preload. We also need to preload any
2378 # dependent libraries so libltdl's deplib preloader doesn't
2379 # bomb out in the load deplibs phase.
2380 dlprefiles="$dlprefiles $lib $dependency_libs"
2381 else
2382 newdlfiles="$newdlfiles $lib"
2383 fi
2384 continue
2385 fi # $pass = dlopen
2386
2387 # We need an absolute path.
2388 case $ladir in
2389 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
2390 *)
2391 abs_ladir=`cd "$ladir" && pwd`
2392 if test -z "$abs_ladir"; then
2393 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2394 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2395 abs_ladir="$ladir"
2396 fi
2397 ;;
2398 esac
2399 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2400
2401 # Find the relevant object directory and library name.
2402 if test "X$installed" = Xyes; then
2403 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2404 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2405 dir="$ladir"
2406 absdir="$abs_ladir"
2407 libdir="$abs_ladir"
2408 else
2409 dir="$libdir"
2410 absdir="$libdir"
2411 fi
2412 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2413 else
2414 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2415 dir="$ladir"
2416 absdir="$abs_ladir"
2417 # Remove this search path later
2418 notinst_path="$notinst_path $abs_ladir"
2419 else
2420 dir="$ladir/$objdir"
2421 absdir="$abs_ladir/$objdir"
2422 # Remove this search path later
2423 notinst_path="$notinst_path $abs_ladir"
2424 fi
2425 fi # $installed = yes
2426 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2427
2428 # This library was specified with -dlpreopen.
2429 if test "$pass" = dlpreopen; then
2430 if test -z "$libdir"; then
2431 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2432 exit $EXIT_FAILURE
2433 fi
2434 # Prefer using a static library (so that no silly _DYNAMIC symbols
2435 # are required to link).
2436 if test -n "$old_library"; then
2437 newdlprefiles="$newdlprefiles $dir/$old_library"
2438 # Otherwise, use the dlname, so that lt_dlopen finds it.
2439 elif test -n "$dlname"; then
2440 newdlprefiles="$newdlprefiles $dir/$dlname"
2441 else
2442 newdlprefiles="$newdlprefiles $dir/$linklib"
2443 fi
2444 fi # $pass = dlpreopen
2445
2446 if test -z "$libdir"; then
2447 # Link the convenience library
2448 if test "$linkmode" = lib; then
2449 deplibs="$dir/$old_library $deplibs"
2450 elif test "$linkmode,$pass" = "prog,link"; then
2451 compile_deplibs="$dir/$old_library $compile_deplibs"
2452 finalize_deplibs="$dir/$old_library $finalize_deplibs"
2453 else
2454 deplibs="$lib $deplibs" # used for prog,scan pass
2455 fi
2456 continue
2457 fi
2458
2459
2460 if test "$linkmode" = prog && test "$pass" != link; then
2461 newlib_search_path="$newlib_search_path $ladir"
2462 deplibs="$lib $deplibs"
2463
2464 linkalldeplibs=no
2465 if test "$link_all_deplibs" != no || test -z "$library_names" ||
2466 test "$build_libtool_libs" = no; then
2467 linkalldeplibs=yes
2468 fi
2469
2470 tmp_libs=
2471 for deplib in $dependency_libs; do
2472 case $deplib in
2473 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2474 esac
2475 # Need to link against all dependency_libs?
2476 if test "$linkalldeplibs" = yes; then
2477 deplibs="$deplib $deplibs"
2478 else
2479 # Need to hardcode shared library paths
2480 # or/and link against static libraries
2481 newdependency_libs="$deplib $newdependency_libs"
2482 fi
2483 if test "X$duplicate_deps" = "Xyes" ; then
2484 case "$tmp_libs " in
2485 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2486 esac
2487 fi
2488 tmp_libs="$tmp_libs $deplib"
2489 done # for deplib
2490 continue
2491 fi # $linkmode = prog...
2492
2493 if test "$linkmode,$pass" = "prog,link"; then
2494 if test -n "$library_names" &&
2495 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2496 # We need to hardcode the library path
2497 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2498 # Make sure the rpath contains only unique directories.
2499 case "$temp_rpath " in
2500 *" $dir "*) ;;
2501 *" $absdir "*) ;;
2502 *) temp_rpath="$temp_rpath $absdir" ;;
2503 esac
2504 fi
2505
2506 # Hardcode the library path.
2507 # Skip directories that are in the system default run-time
2508 # search path.
2509 case " $sys_lib_dlsearch_path " in
2510 *" $absdir "*) ;;
2511 *)
2512 case "$compile_rpath " in
2513 *" $absdir "*) ;;
2514 *) compile_rpath="$compile_rpath $absdir"
2515 esac
2516 ;;
2517 esac
2518 case " $sys_lib_dlsearch_path " in
2519 *" $libdir "*) ;;
2520 *)
2521 case "$finalize_rpath " in
2522 *" $libdir "*) ;;
2523 *) finalize_rpath="$finalize_rpath $libdir"
2524 esac
2525 ;;
2526 esac
2527 fi # $linkmode,$pass = prog,link...
2528
2529 if test "$alldeplibs" = yes &&
2530 { test "$deplibs_check_method" = pass_all ||
2531 { test "$build_libtool_libs" = yes &&
2532 test -n "$library_names"; }; }; then
2533 # We only need to search for static libraries
2534 continue
2535 fi
2536 fi
2537
2538 link_static=no # Whether the deplib will be linked statically
2539 use_static_libs=$prefer_static_libs
2540 if test "$use_static_libs" = built && test "$installed" = yes ; then
2541 use_static_libs=no
2542 fi
2543 if test -n "$library_names" &&
2544 { test "$use_static_libs" = no || test -z "$old_library"; }; then
2545 if test "$installed" = no; then
2546 notinst_deplibs="$notinst_deplibs $lib"
2547 need_relink=yes
2548 fi
2549 # This is a shared library
2550
2551 # Warn about portability, can't link against -module's on
2552 # some systems (darwin)
2553 if test "$shouldnotlink" = yes && test "$pass" = link ; then
2554 $echo
2555 if test "$linkmode" = prog; then
2556 $echo "*** Warning: Linking the executable $output against the loadable module"
2557 else
2558 $echo "*** Warning: Linking the shared library $output against the loadable module"
2559 fi
2560 $echo "*** $linklib is not portable!"
2561 fi
2562 if test "$linkmode" = lib &&
2563 test "$hardcode_into_libs" = yes; then
2564 # Hardcode the library path.
2565 # Skip directories that are in the system default run-time
2566 # search path.
2567 case " $sys_lib_dlsearch_path " in
2568 *" $absdir "*) ;;
2569 *)
2570 case "$compile_rpath " in
2571 *" $absdir "*) ;;
2572 *) compile_rpath="$compile_rpath $absdir"
2573 esac
2574 ;;
2575 esac
2576 case " $sys_lib_dlsearch_path " in
2577 *" $libdir "*) ;;
2578 *)
2579 case "$finalize_rpath " in
2580 *" $libdir "*) ;;
2581 *) finalize_rpath="$finalize_rpath $libdir"
2582 esac
2583 ;;
2584 esac
2585 fi
2586
2587 if test -n "$old_archive_from_expsyms_cmds"; then
2588 # figure out the soname
2589 set dummy $library_names
2590 realname="$2"
2591 shift; shift
2592 libname=`eval \\$echo \"$libname_spec\"`
2593 # use dlname if we got it. it's perfectly good, no?
2594 if test -n "$dlname"; then
2595 soname="$dlname"
2596 elif test -n "$soname_spec"; then
2597 # bleh windows
2598 case $host in
2599 *cygwin* | mingw*)
2600 major=`expr $current - $age`
2601 versuffix="-$major"
2602 ;;
2603 esac
2604 eval soname=\"$soname_spec\"
2605 else
2606 soname="$realname"
2607 fi
2608
2609 # Make a new name for the extract_expsyms_cmds to use
2610 soroot="$soname"
2611 soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
2612 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2613
2614 # If the library has no export list, then create one now
2615 if test -f "$output_objdir/$soname-def"; then :
2616 else
2617 $show "extracting exported symbol list from \`$soname'"
2618 save_ifs="$IFS"; IFS='~'
2619 cmds=$extract_expsyms_cmds
2620 for cmd in $cmds; do
2621 IFS="$save_ifs"
2622 eval cmd=\"$cmd\"
2623 $show "$cmd"
2624 $run eval "$cmd" || exit $?
2625 done
2626 IFS="$save_ifs"
2627 fi
2628
2629 # Create $newlib
2630 if test -f "$output_objdir/$newlib"; then :; else
2631 $show "generating import library for \`$soname'"
2632 save_ifs="$IFS"; IFS='~'
2633 cmds=$old_archive_from_expsyms_cmds
2634 for cmd in $cmds; do
2635 IFS="$save_ifs"
2636 eval cmd=\"$cmd\"
2637 $show "$cmd"
2638 $run eval "$cmd" || exit $?
2639 done
2640 IFS="$save_ifs"
2641 fi
2642 # make sure the library variables are pointing to the new library
2643 dir=$output_objdir
2644 linklib=$newlib
2645 fi # test -n "$old_archive_from_expsyms_cmds"
2646
2647 if test "$linkmode" = prog || test "$mode" != relink; then
2648 add_shlibpath=
2649 add_dir=
2650 add=
2651 lib_linked=yes
2652 case $hardcode_action in
2653 immediate | unsupported)
2654 if test "$hardcode_direct" = no; then
2655 add="$dir/$linklib"
2656 case $host in
2657 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
2658 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
2659 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
2660 *-*-unixware7*) add_dir="-L$dir" ;;
2661 *-*-darwin* )
2662 # if the lib is a module then we can not link against
2663 # it, someone is ignoring the new warnings I added
2664 if /usr/bin/file -L $add 2> /dev/null |
2665 $EGREP ": [^:]* bundle" >/dev/null ; then
2666 $echo "** Warning, lib $linklib is a module, not a shared library"
2667 if test -z "$old_library" ; then
2668 $echo
2669 $echo "** And there doesn't seem to be a static archive available"
2670 $echo "** The link will probably fail, sorry"
2671 else
2672 add="$dir/$old_library"
2673 fi
2674 fi
2675 esac
2676 elif test "$hardcode_minus_L" = no; then
2677 case $host in
2678 *-*-sunos*) add_shlibpath="$dir" ;;
2679 esac
2680 add_dir="-L$dir"
2681 add="-l$name"
2682 elif test "$hardcode_shlibpath_var" = no; then
2683 add_shlibpath="$dir"
2684 add="-l$name"
2685 else
2686 lib_linked=no
2687 fi
2688 ;;
2689 relink)
2690 if test "$hardcode_direct" = yes; then
2691 add="$dir/$linklib"
2692 elif test "$hardcode_minus_L" = yes; then
2693 add_dir="-L$dir"
2694 # Try looking first in the location we're being installed to.
2695 if test -n "$inst_prefix_dir"; then
2696 case $libdir in
2697 [\\/]*)
2698 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2699 ;;
2700 esac
2701 fi
2702 add="-l$name"
2703 elif test "$hardcode_shlibpath_var" = yes; then
2704 add_shlibpath="$dir"
2705 add="-l$name"
2706 else
2707 lib_linked=no
2708 fi
2709 ;;
2710 *) lib_linked=no ;;
2711 esac
2712
2713 if test "$lib_linked" != yes; then
2714 $echo "$modename: configuration error: unsupported hardcode properties"
2715 exit $EXIT_FAILURE
2716 fi
2717
2718 if test -n "$add_shlibpath"; then
2719 case :$compile_shlibpath: in
2720 *":$add_shlibpath:"*) ;;
2721 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
2722 esac
2723 fi
2724 if test "$linkmode" = prog; then
2725 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
2726 test -n "$add" && compile_deplibs="$add $compile_deplibs"
2727 else
2728 test -n "$add_dir" && deplibs="$add_dir $deplibs"
2729 test -n "$add" && deplibs="$add $deplibs"
2730 if test "$hardcode_direct" != yes && \
2731 test "$hardcode_minus_L" != yes && \
2732 test "$hardcode_shlibpath_var" = yes; then
2733 case :$finalize_shlibpath: in
2734 *":$libdir:"*) ;;
2735 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2736 esac
2737 fi
2738 fi
2739 fi
2740
2741 if test "$linkmode" = prog || test "$mode" = relink; then
2742 add_shlibpath=
2743 add_dir=
2744 add=
2745 # Finalize command for both is simple: just hardcode it.
2746 if test "$hardcode_direct" = yes; then
2747 add="$libdir/$linklib"
2748 elif test "$hardcode_minus_L" = yes; then
2749 add_dir="-L$libdir"
2750 add="-l$name"
2751 elif test "$hardcode_shlibpath_var" = yes; then
2752 case :$finalize_shlibpath: in
2753 *":$libdir:"*) ;;
2754 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2755 esac
2756 add="-l$name"
2757 elif test "$hardcode_automatic" = yes; then
2758 if test -n "$inst_prefix_dir" &&
2759 test -f "$inst_prefix_dir$libdir/$linklib" ; then
2760 add="$inst_prefix_dir$libdir/$linklib"
2761 else
2762 add="$libdir/$linklib"
2763 fi
2764 else
2765 # We cannot seem to hardcode it, guess we'll fake it.
2766 add_dir="-L$libdir"
2767 # Try looking first in the location we're being installed to.
2768 if test -n "$inst_prefix_dir"; then
2769 case $libdir in
2770 [\\/]*)
2771 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2772 ;;
2773 esac
2774 fi
2775 add="-l$name"
2776 fi
2777
2778 if test "$linkmode" = prog; then
2779 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
2780 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
2781 else
2782 test -n "$add_dir" && deplibs="$add_dir $deplibs"
2783 test -n "$add" && deplibs="$add $deplibs"
2784 fi
2785 fi
2786 elif test "$linkmode" = prog; then
2787 # Here we assume that one of hardcode_direct or hardcode_minus_L
2788 # is not unsupported. This is valid on all known static and
2789 # shared platforms.
2790 if test "$hardcode_direct" != unsupported; then
2791 test -n "$old_library" && linklib="$old_library"
2792 compile_deplibs="$dir/$linklib $compile_deplibs"
2793 finalize_deplibs="$dir/$linklib $finalize_deplibs"
2794 else
2795 compile_deplibs="-l$name -L$dir $compile_deplibs"
2796 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
2797 fi
2798 elif test "$build_libtool_libs" = yes; then
2799 # Not a shared library
2800 if test "$deplibs_check_method" != pass_all; then
2801 # We're trying link a shared library against a static one
2802 # but the system doesn't support it.
2803
2804 # Just print a warning and add the library to dependency_libs so
2805 # that the program can be linked against the static library.
2806 $echo
2807 $echo "*** Warning: This system can not link to static lib archive $lib."
2808 $echo "*** I have the capability to make that library automatically link in when"
2809 $echo "*** you link to this library. But I can only do this if you have a"
2810 $echo "*** shared version of the library, which you do not appear to have."
2811 if test "$module" = yes; then
2812 $echo "*** But as you try to build a module library, libtool will still create "
2813 $echo "*** a static module, that should work as long as the dlopening application"
2814 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
2815 if test -z "$global_symbol_pipe"; then
2816 $echo
2817 $echo "*** However, this would only work if libtool was able to extract symbol"
2818 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2819 $echo "*** not find such a program. So, this module is probably useless."
2820 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
2821 fi
2822 if test "$build_old_libs" = no; then
2823 build_libtool_libs=module
2824 build_old_libs=yes
2825 else
2826 build_libtool_libs=no
2827 fi
2828 fi
2829 else
2830 deplibs="$dir/$old_library $deplibs"
2831 link_static=yes
2832 fi
2833 fi # link shared/static library?
2834
2835 if test "$linkmode" = lib; then
2836 if test -n "$dependency_libs" &&
2837 { test "$hardcode_into_libs" != yes ||
2838 test "$build_old_libs" = yes ||
2839 test "$link_static" = yes; }; then
2840 # Extract -R from dependency_libs
2841 temp_deplibs=
2842 for libdir in $dependency_libs; do
2843 case $libdir in
2844 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2845 case " $xrpath " in
2846 *" $temp_xrpath "*) ;;
2847 *) xrpath="$xrpath $temp_xrpath";;
2848 esac;;
2849 *) temp_deplibs="$temp_deplibs $libdir";;
2850 esac
2851 done
2852 dependency_libs="$temp_deplibs"
2853 fi
2854
2855 newlib_search_path="$newlib_search_path $absdir"
2856 # Link against this library
2857 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
2858 # ... and its dependency_libs
2859 tmp_libs=
2860 for deplib in $dependency_libs; do
2861 newdependency_libs="$deplib $newdependency_libs"
2862 if test "X$duplicate_deps" = "Xyes" ; then
2863 case "$tmp_libs " in
2864 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2865 esac
2866 fi
2867 tmp_libs="$tmp_libs $deplib"
2868 done
2869
2870 if test "$link_all_deplibs" != no; then
2871 # Add the search paths of all dependency libraries
2872 for deplib in $dependency_libs; do
2873 case $deplib in
2874 -L*) path="$deplib" ;;
2875 *.la)
2876 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2877 test "X$dir" = "X$deplib" && dir="."
2878 # We need an absolute path.
2879 case $dir in
2880 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
2881 *)
2882 absdir=`cd "$dir" && pwd`
2883 if test -z "$absdir"; then
2884 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2885 absdir="$dir"
2886 fi
2887 ;;
2888 esac
2889 if grep "^installed=no" $deplib > /dev/null; then
2890 path="$absdir/$objdir"
2891 else
2892 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2893 if test -z "$libdir"; then
2894 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2895 exit $EXIT_FAILURE
2896 fi
2897 if test "$absdir" != "$libdir"; then
2898 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2899 fi
2900 path="$absdir"
2901 fi
2902 depdepl=
2903 case $host in
2904 *-*-darwin*)
2905 # we do not want to link against static libs,
2906 # but need to link against shared
2907 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
2908 if test -n "$deplibrary_names" ; then
2909 for tmp in $deplibrary_names ; do
2910 depdepl=$tmp
2911 done
2912 if test -f "$path/$depdepl" ; then
2913 depdepl="$path/$depdepl"
2914 fi
2915 # do not add paths which are already there
2916 case " $newlib_search_path " in
2917 *" $path "*) ;;
2918 *) newlib_search_path="$newlib_search_path $path";;
2919 esac
2920 fi
2921 path=""
2922 ;;
2923 *)
2924 path="-L$path"
2925 ;;
2926 esac
2927 ;;
2928 -l*)
2929 case $host in
2930 *-*-darwin*)
2931 # Again, we only want to link against shared libraries
2932 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
2933 for tmp in $newlib_search_path ; do
2934 if test -f "$tmp/lib$tmp_libs.dylib" ; then
2935 eval depdepl="$tmp/lib$tmp_libs.dylib"
2936 break
2937 fi
2938 done
2939 path=""
2940 ;;
2941 *) continue ;;
2942 esac
2943 ;;
2944 *) continue ;;
2945 esac
2946 case " $deplibs " in
2947 *" $path "*) ;;
2948 *) deplibs="$path $deplibs" ;;
2949 esac
2950 case " $deplibs " in
2951 *" $depdepl "*) ;;
2952 *) deplibs="$depdepl $deplibs" ;;
2953 esac
2954 done
2955 fi # link_all_deplibs != no
2956 fi # linkmode = lib
2957 done # for deplib in $libs
2958 dependency_libs="$newdependency_libs"
2959 if test "$pass" = dlpreopen; then
2960 # Link the dlpreopened libraries before other libraries
2961 for deplib in $save_deplibs; do
2962 deplibs="$deplib $deplibs"
2963 done
2964 fi
2965 if test "$pass" != dlopen; then
2966 if test "$pass" != conv; then
2967 # Make sure lib_search_path contains only unique directories.
2968 lib_search_path=
2969 for dir in $newlib_search_path; do
2970 case "$lib_search_path " in
2971 *" $dir "*) ;;
2972 *) lib_search_path="$lib_search_path $dir" ;;
2973 esac
2974 done
2975 newlib_search_path=
2976 fi
2977
2978 if test "$linkmode,$pass" != "prog,link"; then
2979 vars="deplibs"
2980 else
2981 vars="compile_deplibs finalize_deplibs"
2982 fi
2983 for var in $vars dependency_libs; do
2984 # Add libraries to $var in reverse order
2985 eval tmp_libs=\"\$$var\"
2986 new_libs=
2987 for deplib in $tmp_libs; do
2988 # FIXME: Pedantically, this is the right thing to do, so
2989 # that some nasty dependency loop isn't accidentally
2990 # broken:
2991 #new_libs="$deplib $new_libs"
2992 # Pragmatically, this seems to cause very few problems in
2993 # practice:
2994 case $deplib in
2995 -L*) new_libs="$deplib $new_libs" ;;
2996 -R*) ;;
2997 *)
2998 # And here is the reason: when a library appears more
2999 # than once as an explicit dependence of a library, or
3000 # is implicitly linked in more than once by the
3001 # compiler, it is considered special, and multiple
3002 # occurrences thereof are not removed. Compare this
3003 # with having the same library being listed as a
3004 # dependency of multiple other libraries: in this case,
3005 # we know (pedantically, we assume) the library does not
3006 # need to be listed more than once, so we keep only the
3007 # last copy. This is not always right, but it is rare
3008 # enough that we require users that really mean to play
3009 # such unportable linking tricks to link the library
3010 # using -Wl,-lname, so that libtool does not consider it
3011 # for duplicate removal.
3012 case " $specialdeplibs " in
3013 *" $deplib "*) new_libs="$deplib $new_libs" ;;
3014 *)
3015 case " $new_libs " in
3016 *" $deplib "*) ;;
3017 *) new_libs="$deplib $new_libs" ;;
3018 esac
3019 ;;
3020 esac
3021 ;;
3022 esac
3023 done
3024 tmp_libs=
3025 for deplib in $new_libs; do
3026 case $deplib in
3027 -L*)
3028 case " $tmp_libs " in
3029 *" $deplib "*) ;;
3030 *) tmp_libs="$tmp_libs $deplib" ;;
3031 esac
3032 ;;
3033 *) tmp_libs="$tmp_libs $deplib" ;;
3034 esac
3035 done
3036 eval $var=\"$tmp_libs\"
3037 done # for var
3038 fi
3039 # Last step: remove runtime libs from dependency_libs
3040 # (they stay in deplibs)
3041 tmp_libs=
3042 for i in $dependency_libs ; do
3043 case " $predeps $postdeps $compiler_lib_search_path " in
3044 *" $i "*)
3045 i=""
3046 ;;
3047 esac
3048 if test -n "$i" ; then
3049 tmp_libs="$tmp_libs $i"
3050 fi
3051 done
3052 dependency_libs=$tmp_libs
3053 done # for pass
3054 if test "$linkmode" = prog; then
3055 dlfiles="$newdlfiles"
3056 dlprefiles="$newdlprefiles"
3057 fi
3058
3059 case $linkmode in
3060 oldlib)
3061 if test -n "$deplibs"; then
3062 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3063 fi
3064
3065 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3066 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3067 fi
3068
3069 if test -n "$rpath"; then
3070 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3071 fi
3072
3073 if test -n "$xrpath"; then
3074 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3075 fi
3076
3077 if test -n "$vinfo"; then
3078 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3079 fi
3080
3081 if test -n "$release"; then
3082 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3083 fi
3084
3085 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
3086 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3087 fi
3088
3089 # Now set the variables for building old libraries.
3090 build_libtool_libs=no
3091 oldlibs="$output"
3092 objs="$objs$old_deplibs"
3093 ;;
3094
3095 lib)
3096 # Make sure we only generate libraries of the form `libNAME.la'.
3097 case $outputname in
3098 lib*)
3099 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3100 eval shared_ext=\"$shrext_cmds\"
3101 eval libname=\"$libname_spec\"
3102 ;;
3103 *)
3104 if test "$module" = no; then
3105 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3106 $echo "$help" 1>&2
3107 exit $EXIT_FAILURE
3108 fi
3109 if test "$need_lib_prefix" != no; then
3110 # Add the "lib" prefix for modules if required
3111 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3112 eval shared_ext=\"$shrext_cmds\"
3113 eval libname=\"$libname_spec\"
3114 else
3115 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3116 fi
3117 ;;
3118 esac
3119
3120 if test -n "$objs"; then
3121 if test "$deplibs_check_method" != pass_all; then
3122 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3123 exit $EXIT_FAILURE
3124 else
3125 $echo
3126 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3127 $echo "*** objects $objs is not portable!"
3128 libobjs="$libobjs $objs"
3129 fi
3130 fi
3131
3132 if test "$dlself" != no; then
3133 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3134 fi
3135
3136 set dummy $rpath
3137 if test "$#" -gt 2; then
3138 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3139 fi
3140 install_libdir="$2"
3141
3142 oldlibs=
3143 if test -z "$rpath"; then
3144 if test "$build_libtool_libs" = yes; then
3145 # Building a libtool convenience library.
3146 # Some compilers have problems with a `.al' extension so
3147 # convenience libraries should have the same extension an
3148 # archive normally would.
3149 oldlibs="$output_objdir/$libname.$libext $oldlibs"
3150 build_libtool_libs=convenience
3151 build_old_libs=yes
3152 fi
3153
3154 if test -n "$vinfo"; then
3155 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3156 fi
3157
3158 if test -n "$release"; then
3159 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3160 fi
3161 else
3162
3163 # Parse the version information argument.
3164 save_ifs="$IFS"; IFS=':'
3165 set dummy $vinfo 0 0 0
3166 IFS="$save_ifs"
3167
3168 if test -n "$8"; then
3169 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3170 $echo "$help" 1>&2
3171 exit $EXIT_FAILURE
3172 fi
3173
3174 # convert absolute version numbers to libtool ages
3175 # this retains compatibility with .la files and attempts
3176 # to make the code below a bit more comprehensible
3177
3178 case $vinfo_number in
3179 yes)
3180 number_major="$2"
3181 number_minor="$3"
3182 number_revision="$4"
3183 #
3184 # There are really only two kinds -- those that
3185 # use the current revision as the major version
3186 # and those that subtract age and use age as
3187 # a minor version. But, then there is irix
3188 # which has an extra 1 added just for fun
3189 #
3190 case $version_type in
3191 darwin|linux|osf|windows)
3192 current=`expr $number_major + $number_minor`
3193 age="$number_minor"
3194 revision="$number_revision"
3195 ;;
3196 freebsd-aout|freebsd-elf|sunos)
3197 current="$number_major"
3198 revision="$number_minor"
3199 age="0"
3200 ;;
3201 irix|nonstopux)
3202 current=`expr $number_major + $number_minor - 1`
3203 age="$number_minor"
3204 revision="$number_minor"
3205 ;;
3206 *)
3207 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3208 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3209 exit $EXIT_FAILURE
3210 ;;
3211 esac
3212 ;;
3213 no)
3214 current="$2"
3215 revision="$3"
3216 age="$4"
3217 ;;
3218 esac
3219
3220 # Check that each of the things are valid numbers.
3221 case $current in
3222 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3223 *)
3224 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3225 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3226 exit $EXIT_FAILURE
3227 ;;
3228 esac
3229
3230 case $revision in
3231 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3232 *)
3233 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3234 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3235 exit $EXIT_FAILURE
3236 ;;
3237 esac
3238
3239 case $age in
3240 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3241 *)
3242 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
3243 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3244 exit $EXIT_FAILURE
3245 ;;
3246 esac
3247
3248 if test "$age" -gt "$current"; then
3249 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3250 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3251 exit $EXIT_FAILURE
3252 fi
3253
3254 # Calculate the version variables.
3255 major=
3256 versuffix=
3257 verstring=
3258 case $version_type in
3259 none) ;;
3260
3261 darwin)
3262 # Like Linux, but with the current version available in
3263 # verstring for coding it into the library header
3264 major=.`expr $current - $age`
3265 versuffix="$major.$age.$revision"
3266 # Darwin ld doesn't like 0 for these options...
3267 minor_current=`expr $current + 1`
3268 verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3269 ;;
3270
3271 freebsd-aout)
3272 major=".$current"
3273 versuffix=".$current.$revision";
3274 ;;
3275
3276 freebsd-elf)
3277 major=".$current"
3278 versuffix=".$current";
3279 ;;
3280
3281 irix | nonstopux)
3282 major=`expr $current - $age + 1`
3283
3284 case $version_type in
3285 nonstopux) verstring_prefix=nonstopux ;;
3286 *) verstring_prefix=sgi ;;
3287 esac
3288 verstring="$verstring_prefix$major.$revision"
3289
3290 # Add in all the interfaces that we are compatible with.
3291 loop=$revision
3292 while test "$loop" -ne 0; do
3293 iface=`expr $revision - $loop`
3294 loop=`expr $loop - 1`
3295 verstring="$verstring_prefix$major.$iface:$verstring"
3296 done
3297
3298 # Before this point, $major must not contain `.'.
3299 major=.$major
3300 versuffix="$major.$revision"
3301 ;;
3302
3303 linux)
3304 major=.`expr $current - $age`
3305 versuffix="$major.$age.$revision"
3306 ;;
3307
3308 osf)
3309 major=.`expr $current - $age`
3310 versuffix=".$current.$age.$revision"
3311 verstring="$current.$age.$revision"
3312
3313 # Add in all the interfaces that we are compatible with.
3314 loop=$age
3315 while test "$loop" -ne 0; do
3316 iface=`expr $current - $loop`
3317 loop=`expr $loop - 1`
3318 verstring="$verstring:${iface}.0"
3319 done
3320
3321 # Make executables depend on our current version.
3322 verstring="$verstring:${current}.0"
3323 ;;
3324
3325 sunos)
3326 major=".$current"
3327 versuffix=".$current.$revision"
3328 ;;
3329
3330 windows)
3331 # Use '-' rather than '.', since we only want one
3332 # extension on DOS 8.3 filesystems.
3333 major=`expr $current - $age`
3334 versuffix="-$major"
3335 ;;
3336
3337 *)
3338 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3339 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3340 exit $EXIT_FAILURE
3341 ;;
3342 esac
3343
3344 # Clear the version info if we defaulted, and they specified a release.
3345 if test -z "$vinfo" && test -n "$release"; then
3346 major=
3347 case $version_type in
3348 darwin)
3349 # we can't check for "0.0" in archive_cmds due to quoting
3350 # problems, so we reset it completely
3351 verstring=
3352 ;;
3353 *)
3354 verstring="0.0"
3355 ;;
3356 esac
3357 if test "$need_version" = no; then
3358 versuffix=
3359 else
3360 versuffix=".0.0"
3361 fi
3362 fi
3363
3364 # Remove version info from name if versioning should be avoided
3365 if test "$avoid_version" = yes && test "$need_version" = no; then
3366 major=
3367 versuffix=
3368 verstring=""
3369 fi
3370
3371 # Check to see if the archive will have undefined symbols.
3372 if test "$allow_undefined" = yes; then
3373 if test "$allow_undefined_flag" = unsupported; then
3374 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3375 build_libtool_libs=no
3376 build_old_libs=yes
3377 fi
3378 else
3379 # Don't allow undefined symbols.
3380 allow_undefined_flag="$no_undefined_flag"
3381 fi
3382 fi
3383
3384 if test "$mode" != relink; then
3385 # Remove our outputs, but don't remove object files since they
3386 # may have been created when compiling PIC objects.
3387 removelist=
3388 tempremovelist=`$echo "$output_objdir/*"`
3389 for p in $tempremovelist; do
3390 case $p in
3391 *.$objext)
3392 ;;
3393 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3394 if test "X$precious_files_regex" != "X"; then
3395 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
3396 then
3397 continue
3398 fi
3399 fi
3400 removelist="$removelist $p"
3401 ;;
3402 *) ;;
3403 esac
3404 done
3405 if test -n "$removelist"; then
3406 $show "${rm}r $removelist"
3407 $run ${rm}r $removelist
3408 fi
3409 fi
3410
3411 # Now set the variables for building old libraries.
3412 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
3413 oldlibs="$oldlibs $output_objdir/$libname.$libext"
3414
3415 # Transform .lo files to .o files.
3416 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3417 fi
3418
3419 # Eliminate all temporary directories.
3420 for path in $notinst_path; do
3421 lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3422 deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3423 dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3424 done
3425
3426 if test -n "$xrpath"; then
3427 # If the user specified any rpath flags, then add them.
3428 temp_xrpath=
3429 for libdir in $xrpath; do
3430 temp_xrpath="$temp_xrpath -R$libdir"
3431 case "$finalize_rpath " in
3432 *" $libdir "*) ;;
3433 *) finalize_rpath="$finalize_rpath $libdir" ;;
3434 esac
3435 done
3436 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
3437 dependency_libs="$temp_xrpath $dependency_libs"
3438 fi
3439 fi
3440
3441 # Make sure dlfiles contains only unique files that won't be dlpreopened
3442 old_dlfiles="$dlfiles"
3443 dlfiles=
3444 for lib in $old_dlfiles; do
3445 case " $dlprefiles $dlfiles " in
3446 *" $lib "*) ;;
3447 *) dlfiles="$dlfiles $lib" ;;
3448 esac
3449 done
3450
3451 # Make sure dlprefiles contains only unique files
3452 old_dlprefiles="$dlprefiles"
3453 dlprefiles=
3454 for lib in $old_dlprefiles; do
3455 case "$dlprefiles " in
3456 *" $lib "*) ;;
3457 *) dlprefiles="$dlprefiles $lib" ;;
3458 esac
3459 done
3460
3461 if test "$build_libtool_libs" = yes; then
3462 if test -n "$rpath"; then
3463 case $host in
3464 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
3465 # these systems don't actually have a c library (as such)!
3466 ;;
3467 *-*-rhapsody* | *-*-darwin1.[012])
3468 # Rhapsody C library is in the System framework
3469 deplibs="$deplibs -framework System"
3470 ;;
3471 *-*-netbsd*)
3472 # Don't link with libc until the a.out ld.so is fixed.
3473 ;;
3474 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3475 # Do not include libc due to us having libc/libc_r.
3476 ;;
3477 *-*-sco3.2v5* | *-*-sco5v6*)
3478 # Causes problems with __ctype
3479 ;;
3480 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
3481 # Compiler inserts libc in the correct place for threads to work
3482 ;;
3483 *)
3484 # Add libc to deplibs on all other systems if necessary.
3485 if test "$build_libtool_need_lc" = "yes"; then
3486 deplibs="$deplibs -lc"
3487 fi
3488 ;;
3489 esac
3490 fi
3491
3492 # Transform deplibs into only deplibs that can be linked in shared.
3493 name_save=$name
3494 libname_save=$libname
3495 release_save=$release
3496 versuffix_save=$versuffix
3497 major_save=$major
3498 # I'm not sure if I'm treating the release correctly. I think
3499 # release should show up in the -l (ie -lgmp5) so we don't want to
3500 # add it in twice. Is that correct?
3501 release=""
3502 versuffix=""
3503 major=""
3504 newdeplibs=
3505 droppeddeps=no
3506 case $deplibs_check_method in
3507 pass_all)
3508 # Don't check for shared/static. Everything works.
3509 # This might be a little naive. We might want to check
3510 # whether the library exists or not. But this is on
3511 # osf3 & osf4 and I'm not really sure... Just
3512 # implementing what was already the behavior.
3513 newdeplibs=$deplibs
3514 ;;
3515 test_compile)
3516 # This code stresses the "libraries are programs" paradigm to its
3517 # limits. Maybe even breaks it. We compile a program, linking it
3518 # against the deplibs as a proxy for the library. Then we can check
3519 # whether they linked in statically or dynamically with ldd.
3520 $rm conftest.c
3521 cat > conftest.c <<EOF
3522 int main() { return 0; }
3523 EOF
3524 $rm conftest
3525 $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
3526 if test "$?" -eq 0 ; then
3527 ldd_output=`ldd conftest`
3528 for i in $deplibs; do
3529 name=`expr $i : '-l\(.*\)'`
3530 # If $name is empty we are operating on a -L argument.
3531 if test "$name" != "" && test "$name" -ne "0"; then
3532 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3533 case " $predeps $postdeps " in
3534 *" $i "*)
3535 newdeplibs="$newdeplibs $i"
3536 i=""
3537 ;;
3538 esac
3539 fi
3540 if test -n "$i" ; then
3541 libname=`eval \\$echo \"$libname_spec\"`
3542 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3543 set dummy $deplib_matches
3544 deplib_match=$2
3545 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3546 newdeplibs="$newdeplibs $i"
3547 else
3548 droppeddeps=yes
3549 $echo
3550 $echo "*** Warning: dynamic linker does not accept needed library $i."
3551 $echo "*** I have the capability to make that library automatically link in when"
3552 $echo "*** you link to this library. But I can only do this if you have a"
3553 $echo "*** shared version of the library, which I believe you do not have"
3554 $echo "*** because a test_compile did reveal that the linker did not use it for"
3555 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3556 fi
3557 fi
3558 else
3559 newdeplibs="$newdeplibs $i"
3560 fi
3561 done
3562 else
3563 # Error occurred in the first compile. Let's try to salvage
3564 # the situation: Compile a separate program for each library.
3565 for i in $deplibs; do
3566 name=`expr $i : '-l\(.*\)'`
3567 # If $name is empty we are operating on a -L argument.
3568 if test "$name" != "" && test "$name" != "0"; then
3569 $rm conftest
3570 $LTCC $LTCFLAGS -o conftest conftest.c $i
3571 # Did it work?
3572 if test "$?" -eq 0 ; then
3573 ldd_output=`ldd conftest`
3574 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3575 case " $predeps $postdeps " in
3576 *" $i "*)
3577 newdeplibs="$newdeplibs $i"
3578 i=""
3579 ;;
3580 esac
3581 fi
3582 if test -n "$i" ; then
3583 libname=`eval \\$echo \"$libname_spec\"`
3584 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3585 set dummy $deplib_matches
3586 deplib_match=$2
3587 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3588 newdeplibs="$newdeplibs $i"
3589 else
3590 droppeddeps=yes
3591 $echo
3592 $echo "*** Warning: dynamic linker does not accept needed library $i."
3593 $echo "*** I have the capability to make that library automatically link in when"
3594 $echo "*** you link to this library. But I can only do this if you have a"
3595 $echo "*** shared version of the library, which you do not appear to have"
3596 $echo "*** because a test_compile did reveal that the linker did not use this one"
3597 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3598 fi
3599 fi
3600 else
3601 droppeddeps=yes
3602 $echo
3603 $echo "*** Warning! Library $i is needed by this library but I was not able to"
3604 $echo "*** make it link in! You will probably need to install it or some"
3605 $echo "*** library that it depends on before this library will be fully"
3606 $echo "*** functional. Installing it before continuing would be even better."
3607 fi
3608 else
3609 newdeplibs="$newdeplibs $i"
3610 fi
3611 done
3612 fi
3613 ;;
3614 file_magic*)
3615 set dummy $deplibs_check_method
3616 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3617 for a_deplib in $deplibs; do
3618 name=`expr $a_deplib : '-l\(.*\)'`
3619 # If $name is empty we are operating on a -L argument.
3620 if test "$name" != "" && test "$name" != "0"; then
3621 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3622 case " $predeps $postdeps " in
3623 *" $a_deplib "*)
3624 newdeplibs="$newdeplibs $a_deplib"
3625 a_deplib=""
3626 ;;
3627 esac
3628 fi
3629 if test -n "$a_deplib" ; then
3630 libname=`eval \\$echo \"$libname_spec\"`
3631 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3632 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3633 for potent_lib in $potential_libs; do
3634 # Follow soft links.
3635 if ls -lLd "$potent_lib" 2>/dev/null \
3636 | grep " -> " >/dev/null; then
3637 continue
3638 fi
3639 # The statement above tries to avoid entering an
3640 # endless loop below, in case of cyclic links.
3641 # We might still enter an endless loop, since a link
3642 # loop can be closed while we follow links,
3643 # but so what?
3644 potlib="$potent_lib"
3645 while test -h "$potlib" 2>/dev/null; do
3646 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
3647 case $potliblink in
3648 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
3649 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3650 esac
3651 done
3652 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
3653 | ${SED} 10q \
3654 | $EGREP "$file_magic_regex" > /dev/null; then
3655 newdeplibs="$newdeplibs $a_deplib"
3656 a_deplib=""
3657 break 2
3658 fi
3659 done
3660 done
3661 fi
3662 if test -n "$a_deplib" ; then
3663 droppeddeps=yes
3664 $echo
3665 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3666 $echo "*** I have the capability to make that library automatically link in when"
3667 $echo "*** you link to this library. But I can only do this if you have a"
3668 $echo "*** shared version of the library, which you do not appear to have"
3669 $echo "*** because I did check the linker path looking for a file starting"
3670 if test -z "$potlib" ; then
3671 $echo "*** with $libname but no candidates were found. (...for file magic test)"
3672 else
3673 $echo "*** with $libname and none of the candidates passed a file format test"
3674 $echo "*** using a file magic. Last file checked: $potlib"
3675 fi
3676 fi
3677 else
3678 # Add a -L argument.
3679 newdeplibs="$newdeplibs $a_deplib"
3680 fi
3681 done # Gone through all deplibs.
3682 ;;
3683 match_pattern*)
3684 set dummy $deplibs_check_method
3685 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3686 for a_deplib in $deplibs; do
3687 name=`expr $a_deplib : '-l\(.*\)'`
3688 # If $name is empty we are operating on a -L argument.
3689 if test -n "$name" && test "$name" != "0"; then
3690 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3691 case " $predeps $postdeps " in
3692 *" $a_deplib "*)
3693 newdeplibs="$newdeplibs $a_deplib"
3694 a_deplib=""
3695 ;;
3696 esac
3697 fi
3698 if test -n "$a_deplib" ; then
3699 libname=`eval \\$echo \"$libname_spec\"`
3700 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3701 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3702 for potent_lib in $potential_libs; do
3703 potlib="$potent_lib" # see symlink-check above in file_magic test
3704 if eval $echo \"$potent_lib\" 2>/dev/null \
3705 | ${SED} 10q \
3706 | $EGREP "$match_pattern_regex" > /dev/null; then
3707 newdeplibs="$newdeplibs $a_deplib"
3708 a_deplib=""
3709 break 2
3710 fi
3711 done
3712 done
3713 fi
3714 if test -n "$a_deplib" ; then
3715 droppeddeps=yes
3716 $echo
3717 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3718 $echo "*** I have the capability to make that library automatically link in when"
3719 $echo "*** you link to this library. But I can only do this if you have a"
3720 $echo "*** shared version of the library, which you do not appear to have"
3721 $echo "*** because I did check the linker path looking for a file starting"
3722 if test -z "$potlib" ; then
3723 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3724 else
3725 $echo "*** with $libname and none of the candidates passed a file format test"
3726 $echo "*** using a regex pattern. Last file checked: $potlib"
3727 fi
3728 fi
3729 else
3730 # Add a -L argument.
3731 newdeplibs="$newdeplibs $a_deplib"
3732 fi
3733 done # Gone through all deplibs.
3734 ;;
3735 none | unknown | *)
3736 newdeplibs=""
3737 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3738 -e 's/ -[LR][^ ]*//g'`
3739 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3740 for i in $predeps $postdeps ; do
3741 # can't use Xsed below, because $i might contain '/'
3742 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3743 done
3744 fi
3745 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
3746 | grep . >/dev/null; then
3747 $echo
3748 if test "X$deplibs_check_method" = "Xnone"; then
3749 $echo "*** Warning: inter-library dependencies are not supported in this platform."
3750 else
3751 $echo "*** Warning: inter-library dependencies are not known to be supported."
3752 fi
3753 $echo "*** All declared inter-library dependencies are being dropped."
3754 droppeddeps=yes
3755 fi
3756 ;;
3757 esac
3758 versuffix=$versuffix_save
3759 major=$major_save
3760 release=$release_save
3761 libname=$libname_save
3762 name=$name_save
3763
3764 case $host in
3765 *-*-rhapsody* | *-*-darwin1.[012])
3766 # On Rhapsody replace the C library is the System framework
3767 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
3768 ;;
3769 esac
3770
3771 if test "$droppeddeps" = yes; then
3772 if test "$module" = yes; then
3773 $echo
3774 $echo "*** Warning: libtool could not satisfy all declared inter-library"
3775 $echo "*** dependencies of module $libname. Therefore, libtool will create"
3776 $echo "*** a static module, that should work as long as the dlopening"
3777 $echo "*** application is linked with the -dlopen flag."
3778 if test -z "$global_symbol_pipe"; then
3779 $echo
3780 $echo "*** However, this would only work if libtool was able to extract symbol"
3781 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3782 $echo "*** not find such a program. So, this module is probably useless."
3783 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3784 fi
3785 if test "$build_old_libs" = no; then
3786 oldlibs="$output_objdir/$libname.$libext"
3787 build_libtool_libs=module
3788 build_old_libs=yes
3789 else
3790 build_libtool_libs=no
3791 fi
3792 else
3793 $echo "*** The inter-library dependencies that have been dropped here will be"
3794 $echo "*** automatically added whenever a program is linked with this library"
3795 $echo "*** or is declared to -dlopen it."
3796
3797 if test "$allow_undefined" = no; then
3798 $echo
3799 $echo "*** Since this library must not contain undefined symbols,"
3800 $echo "*** because either the platform does not support them or"
3801 $echo "*** it was explicitly requested with -no-undefined,"
3802 $echo "*** libtool will only create a static version of it."
3803 if test "$build_old_libs" = no; then
3804 oldlibs="$output_objdir/$libname.$libext"
3805 build_libtool_libs=module
3806 build_old_libs=yes
3807 else
3808 build_libtool_libs=no
3809 fi
3810 fi
3811 fi
3812 fi
3813 # Done checking deplibs!
3814 deplibs=$newdeplibs
3815 fi
3816
3817
3818 # move library search paths that coincide with paths to not yet
3819 # installed libraries to the beginning of the library search list
3820 new_libs=
3821 for path in $notinst_path; do
3822 case " $new_libs " in
3823 *" -L$path/$objdir "*) ;;
3824 *)
3825 case " $deplibs " in
3826 *" -L$path/$objdir "*)
3827 new_libs="$new_libs -L$path/$objdir" ;;
3828 esac
3829 ;;
3830 esac
3831 done
3832 for deplib in $deplibs; do
3833 case $deplib in
3834 -L*)
3835 case " $new_libs " in
3836 *" $deplib "*) ;;
3837 *) new_libs="$new_libs $deplib" ;;
3838 esac
3839 ;;
3840 *) new_libs="$new_libs $deplib" ;;
3841 esac
3842 done
3843 deplibs="$new_libs"
3844
3845
3846 # All the library-specific variables (install_libdir is set above).
3847 library_names=
3848 old_library=
3849 dlname=
3850
3851 # Test again, we may have decided not to build it any more
3852 if test "$build_libtool_libs" = yes; then
3853 if test "$hardcode_into_libs" = yes; then
3854 # Hardcode the library paths
3855 hardcode_libdirs=
3856 dep_rpath=
3857 rpath="$finalize_rpath"
3858 test "$mode" != relink && rpath="$compile_rpath$rpath"
3859 for libdir in $rpath; do
3860 if test -n "$hardcode_libdir_flag_spec"; then
3861 if test -n "$hardcode_libdir_separator"; then
3862 if test -z "$hardcode_libdirs"; then
3863 hardcode_libdirs="$libdir"
3864 else
3865 # Just accumulate the unique libdirs.
3866 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3867 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3868 ;;
3869 *)
3870 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3871 ;;
3872 esac
3873 fi
3874 else
3875 eval flag=\"$hardcode_libdir_flag_spec\"
3876 dep_rpath="$dep_rpath $flag"
3877 fi
3878 elif test -n "$runpath_var"; then
3879 case "$perm_rpath " in
3880 *" $libdir "*) ;;
3881 *) perm_rpath="$perm_rpath $libdir" ;;
3882 esac
3883 fi
3884 done
3885 # Substitute the hardcoded libdirs into the rpath.
3886 if test -n "$hardcode_libdir_separator" &&
3887 test -n "$hardcode_libdirs"; then
3888 libdir="$hardcode_libdirs"
3889 if test -n "$hardcode_libdir_flag_spec_ld"; then
3890 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
3891 else
3892 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3893 fi
3894 fi
3895 if test -n "$runpath_var" && test -n "$perm_rpath"; then
3896 # We should set the runpath_var.
3897 rpath=
3898 for dir in $perm_rpath; do
3899 rpath="$rpath$dir:"
3900 done
3901 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3902 fi
3903 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
3904 fi
3905
3906 shlibpath="$finalize_shlibpath"
3907 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
3908 if test -n "$shlibpath"; then
3909 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3910 fi
3911
3912 # Get the real and link names of the library.
3913 eval shared_ext=\"$shrext_cmds\"
3914 eval library_names=\"$library_names_spec\"
3915 set dummy $library_names
3916 realname="$2"
3917 shift; shift
3918
3919 if test -n "$soname_spec"; then
3920 eval soname=\"$soname_spec\"
3921 else
3922 soname="$realname"
3923 fi
3924 if test -z "$dlname"; then
3925 dlname=$soname
3926 fi
3927
3928 lib="$output_objdir/$realname"
3929 linknames=
3930 for link
3931 do
3932 linknames="$linknames $link"
3933 done
3934
3935 # Use standard objects if they are pic
3936 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3937
3938 # Prepare the list of exported symbols
3939 if test -z "$export_symbols"; then
3940 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
3941 $show "generating symbol list for \`$libname.la'"
3942 export_symbols="$output_objdir/$libname.exp"
3943 $run $rm $export_symbols
3944 cmds=$export_symbols_cmds
3945 save_ifs="$IFS"; IFS='~'
3946 for cmd in $cmds; do
3947 IFS="$save_ifs"
3948 eval cmd=\"$cmd\"
3949 if len=`expr "X$cmd" : ".*"` &&
3950 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3951 $show "$cmd"
3952 $run eval "$cmd" || exit $?
3953 skipped_export=false
3954 else
3955 # The command line is too long to execute in one step.
3956 $show "using reloadable object file for export list..."
3957 skipped_export=:
3958 # Break out early, otherwise skipped_export may be
3959 # set to false by a later but shorter cmd.
3960 break
3961 fi
3962 done
3963 IFS="$save_ifs"
3964 if test -n "$export_symbols_regex"; then
3965 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
3966 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
3967 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
3968 $run eval '$mv "${export_symbols}T" "$export_symbols"'
3969 fi
3970 fi
3971 fi
3972
3973 if test -n "$export_symbols" && test -n "$include_expsyms"; then
3974 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
3975 fi
3976
3977 tmp_deplibs=
3978 for test_deplib in $deplibs; do
3979 case " $convenience " in
3980 *" $test_deplib "*) ;;
3981 *)
3982 tmp_deplibs="$tmp_deplibs $test_deplib"
3983 ;;
3984 esac
3985 done
3986 deplibs="$tmp_deplibs"
3987
3988 if test -n "$convenience"; then
3989 if test -n "$whole_archive_flag_spec"; then
3990 save_libobjs=$libobjs
3991 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
3992 else
3993 gentop="$output_objdir/${outputname}x"
3994 generated="$generated $gentop"
3995
3996 func_extract_archives $gentop $convenience
3997 libobjs="$libobjs $func_extract_archives_result"
3998 fi
3999 fi
4000
4001 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4002 eval flag=\"$thread_safe_flag_spec\"
4003 linker_flags="$linker_flags $flag"
4004 fi
4005
4006 # Make a backup of the uninstalled library when relinking
4007 if test "$mode" = relink; then
4008 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
4009 fi
4010
4011 # Do each of the archive commands.
4012 if test "$module" = yes && test -n "$module_cmds" ; then
4013 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4014 eval test_cmds=\"$module_expsym_cmds\"
4015 cmds=$module_expsym_cmds
4016 else
4017 eval test_cmds=\"$module_cmds\"
4018 cmds=$module_cmds
4019 fi
4020 else
4021 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4022 eval test_cmds=\"$archive_expsym_cmds\"
4023 cmds=$archive_expsym_cmds
4024 else
4025 eval test_cmds=\"$archive_cmds\"
4026 cmds=$archive_cmds
4027 fi
4028 fi
4029
4030 if test "X$skipped_export" != "X:" &&
4031 len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4032 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4033 :
4034 else
4035 # The command line is too long to link in one step, link piecewise.
4036 $echo "creating reloadable object files..."
4037
4038 # Save the value of $output and $libobjs because we want to
4039 # use them later. If we have whole_archive_flag_spec, we
4040 # want to use save_libobjs as it was before
4041 # whole_archive_flag_spec was expanded, because we can't
4042 # assume the linker understands whole_archive_flag_spec.
4043 # This may have to be revisited, in case too many
4044 # convenience libraries get linked in and end up exceeding
4045 # the spec.
4046 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
4047 save_libobjs=$libobjs
4048 fi
4049 save_output=$output
4050 output_la=`$echo "X$output" | $Xsed -e "$basename"`
4051
4052 # Clear the reloadable object creation command queue and
4053 # initialize k to one.
4054 test_cmds=
4055 concat_cmds=
4056 objlist=
4057 delfiles=
4058 last_robj=
4059 k=1
4060 output=$output_objdir/$output_la-${k}.$objext
4061 # Loop over the list of objects to be linked.
4062 for obj in $save_libobjs
4063 do
4064 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
4065 if test "X$objlist" = X ||
4066 { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4067 test "$len" -le "$max_cmd_len"; }; then
4068 objlist="$objlist $obj"
4069 else
4070 # The command $test_cmds is almost too long, add a
4071 # command to the queue.
4072 if test "$k" -eq 1 ; then
4073 # The first file doesn't have a previous command to add.
4074 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
4075 else
4076 # All subsequent reloadable object files will link in
4077 # the last one created.
4078 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
4079 fi
4080 last_robj=$output_objdir/$output_la-${k}.$objext
4081 k=`expr $k + 1`
4082 output=$output_objdir/$output_la-${k}.$objext
4083 objlist=$obj
4084 len=1
4085 fi
4086 done
4087 # Handle the remaining objects by creating one last
4088 # reloadable object file. All subsequent reloadable object
4089 # files will link in the last one created.
4090 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
4091 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
4092
4093 if ${skipped_export-false}; then
4094 $show "generating symbol list for \`$libname.la'"
4095 export_symbols="$output_objdir/$libname.exp"
4096 $run $rm $export_symbols
4097 libobjs=$output
4098 # Append the command to create the export file.
4099 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
4100 fi
4101
4102 # Set up a command to remove the reloadable object files
4103 # after they are used.
4104 i=0
4105 while test "$i" -lt "$k"
4106 do
4107 i=`expr $i + 1`
4108 delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
4109 done
4110
4111 $echo "creating a temporary reloadable object file: $output"
4112
4113 # Loop through the commands generated above and execute them.
4114 save_ifs="$IFS"; IFS='~'
4115 for cmd in $concat_cmds; do
4116 IFS="$save_ifs"
4117 $show "$cmd"
4118 $run eval "$cmd" || exit $?
4119 done
4120 IFS="$save_ifs"
4121
4122 libobjs=$output
4123 # Restore the value of output.
4124 output=$save_output
4125
4126 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4127 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4128 fi
4129 # Expand the library linking commands again to reset the
4130 # value of $libobjs for piecewise linking.
4131
4132 # Do each of the archive commands.
4133 if test "$module" = yes && test -n "$module_cmds" ; then
4134 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4135 cmds=$module_expsym_cmds
4136 else
4137 cmds=$module_cmds
4138 fi
4139 else
4140 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4141 cmds=$archive_expsym_cmds
4142 else
4143 cmds=$archive_cmds
4144 fi
4145 fi
4146
4147 # Append the command to remove the reloadable object files
4148 # to the just-reset $cmds.
4149 eval cmds=\"\$cmds~\$rm $delfiles\"
4150 fi
4151 save_ifs="$IFS"; IFS='~'
4152 for cmd in $cmds; do
4153 IFS="$save_ifs"
4154 eval cmd=\"$cmd\"
4155 $show "$cmd"
4156 $run eval "$cmd" || {
4157 lt_exit=$?
4158
4159 # Restore the uninstalled library and exit
4160 if test "$mode" = relink; then
4161 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4162 fi
4163
4164 exit $lt_exit
4165 }
4166 done
4167 IFS="$save_ifs"
4168
4169 # Restore the uninstalled library and exit
4170 if test "$mode" = relink; then
4171 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4172
4173 if test -n "$convenience"; then
4174 if test -z "$whole_archive_flag_spec"; then
4175 $show "${rm}r $gentop"
4176 $run ${rm}r "$gentop"
4177 fi
4178 fi
4179
4180 exit $EXIT_SUCCESS
4181 fi
4182
4183 # Create links to the real library.
4184 for linkname in $linknames; do
4185 if test "$realname" != "$linkname"; then
4186 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4187 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
4188 fi
4189 done
4190
4191 # If -module or -export-dynamic was specified, set the dlname.
4192 if test "$module" = yes || test "$export_dynamic" = yes; then
4193 # On all known operating systems, these are identical.
4194 dlname="$soname"
4195 fi
4196 fi
4197 ;;
4198
4199 obj)
4200 if test -n "$deplibs"; then
4201 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4202 fi
4203
4204 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4205 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4206 fi
4207
4208 if test -n "$rpath"; then
4209 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4210 fi
4211
4212 if test -n "$xrpath"; then
4213 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4214 fi
4215
4216 if test -n "$vinfo"; then
4217 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4218 fi
4219
4220 if test -n "$release"; then
4221 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4222 fi
4223
4224 case $output in
4225 *.lo)
4226 if test -n "$objs$old_deplibs"; then
4227 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4228 exit $EXIT_FAILURE
4229 fi
4230 libobj="$output"
4231 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
4232 ;;
4233 *)
4234 libobj=
4235 obj="$output"
4236 ;;
4237 esac
4238
4239 # Delete the old objects.
4240 $run $rm $obj $libobj
4241
4242 # Objects from convenience libraries. This assumes
4243 # single-version convenience libraries. Whenever we create
4244 # different ones for PIC/non-PIC, this we'll have to duplicate
4245 # the extraction.
4246 reload_conv_objs=
4247 gentop=
4248 # reload_cmds runs $LD directly, so let us get rid of
4249 # -Wl from whole_archive_flag_spec
4250 wl=
4251
4252 if test -n "$convenience"; then
4253 if test -n "$whole_archive_flag_spec"; then
4254 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
4255 else
4256 gentop="$output_objdir/${obj}x"
4257 generated="$generated $gentop"
4258
4259 func_extract_archives $gentop $convenience
4260 reload_conv_objs="$reload_objs $func_extract_archives_result"
4261 fi
4262 fi
4263
4264 # Create the old-style object.
4265 reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
4266
4267 output="$obj"
4268 cmds=$reload_cmds
4269 save_ifs="$IFS"; IFS='~'
4270 for cmd in $cmds; do
4271 IFS="$save_ifs"
4272 eval cmd=\"$cmd\"
4273 $show "$cmd"
4274 $run eval "$cmd" || exit $?
4275 done
4276 IFS="$save_ifs"
4277
4278 # Exit if we aren't doing a library object file.
4279 if test -z "$libobj"; then
4280 if test -n "$gentop"; then
4281 $show "${rm}r $gentop"
4282 $run ${rm}r $gentop
4283 fi
4284
4285 exit $EXIT_SUCCESS
4286 fi
4287
4288 if test "$build_libtool_libs" != yes; then
4289 if test -n "$gentop"; then
4290 $show "${rm}r $gentop"
4291 $run ${rm}r $gentop
4292 fi
4293
4294 # Create an invalid libtool object if no PIC, so that we don't
4295 # accidentally link it into a program.
4296 # $show "echo timestamp > $libobj"
4297 # $run eval "echo timestamp > $libobj" || exit $?
4298 exit $EXIT_SUCCESS
4299 fi
4300
4301 if test -n "$pic_flag" || test "$pic_mode" != default; then
4302 # Only do commands if we really have different PIC objects.
4303 reload_objs="$libobjs $reload_conv_objs"
4304 output="$libobj"
4305 cmds=$reload_cmds
4306 save_ifs="$IFS"; IFS='~'
4307 for cmd in $cmds; do
4308 IFS="$save_ifs"
4309 eval cmd=\"$cmd\"
4310 $show "$cmd"
4311 $run eval "$cmd" || exit $?
4312 done
4313 IFS="$save_ifs"
4314 fi
4315
4316 if test -n "$gentop"; then
4317 $show "${rm}r $gentop"
4318 $run ${rm}r $gentop
4319 fi
4320
4321 exit $EXIT_SUCCESS
4322 ;;
4323
4324 prog)
4325 case $host in
4326 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4327 esac
4328 if test -n "$vinfo"; then
4329 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4330 fi
4331
4332 if test -n "$release"; then
4333 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4334 fi
4335
4336 if test "$preload" = yes; then
4337 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
4338 test "$dlopen_self_static" = unknown; then
4339 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4340 fi
4341 fi
4342
4343 case $host in
4344 *-*-rhapsody* | *-*-darwin1.[012])
4345 # On Rhapsody replace the C library is the System framework
4346 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4347 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4348 ;;
4349 esac
4350
4351 case $host in
4352 *darwin*)
4353 # Don't allow lazy linking, it breaks C++ global constructors
4354 if test "$tagname" = CXX ; then
4355 compile_command="$compile_command ${wl}-bind_at_load"
4356 finalize_command="$finalize_command ${wl}-bind_at_load"
4357 fi
4358 ;;
4359 esac
4360
4361
4362 # move library search paths that coincide with paths to not yet
4363 # installed libraries to the beginning of the library search list
4364 new_libs=
4365 for path in $notinst_path; do
4366 case " $new_libs " in
4367 *" -L$path/$objdir "*) ;;
4368 *)
4369 case " $compile_deplibs " in
4370 *" -L$path/$objdir "*)
4371 new_libs="$new_libs -L$path/$objdir" ;;
4372 esac
4373 ;;
4374 esac
4375 done
4376 for deplib in $compile_deplibs; do
4377 case $deplib in
4378 -L*)
4379 case " $new_libs " in
4380 *" $deplib "*) ;;
4381 *) new_libs="$new_libs $deplib" ;;
4382 esac
4383 ;;
4384 *) new_libs="$new_libs $deplib" ;;
4385 esac
4386 done
4387 compile_deplibs="$new_libs"
4388
4389
4390 compile_command="$compile_command $compile_deplibs"
4391 finalize_command="$finalize_command $finalize_deplibs"
4392
4393 if test -n "$rpath$xrpath"; then
4394 # If the user specified any rpath flags, then add them.
4395 for libdir in $rpath $xrpath; do
4396 # This is the magic to use -rpath.
4397 case "$finalize_rpath " in
4398 *" $libdir "*) ;;
4399 *) finalize_rpath="$finalize_rpath $libdir" ;;
4400 esac
4401 done
4402 fi
4403
4404 # Now hardcode the library paths
4405 rpath=
4406 hardcode_libdirs=
4407 for libdir in $compile_rpath $finalize_rpath; do
4408 if test -n "$hardcode_libdir_flag_spec"; then
4409 if test -n "$hardcode_libdir_separator"; then
4410 if test -z "$hardcode_libdirs"; then
4411 hardcode_libdirs="$libdir"
4412 else
4413 # Just accumulate the unique libdirs.
4414 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4415 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4416 ;;
4417 *)
4418 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4419 ;;
4420 esac
4421 fi
4422 else
4423 eval flag=\"$hardcode_libdir_flag_spec\"
4424 rpath="$rpath $flag"
4425 fi
4426 elif test -n "$runpath_var"; then
4427 case "$perm_rpath " in
4428 *" $libdir "*) ;;
4429 *) perm_rpath="$perm_rpath $libdir" ;;
4430 esac
4431 fi
4432 case $host in
4433 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4434 testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
4435 case :$dllsearchpath: in
4436 *":$libdir:"*) ;;
4437 *) dllsearchpath="$dllsearchpath:$libdir";;
4438 esac
4439 case :$dllsearchpath: in
4440 *":$testbindir:"*) ;;
4441 *) dllsearchpath="$dllsearchpath:$testbindir";;
4442 esac
4443 ;;
4444 esac
4445 done
4446 # Substitute the hardcoded libdirs into the rpath.
4447 if test -n "$hardcode_libdir_separator" &&
4448 test -n "$hardcode_libdirs"; then
4449 libdir="$hardcode_libdirs"
4450 eval rpath=\" $hardcode_libdir_flag_spec\"
4451 fi
4452 compile_rpath="$rpath"
4453
4454 rpath=
4455 hardcode_libdirs=
4456 for libdir in $finalize_rpath; do
4457 if test -n "$hardcode_libdir_flag_spec"; then
4458 if test -n "$hardcode_libdir_separator"; then
4459 if test -z "$hardcode_libdirs"; then
4460 hardcode_libdirs="$libdir"
4461 else
4462 # Just accumulate the unique libdirs.
4463 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4464 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4465 ;;
4466 *)
4467 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4468 ;;
4469 esac
4470 fi
4471 else
4472 eval flag=\"$hardcode_libdir_flag_spec\"
4473 rpath="$rpath $flag"
4474 fi
4475 elif test -n "$runpath_var"; then
4476 case "$finalize_perm_rpath " in
4477 *" $libdir "*) ;;
4478 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
4479 esac
4480 fi
4481 done
4482 # Substitute the hardcoded libdirs into the rpath.
4483 if test -n "$hardcode_libdir_separator" &&
4484 test -n "$hardcode_libdirs"; then
4485 libdir="$hardcode_libdirs"
4486 eval rpath=\" $hardcode_libdir_flag_spec\"
4487 fi
4488 finalize_rpath="$rpath"
4489
4490 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4491 # Transform all the library objects into standard objects.
4492 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4493 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4494 fi
4495
4496 dlsyms=
4497 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4498 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4499 dlsyms="${outputname}S.c"
4500 else
4501 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4502 fi
4503 fi
4504
4505 if test -n "$dlsyms"; then
4506 case $dlsyms in
4507 "") ;;
4508 *.c)
4509 # Discover the nlist of each of the dlfiles.
4510 nlist="$output_objdir/${outputname}.nm"
4511
4512 $show "$rm $nlist ${nlist}S ${nlist}T"
4513 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4514
4515 # Parse the name list into a source file.
4516 $show "creating $output_objdir/$dlsyms"
4517
4518 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4519 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4520 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4521
4522 #ifdef __cplusplus
4523 extern \"C\" {
4524 #endif
4525
4526 /* Prevent the only kind of declaration conflicts we can make. */
4527 #define lt_preloaded_symbols some_other_symbol
4528
4529 /* External symbol declarations for the compiler. */\
4530 "
4531
4532 if test "$dlself" = yes; then
4533 $show "generating symbol list for \`$output'"
4534
4535 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4536
4537 # Add our own program objects to the symbol list.
4538 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4539 for arg in $progfiles; do
4540 $show "extracting global C symbols from \`$arg'"
4541 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4542 done
4543
4544 if test -n "$exclude_expsyms"; then
4545 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4546 $run eval '$mv "$nlist"T "$nlist"'
4547 fi
4548
4549 if test -n "$export_symbols_regex"; then
4550 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4551 $run eval '$mv "$nlist"T "$nlist"'
4552 fi
4553
4554 # Prepare the list of exported symbols
4555 if test -z "$export_symbols"; then
4556 export_symbols="$output_objdir/$outputname.exp"
4557 $run $rm $export_symbols
4558 $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4559 case $host in
4560 *cygwin* | *mingw* )
4561 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4562 $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4563 ;;
4564 esac
4565 else
4566 $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4567 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4568 $run eval 'mv "$nlist"T "$nlist"'
4569 case $host in
4570 *cygwin* | *mingw* )
4571 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4572 $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4573 ;;
4574 esac
4575 fi
4576 fi
4577
4578 for arg in $dlprefiles; do
4579 $show "extracting global C symbols from \`$arg'"
4580 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4581 $run eval '$echo ": $name " >> "$nlist"'
4582 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4583 done
4584
4585 if test -z "$run"; then
4586 # Make sure we have at least an empty file.
4587 test -f "$nlist" || : > "$nlist"
4588
4589 if test -n "$exclude_expsyms"; then
4590 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4591 $mv "$nlist"T "$nlist"
4592 fi
4593
4594 # Try sorting and uniquifying the output.
4595 if grep -v "^: " < "$nlist" |
4596 if sort -k 3 </dev/null >/dev/null 2>&1; then
4597 sort -k 3
4598 else
4599 sort +2
4600 fi |
4601 uniq > "$nlist"S; then
4602 :
4603 else
4604 grep -v "^: " < "$nlist" > "$nlist"S
4605 fi
4606
4607 if test -f "$nlist"S; then
4608 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4609 else
4610 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
4611 fi
4612
4613 $echo >> "$output_objdir/$dlsyms" "\
4614
4615 #undef lt_preloaded_symbols
4616
4617 #if defined (__STDC__) && __STDC__
4618 # define lt_ptr void *
4619 #else
4620 # define lt_ptr char *
4621 # define const
4622 #endif
4623
4624 /* The mapping between symbol names and symbols. */
4625 "
4626
4627 case $host in
4628 *cygwin* | *mingw* )
4629 $echo >> "$output_objdir/$dlsyms" "\
4630 /* DATA imports from DLLs on WIN32 can't be const, because
4631 runtime relocations are performed -- see ld's documentation
4632 on pseudo-relocs */
4633 struct {
4634 "
4635 ;;
4636 * )
4637 $echo >> "$output_objdir/$dlsyms" "\
4638 const struct {
4639 "
4640 ;;
4641 esac
4642
4643
4644 $echo >> "$output_objdir/$dlsyms" "\
4645 const char *name;
4646 lt_ptr address;
4647 }
4648 lt_preloaded_symbols[] =
4649 {\
4650 "
4651
4652 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
4653
4654 $echo >> "$output_objdir/$dlsyms" "\
4655 {0, (lt_ptr) 0}
4656 };
4657
4658 /* This works around a problem in FreeBSD linker */
4659 #ifdef FREEBSD_WORKAROUND
4660 static const void *lt_preloaded_setup() {
4661 return lt_preloaded_symbols;
4662 }
4663 #endif
4664
4665 #ifdef __cplusplus
4666 }
4667 #endif\
4668 "
4669 fi
4670
4671 pic_flag_for_symtable=
4672 case $host in
4673 # compiling the symbol table file with pic_flag works around
4674 # a FreeBSD bug that causes programs to crash when -lm is
4675 # linked before any other PIC object. But we must not use
4676 # pic_flag when linking with -static. The problem exists in
4677 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4678 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
4679 case "$compile_command " in
4680 *" -static "*) ;;
4681 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
4682 esac;;
4683 *-*-hpux*)
4684 case "$compile_command " in
4685 *" -static "*) ;;
4686 *) pic_flag_for_symtable=" $pic_flag";;
4687 esac
4688 esac
4689
4690 # Now compile the dynamic symbol file.
4691 $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4692 $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
4693
4694 # Clean up the generated files.
4695 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4696 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4697
4698 # Transform the symbol file into the correct name.
4699 case $host in
4700 *cygwin* | *mingw* )
4701 if test -f "$output_objdir/${outputname}.def" ; then
4702 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
4703 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
4704 else
4705 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4706 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4707 fi
4708 ;;
4709 * )
4710 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4711 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4712 ;;
4713 esac
4714 ;;
4715 *)
4716 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4717 exit $EXIT_FAILURE
4718 ;;
4719 esac
4720 else
4721 # We keep going just in case the user didn't refer to
4722 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4723 # really was required.
4724
4725 # Nullify the symbol file.
4726 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
4727 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
4728 fi
4729
4730 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4731 # Replace the output file specification.
4732 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4733 link_command="$compile_command$compile_rpath"
4734
4735 # We have no uninstalled library dependencies, so finalize right now.
4736 $show "$link_command"
4737 $run eval "$link_command"
4738 exit_status=$?
4739
4740 # Delete the generated files.
4741 if test -n "$dlsyms"; then
4742 $show "$rm $output_objdir/${outputname}S.${objext}"
4743 $run $rm "$output_objdir/${outputname}S.${objext}"
4744 fi
4745
4746 exit $exit_status
4747 fi
4748
4749 if test -n "$shlibpath_var"; then
4750 # We should set the shlibpath_var
4751 rpath=
4752 for dir in $temp_rpath; do
4753 case $dir in
4754 [\\/]* | [A-Za-z]:[\\/]*)
4755 # Absolute path.
4756 rpath="$rpath$dir:"
4757 ;;
4758 *)
4759 # Relative path: add a thisdir entry.
4760 rpath="$rpath\$thisdir/$dir:"
4761 ;;
4762 esac
4763 done
4764 temp_rpath="$rpath"
4765 fi
4766
4767 if test -n "$compile_shlibpath$finalize_shlibpath"; then
4768 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4769 fi
4770 if test -n "$finalize_shlibpath"; then
4771 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4772 fi
4773
4774 compile_var=
4775 finalize_var=
4776 if test -n "$runpath_var"; then
4777 if test -n "$perm_rpath"; then
4778 # We should set the runpath_var.
4779 rpath=
4780 for dir in $perm_rpath; do
4781 rpath="$rpath$dir:"
4782 done
4783 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
4784 fi
4785 if test -n "$finalize_perm_rpath"; then
4786 # We should set the runpath_var.
4787 rpath=
4788 for dir in $finalize_perm_rpath; do
4789 rpath="$rpath$dir:"
4790 done
4791 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
4792 fi
4793 fi
4794
4795 if test "$no_install" = yes; then
4796 # We don't need to create a wrapper script.
4797 link_command="$compile_var$compile_command$compile_rpath"
4798 # Replace the output file specification.
4799 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4800 # Delete the old output file.
4801 $run $rm $output
4802 # Link the executable and exit
4803 $show "$link_command"
4804 $run eval "$link_command" || exit $?
4805 exit $EXIT_SUCCESS
4806 fi
4807
4808 if test "$hardcode_action" = relink; then
4809 # Fast installation is not supported
4810 link_command="$compile_var$compile_command$compile_rpath"
4811 relink_command="$finalize_var$finalize_command$finalize_rpath"
4812
4813 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4814 $echo "$modename: \`$output' will be relinked during installation" 1>&2
4815 else
4816 if test "$fast_install" != no; then
4817 link_command="$finalize_var$compile_command$finalize_rpath"
4818 if test "$fast_install" = yes; then
4819 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
4820 else
4821 # fast_install is set to needless
4822 relink_command=
4823 fi
4824 else
4825 link_command="$compile_var$compile_command$compile_rpath"
4826 relink_command="$finalize_var$finalize_command$finalize_rpath"
4827 fi
4828 fi
4829
4830 # Replace the output file specification.
4831 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4832
4833 # Delete the old output files.
4834 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
4835
4836 $show "$link_command"
4837 $run eval "$link_command" || exit $?
4838
4839 # Now create the wrapper script.
4840 $show "creating $output"
4841
4842 # Quote the relink command for shipping.
4843 if test -n "$relink_command"; then
4844 # Preserve any variables that may affect compiler behavior
4845 for var in $variables_saved_for_relink; do
4846 if eval test -z \"\${$var+set}\"; then
4847 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4848 elif eval var_value=\$$var; test -z "$var_value"; then
4849 relink_command="$var=; export $var; $relink_command"
4850 else
4851 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4852 relink_command="$var=\"$var_value\"; export $var; $relink_command"
4853 fi
4854 done
4855 relink_command="(cd `pwd`; $relink_command)"
4856 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4857 fi
4858
4859 # Quote $echo for shipping.
4860 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
4861 case $progpath in
4862 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
4863 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
4864 esac
4865 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4866 else
4867 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4868 fi
4869
4870 # Only actually do things if our run command is non-null.
4871 if test -z "$run"; then
4872 # win32 will think the script is a binary if it has
4873 # a .exe suffix, so we strip it off here.
4874 case $output in
4875 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
4876 esac
4877 # test for cygwin because mv fails w/o .exe extensions
4878 case $host in
4879 *cygwin*)
4880 exeext=.exe
4881 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4882 *) exeext= ;;
4883 esac
4884 case $host in
4885 *cygwin* | *mingw* )
4886 output_name=`basename $output`
4887 output_path=`dirname $output`
4888 cwrappersource="$output_path/$objdir/lt-$output_name.c"
4889 cwrapper="$output_path/$output_name.exe"
4890 $rm $cwrappersource $cwrapper
4891 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4892
4893 cat > $cwrappersource <<EOF
4894
4895 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4896 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4897
4898 The $output program cannot be directly executed until all the libtool
4899 libraries that it depends on are installed.
4900
4901 This wrapper executable should never be moved out of the build directory.
4902 If it is, it will not operate correctly.
4903
4904 Currently, it simply execs the wrapper *script* "/bin/sh $output",
4905 but could eventually absorb all of the scripts functionality and
4906 exec $objdir/$outputname directly.
4907 */
4908 EOF
4909 cat >> $cwrappersource<<"EOF"
4910 #include <stdio.h>
4911 #include <stdlib.h>
4912 #include <unistd.h>
4913 #include <malloc.h>
4914 #include <stdarg.h>
4915 #include <assert.h>
4916 #include <string.h>
4917 #include <ctype.h>
4918 #include <sys/stat.h>
4919
4920 #if defined(PATH_MAX)
4921 # define LT_PATHMAX PATH_MAX
4922 #elif defined(MAXPATHLEN)
4923 # define LT_PATHMAX MAXPATHLEN
4924 #else
4925 # define LT_PATHMAX 1024
4926 #endif
4927
4928 #ifndef DIR_SEPARATOR
4929 # define DIR_SEPARATOR '/'
4930 # define PATH_SEPARATOR ':'
4931 #endif
4932
4933 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4934 defined (__OS2__)
4935 # define HAVE_DOS_BASED_FILE_SYSTEM
4936 # ifndef DIR_SEPARATOR_2
4937 # define DIR_SEPARATOR_2 '\\'
4938 # endif
4939 # ifndef PATH_SEPARATOR_2
4940 # define PATH_SEPARATOR_2 ';'
4941 # endif
4942 #endif
4943
4944 #ifndef DIR_SEPARATOR_2
4945 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
4946 #else /* DIR_SEPARATOR_2 */
4947 # define IS_DIR_SEPARATOR(ch) \
4948 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4949 #endif /* DIR_SEPARATOR_2 */
4950
4951 #ifndef PATH_SEPARATOR_2
4952 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
4953 #else /* PATH_SEPARATOR_2 */
4954 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
4955 #endif /* PATH_SEPARATOR_2 */
4956
4957 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
4958 #define XFREE(stale) do { \
4959 if (stale) { free ((void *) stale); stale = 0; } \
4960 } while (0)
4961
4962 /* -DDEBUG is fairly common in CFLAGS. */
4963 #undef DEBUG
4964 #if defined DEBUGWRAPPER
4965 # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
4966 #else
4967 # define DEBUG(format, ...)
4968 #endif
4969
4970 const char *program_name = NULL;
4971
4972 void * xmalloc (size_t num);
4973 char * xstrdup (const char *string);
4974 const char * base_name (const char *name);
4975 char * find_executable(const char *wrapper);
4976 int check_executable(const char *path);
4977 char * strendzap(char *str, const char *pat);
4978 void lt_fatal (const char *message, ...);
4979
4980 int
4981 main (int argc, char *argv[])
4982 {
4983 char **newargz;
4984 int i;
4985
4986 program_name = (char *) xstrdup (base_name (argv[0]));
4987 DEBUG("(main) argv[0] : %s\n",argv[0]);
4988 DEBUG("(main) program_name : %s\n",program_name);
4989 newargz = XMALLOC(char *, argc+2);
4990 EOF
4991
4992 cat >> $cwrappersource <<EOF
4993 newargz[0] = (char *) xstrdup("$SHELL");
4994 EOF
4995
4996 cat >> $cwrappersource <<"EOF"
4997 newargz[1] = find_executable(argv[0]);
4998 if (newargz[1] == NULL)
4999 lt_fatal("Couldn't find %s", argv[0]);
5000 DEBUG("(main) found exe at : %s\n",newargz[1]);
5001 /* we know the script has the same name, without the .exe */
5002 /* so make sure newargz[1] doesn't end in .exe */
5003 strendzap(newargz[1],".exe");
5004 for (i = 1; i < argc; i++)
5005 newargz[i+1] = xstrdup(argv[i]);
5006 newargz[argc+1] = NULL;
5007
5008 for (i=0; i<argc+1; i++)
5009 {
5010 DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
5011 ;
5012 }
5013
5014 EOF
5015
5016 case $host_os in
5017 mingw*)
5018 cat >> $cwrappersource <<EOF
5019 execv("$SHELL",(char const **)newargz);
5020 EOF
5021 ;;
5022 *)
5023 cat >> $cwrappersource <<EOF
5024 execv("$SHELL",newargz);
5025 EOF
5026 ;;
5027 esac
5028
5029 cat >> $cwrappersource <<"EOF"
5030 return 127;
5031 }
5032
5033 void *
5034 xmalloc (size_t num)
5035 {
5036 void * p = (void *) malloc (num);
5037 if (!p)
5038 lt_fatal ("Memory exhausted");
5039
5040 return p;
5041 }
5042
5043 char *
5044 xstrdup (const char *string)
5045 {
5046 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5047 ;
5048 }
5049
5050 const char *
5051 base_name (const char *name)
5052 {
5053 const char *base;
5054
5055 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5056 /* Skip over the disk name in MSDOS pathnames. */
5057 if (isalpha ((unsigned char)name[0]) && name[1] == ':')
5058 name += 2;
5059 #endif
5060
5061 for (base = name; *name; name++)
5062 if (IS_DIR_SEPARATOR (*name))
5063 base = name + 1;
5064 return base;
5065 }
5066
5067 int
5068 check_executable(const char * path)
5069 {
5070 struct stat st;
5071
5072 DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
5073 if ((!path) || (!*path))
5074 return 0;
5075
5076 if ((stat (path, &st) >= 0) &&
5077 (
5078 /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5079 #if defined (S_IXOTH)
5080 ((st.st_mode & S_IXOTH) == S_IXOTH) ||
5081 #endif
5082 #if defined (S_IXGRP)
5083 ((st.st_mode & S_IXGRP) == S_IXGRP) ||
5084 #endif
5085 ((st.st_mode & S_IXUSR) == S_IXUSR))
5086 )
5087 return 1;
5088 else
5089 return 0;
5090 }
5091
5092 /* Searches for the full path of the wrapper. Returns
5093 newly allocated full path name if found, NULL otherwise */
5094 char *
5095 find_executable (const char* wrapper)
5096 {
5097 int has_slash = 0;
5098 const char* p;
5099 const char* p_next;
5100 /* static buffer for getcwd */
5101 char tmp[LT_PATHMAX + 1];
5102 int tmp_len;
5103 char* concat_name;
5104
5105 DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
5106
5107 if ((wrapper == NULL) || (*wrapper == '\0'))
5108 return NULL;
5109
5110 /* Absolute path? */
5111 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5112 if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5113 {
5114 concat_name = xstrdup (wrapper);
5115 if (check_executable(concat_name))
5116 return concat_name;
5117 XFREE(concat_name);
5118 }
5119 else
5120 {
5121 #endif
5122 if (IS_DIR_SEPARATOR (wrapper[0]))
5123 {
5124 concat_name = xstrdup (wrapper);
5125 if (check_executable(concat_name))
5126 return concat_name;
5127 XFREE(concat_name);
5128 }
5129 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5130 }
5131 #endif
5132
5133 for (p = wrapper; *p; p++)
5134 if (*p == '/')
5135 {
5136 has_slash = 1;
5137 break;
5138 }
5139 if (!has_slash)
5140 {
5141 /* no slashes; search PATH */
5142 const char* path = getenv ("PATH");
5143 if (path != NULL)
5144 {
5145 for (p = path; *p; p = p_next)
5146 {
5147 const char* q;
5148 size_t p_len;
5149 for (q = p; *q; q++)
5150 if (IS_PATH_SEPARATOR(*q))
5151 break;
5152 p_len = q - p;
5153 p_next = (*q == '\0' ? q : q + 1);
5154 if (p_len == 0)
5155 {
5156 /* empty path: current directory */
5157 if (getcwd (tmp, LT_PATHMAX) == NULL)
5158 lt_fatal ("getcwd failed");
5159 tmp_len = strlen(tmp);
5160 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5161 memcpy (concat_name, tmp, tmp_len);
5162 concat_name[tmp_len] = '/';
5163 strcpy (concat_name + tmp_len + 1, wrapper);
5164 }
5165 else
5166 {
5167 concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5168 memcpy (concat_name, p, p_len);
5169 concat_name[p_len] = '/';
5170 strcpy (concat_name + p_len + 1, wrapper);
5171 }
5172 if (check_executable(concat_name))
5173 return concat_name;
5174 XFREE(concat_name);
5175 }
5176 }
5177 /* not found in PATH; assume curdir */
5178 }
5179 /* Relative path | not found in path: prepend cwd */
5180 if (getcwd (tmp, LT_PATHMAX) == NULL)
5181 lt_fatal ("getcwd failed");
5182 tmp_len = strlen(tmp);
5183 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5184 memcpy (concat_name, tmp, tmp_len);
5185 concat_name[tmp_len] = '/';
5186 strcpy (concat_name + tmp_len + 1, wrapper);
5187
5188 if (check_executable(concat_name))
5189 return concat_name;
5190 XFREE(concat_name);
5191 return NULL;
5192 }
5193
5194 char *
5195 strendzap(char *str, const char *pat)
5196 {
5197 size_t len, patlen;
5198
5199 assert(str != NULL);
5200 assert(pat != NULL);
5201
5202 len = strlen(str);
5203 patlen = strlen(pat);
5204
5205 if (patlen <= len)
5206 {
5207 str += len - patlen;
5208 if (strcmp(str, pat) == 0)
5209 *str = '\0';
5210 }
5211 return str;
5212 }
5213
5214 static void
5215 lt_error_core (int exit_status, const char * mode,
5216 const char * message, va_list ap)
5217 {
5218 fprintf (stderr, "%s: %s: ", program_name, mode);
5219 vfprintf (stderr, message, ap);
5220 fprintf (stderr, ".\n");
5221
5222 if (exit_status >= 0)
5223 exit (exit_status);
5224 }
5225
5226 void
5227 lt_fatal (const char *message, ...)
5228 {
5229 va_list ap;
5230 va_start (ap, message);
5231 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5232 va_end (ap);
5233 }
5234 EOF
5235 # we should really use a build-platform specific compiler
5236 # here, but OTOH, the wrappers (shell script and this C one)
5237 # are only useful if you want to execute the "real" binary.
5238 # Since the "real" binary is built for $host, then this
5239 # wrapper might as well be built for $host, too.
5240 $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
5241 ;;
5242 esac
5243 $rm $output
5244 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5245
5246 $echo > $output "\
5247 #! $SHELL
5248
5249 # $output - temporary wrapper script for $objdir/$outputname
5250 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5251 #
5252 # The $output program cannot be directly executed until all the libtool
5253 # libraries that it depends on are installed.
5254 #
5255 # This wrapper script should never be moved out of the build directory.
5256 # If it is, it will not operate correctly.
5257
5258 # Sed substitution that helps us do robust quoting. It backslashifies
5259 # metacharacters that are still active within double-quoted strings.
5260 Xsed='${SED} -e 1s/^X//'
5261 sed_quote_subst='$sed_quote_subst'
5262
5263 # The HP-UX ksh and POSIX shell print the target directory to stdout
5264 # if CDPATH is set.
5265 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5266
5267 relink_command=\"$relink_command\"
5268
5269 # This environment variable determines our operation mode.
5270 if test \"\$libtool_install_magic\" = \"$magic\"; then
5271 # install mode needs the following variable:
5272 notinst_deplibs='$notinst_deplibs'
5273 else
5274 # When we are sourced in execute mode, \$file and \$echo are already set.
5275 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5276 echo=\"$qecho\"
5277 file=\"\$0\"
5278 # Make sure echo works.
5279 if test \"X\$1\" = X--no-reexec; then
5280 # Discard the --no-reexec flag, and continue.
5281 shift
5282 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5283 # Yippee, \$echo works!
5284 :
5285 else
5286 # Restart under the correct shell, and then maybe \$echo will work.
5287 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5288 fi
5289 fi\
5290 "
5291 $echo >> $output "\
5292
5293 # Find the directory that this script lives in.
5294 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5295 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5296
5297 # Follow symbolic links until we get to the real thisdir.
5298 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5299 while test -n \"\$file\"; do
5300 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5301
5302 # If there was a directory component, then change thisdir.
5303 if test \"x\$destdir\" != \"x\$file\"; then
5304 case \"\$destdir\" in
5305 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5306 *) thisdir=\"\$thisdir/\$destdir\" ;;
5307 esac
5308 fi
5309
5310 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5311 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5312 done
5313
5314 # Try to get the absolute directory name.
5315 absdir=\`cd \"\$thisdir\" && pwd\`
5316 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5317 "
5318
5319 if test "$fast_install" = yes; then
5320 $echo >> $output "\
5321 program=lt-'$outputname'$exeext
5322 progdir=\"\$thisdir/$objdir\"
5323
5324 if test ! -f \"\$progdir/\$program\" || \\
5325 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5326 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5327
5328 file=\"\$\$-\$program\"
5329
5330 if test ! -d \"\$progdir\"; then
5331 $mkdir \"\$progdir\"
5332 else
5333 $rm \"\$progdir/\$file\"
5334 fi"
5335
5336 $echo >> $output "\
5337
5338 # relink executable if necessary
5339 if test -n \"\$relink_command\"; then
5340 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5341 else
5342 $echo \"\$relink_command_output\" >&2
5343 $rm \"\$progdir/\$file\"
5344 exit $EXIT_FAILURE
5345 fi
5346 fi
5347
5348 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5349 { $rm \"\$progdir/\$program\";
5350 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5351 $rm \"\$progdir/\$file\"
5352 fi"
5353 else
5354 $echo >> $output "\
5355 program='$outputname'
5356 progdir=\"\$thisdir/$objdir\"
5357 "
5358 fi
5359
5360 $echo >> $output "\
5361
5362 if test -f \"\$progdir/\$program\"; then"
5363
5364 # Export our shlibpath_var if we have one.
5365 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5366 $echo >> $output "\
5367 # Add our own library path to $shlibpath_var
5368 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5369
5370 # Some systems cannot cope with colon-terminated $shlibpath_var
5371 # The second colon is a workaround for a bug in BeOS R4 sed
5372 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5373
5374 export $shlibpath_var
5375 "
5376 fi
5377
5378 # fixup the dll searchpath if we need to.
5379 if test -n "$dllsearchpath"; then
5380 $echo >> $output "\
5381 # Add the dll search path components to the executable PATH
5382 PATH=$dllsearchpath:\$PATH
5383 "
5384 fi
5385
5386 $echo >> $output "\
5387 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5388 # Run the actual program with our arguments.
5389 "
5390 case $host in
5391 # Backslashes separate directories on plain windows
5392 *-*-mingw | *-*-os2*)
5393 $echo >> $output "\
5394 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5395 "
5396 ;;
5397
5398 *)
5399 $echo >> $output "\
5400 exec \"\$progdir/\$program\" \${1+\"\$@\"}
5401 "
5402 ;;
5403 esac
5404 $echo >> $output "\
5405 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
5406 exit $EXIT_FAILURE
5407 fi
5408 else
5409 # The program doesn't exist.
5410 \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
5411 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5412 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5413 exit $EXIT_FAILURE
5414 fi
5415 fi\
5416 "
5417 chmod +x $output
5418 fi
5419 exit $EXIT_SUCCESS
5420 ;;
5421 esac
5422
5423 # See if we need to build an old-fashioned archive.
5424 for oldlib in $oldlibs; do
5425
5426 if test "$build_libtool_libs" = convenience; then
5427 oldobjs="$libobjs_save"
5428 addlibs="$convenience"
5429 build_libtool_libs=no
5430 else
5431 if test "$build_libtool_libs" = module; then
5432 oldobjs="$libobjs_save"
5433 build_libtool_libs=no
5434 else
5435 oldobjs="$old_deplibs $non_pic_objects"
5436 fi
5437 addlibs="$old_convenience"
5438 fi
5439
5440 if test -n "$addlibs"; then
5441 gentop="$output_objdir/${outputname}x"
5442 generated="$generated $gentop"
5443
5444 func_extract_archives $gentop $addlibs
5445 oldobjs="$oldobjs $func_extract_archives_result"
5446 fi
5447
5448 # Do each command in the archive commands.
5449 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5450 cmds=$old_archive_from_new_cmds
5451 else
5452 # POSIX demands no paths to be encoded in archives. We have
5453 # to avoid creating archives with duplicate basenames if we
5454 # might have to extract them afterwards, e.g., when creating a
5455 # static archive out of a convenience library, or when linking
5456 # the entirety of a libtool archive into another (currently
5457 # not supported by libtool).
5458 if (for obj in $oldobjs
5459 do
5460 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5461 done | sort | sort -uc >/dev/null 2>&1); then
5462 :
5463 else
5464 $echo "copying selected object files to avoid basename conflicts..."
5465
5466 if test -z "$gentop"; then
5467 gentop="$output_objdir/${outputname}x"
5468 generated="$generated $gentop"
5469
5470 $show "${rm}r $gentop"
5471 $run ${rm}r "$gentop"
5472 $show "$mkdir $gentop"
5473 $run $mkdir "$gentop"
5474 exit_status=$?
5475 if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5476 exit $exit_status
5477 fi
5478 fi
5479
5480 save_oldobjs=$oldobjs
5481 oldobjs=
5482 counter=1
5483 for obj in $save_oldobjs
5484 do
5485 objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5486 case " $oldobjs " in
5487 " ") oldobjs=$obj ;;
5488 *[\ /]"$objbase "*)
5489 while :; do
5490 # Make sure we don't pick an alternate name that also
5491 # overlaps.
5492 newobj=lt$counter-$objbase
5493 counter=`expr $counter + 1`
5494 case " $oldobjs " in
5495 *[\ /]"$newobj "*) ;;
5496 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5497 esac
5498 done
5499 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5500 $run ln "$obj" "$gentop/$newobj" ||
5501 $run cp "$obj" "$gentop/$newobj"
5502 oldobjs="$oldobjs $gentop/$newobj"
5503 ;;
5504 *) oldobjs="$oldobjs $obj" ;;
5505 esac
5506 done
5507 fi
5508
5509 eval cmds=\"$old_archive_cmds\"
5510
5511 if len=`expr "X$cmds" : ".*"` &&
5512 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5513 cmds=$old_archive_cmds
5514 else
5515 # the command line is too long to link in one step, link in parts
5516 $echo "using piecewise archive linking..."
5517 save_RANLIB=$RANLIB
5518 RANLIB=:
5519 objlist=
5520 concat_cmds=
5521 save_oldobjs=$oldobjs
5522
5523 # Is there a better way of finding the last object in the list?
5524 for obj in $save_oldobjs
5525 do
5526 last_oldobj=$obj
5527 done
5528 for obj in $save_oldobjs
5529 do
5530 oldobjs="$objlist $obj"
5531 objlist="$objlist $obj"
5532 eval test_cmds=\"$old_archive_cmds\"
5533 if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
5534 test "$len" -le "$max_cmd_len"; then
5535 :
5536 else
5537 # the above command should be used before it gets too long
5538 oldobjs=$objlist
5539 if test "$obj" = "$last_oldobj" ; then
5540 RANLIB=$save_RANLIB
5541 fi
5542 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5543 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5544 objlist=
5545 fi
5546 done
5547 RANLIB=$save_RANLIB
5548 oldobjs=$objlist
5549 if test "X$oldobjs" = "X" ; then
5550 eval cmds=\"\$concat_cmds\"
5551 else
5552 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5553 fi
5554 fi
5555 fi
5556 save_ifs="$IFS"; IFS='~'
5557 for cmd in $cmds; do
5558 eval cmd=\"$cmd\"
5559 IFS="$save_ifs"
5560 $show "$cmd"
5561 $run eval "$cmd" || exit $?
5562 done
5563 IFS="$save_ifs"
5564 done
5565
5566 if test -n "$generated"; then
5567 $show "${rm}r$generated"
5568 $run ${rm}r$generated
5569 fi
5570
5571 # Now create the libtool archive.
5572 case $output in
5573 *.la)
5574 old_library=
5575 test "$build_old_libs" = yes && old_library="$libname.$libext"
5576 $show "creating $output"
5577
5578 # Preserve any variables that may affect compiler behavior
5579 for var in $variables_saved_for_relink; do
5580 if eval test -z \"\${$var+set}\"; then
5581 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5582 elif eval var_value=\$$var; test -z "$var_value"; then
5583 relink_command="$var=; export $var; $relink_command"
5584 else
5585 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5586 relink_command="$var=\"$var_value\"; export $var; $relink_command"
5587 fi
5588 done
5589 # Quote the link command for shipping.
5590 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5591 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5592 if test "$hardcode_automatic" = yes ; then
5593 relink_command=
5594 fi
5595
5596
5597 # Only create the output if not a dry run.
5598 if test -z "$run"; then
5599 for installed in no yes; do
5600 if test "$installed" = yes; then
5601 if test -z "$install_libdir"; then
5602 break
5603 fi
5604 output="$output_objdir/$outputname"i
5605 # Replace all uninstalled libtool libraries with the installed ones
5606 newdependency_libs=
5607 for deplib in $dependency_libs; do
5608 case $deplib in
5609 *.la)
5610 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
5611 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5612 if test -z "$libdir"; then
5613 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5614 exit $EXIT_FAILURE
5615 fi
5616 newdependency_libs="$newdependency_libs $libdir/$name"
5617 ;;
5618 *) newdependency_libs="$newdependency_libs $deplib" ;;
5619 esac
5620 done
5621 dependency_libs="$newdependency_libs"
5622 newdlfiles=
5623 for lib in $dlfiles; do
5624 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5625 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5626 if test -z "$libdir"; then
5627 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5628 exit $EXIT_FAILURE
5629 fi
5630 newdlfiles="$newdlfiles $libdir/$name"
5631 done
5632 dlfiles="$newdlfiles"
5633 newdlprefiles=
5634 for lib in $dlprefiles; do
5635 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5636 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5637 if test -z "$libdir"; then
5638 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5639 exit $EXIT_FAILURE
5640 fi
5641 newdlprefiles="$newdlprefiles $libdir/$name"
5642 done
5643 dlprefiles="$newdlprefiles"
5644 else
5645 newdlfiles=
5646 for lib in $dlfiles; do
5647 case $lib in
5648 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5649 *) abs=`pwd`"/$lib" ;;
5650 esac
5651 newdlfiles="$newdlfiles $abs"
5652 done
5653 dlfiles="$newdlfiles"
5654 newdlprefiles=
5655 for lib in $dlprefiles; do
5656 case $lib in
5657 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5658 *) abs=`pwd`"/$lib" ;;
5659 esac
5660 newdlprefiles="$newdlprefiles $abs"
5661 done
5662 dlprefiles="$newdlprefiles"
5663 fi
5664 $rm $output
5665 # place dlname in correct position for cygwin
5666 tdlname=$dlname
5667 case $host,$output,$installed,$module,$dlname in
5668 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
5669 esac
5670 $echo > $output "\
5671 # $outputname - a libtool library file
5672 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5673 #
5674 # Please DO NOT delete this file!
5675 # It is necessary for linking the library.
5676
5677 # The name that we can dlopen(3).
5678 dlname='$tdlname'
5679
5680 # Names of this library.
5681 library_names='$library_names'
5682
5683 # The name of the static archive.
5684 old_library='$old_library'
5685
5686 # Libraries that this one depends upon.
5687 dependency_libs='$dependency_libs'
5688
5689 # Version information for $libname.
5690 current=$current
5691 age=$age
5692 revision=$revision
5693
5694 # Is this an already installed library?
5695 installed=$installed
5696
5697 # Should we warn about portability when linking against -modules?
5698 shouldnotlink=$module
5699
5700 # Files to dlopen/dlpreopen
5701 dlopen='$dlfiles'
5702 dlpreopen='$dlprefiles'
5703
5704 # Directory that this library needs to be installed in:
5705 libdir='$install_libdir'"
5706 if test "$installed" = no && test "$need_relink" = yes; then
5707 $echo >> $output "\
5708 relink_command=\"$relink_command\""
5709 fi
5710 done
5711 fi
5712
5713 # Do a symbolic link so that the libtool archive can be found in
5714 # LD_LIBRARY_PATH before the program is installed.
5715 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5716 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
5717 ;;
5718 esac
5719 exit $EXIT_SUCCESS
5720 ;;
5721
5722 # libtool install mode
5723 install)
5724 modename="$modename: install"
5725
5726 # There may be an optional sh(1) argument at the beginning of
5727 # install_prog (especially on Windows NT).
5728 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5729 # Allow the use of GNU shtool's install command.
5730 $echo "X$nonopt" | grep shtool > /dev/null; then
5731 # Aesthetically quote it.
5732 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5733 case $arg in
5734 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5735 arg="\"$arg\""
5736 ;;
5737 esac
5738 install_prog="$arg "
5739 arg="$1"
5740 shift
5741 else
5742 install_prog=
5743 arg=$nonopt
5744 fi
5745
5746 # The real first argument should be the name of the installation program.
5747 # Aesthetically quote it.
5748 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5749 case $arg in
5750 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5751 arg="\"$arg\""
5752 ;;
5753 esac
5754 install_prog="$install_prog$arg"
5755
5756 # We need to accept at least all the BSD install flags.
5757 dest=
5758 files=
5759 opts=
5760 prev=
5761 install_type=
5762 isdir=no
5763 stripme=
5764 for arg
5765 do
5766 if test -n "$dest"; then
5767 files="$files $dest"
5768 dest=$arg
5769 continue
5770 fi
5771
5772 case $arg in
5773 -d) isdir=yes ;;
5774 -f)
5775 case " $install_prog " in
5776 *[\\\ /]cp\ *) ;;
5777 *) prev=$arg ;;
5778 esac
5779 ;;
5780 -g | -m | -o) prev=$arg ;;
5781 -s)
5782 stripme=" -s"
5783 continue
5784 ;;
5785 -*)
5786 ;;
5787 *)
5788 # If the previous option needed an argument, then skip it.
5789 if test -n "$prev"; then
5790 prev=
5791 else
5792 dest=$arg
5793 continue
5794 fi
5795 ;;
5796 esac
5797
5798 # Aesthetically quote the argument.
5799 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5800 case $arg in
5801 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5802 arg="\"$arg\""
5803 ;;
5804 esac
5805 install_prog="$install_prog $arg"
5806 done
5807
5808 if test -z "$install_prog"; then
5809 $echo "$modename: you must specify an install program" 1>&2
5810 $echo "$help" 1>&2
5811 exit $EXIT_FAILURE
5812 fi
5813
5814 if test -n "$prev"; then
5815 $echo "$modename: the \`$prev' option requires an argument" 1>&2
5816 $echo "$help" 1>&2
5817 exit $EXIT_FAILURE
5818 fi
5819
5820 if test -z "$files"; then
5821 if test -z "$dest"; then
5822 $echo "$modename: no file or destination specified" 1>&2
5823 else
5824 $echo "$modename: you must specify a destination" 1>&2
5825 fi
5826 $echo "$help" 1>&2
5827 exit $EXIT_FAILURE
5828 fi
5829
5830 # Strip any trailing slash from the destination.
5831 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5832
5833 # Check to see that the destination is a directory.
5834 test -d "$dest" && isdir=yes
5835 if test "$isdir" = yes; then
5836 destdir="$dest"
5837 destname=
5838 else
5839 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5840 test "X$destdir" = "X$dest" && destdir=.
5841 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5842
5843 # Not a directory, so check to see that there is only one file specified.
5844 set dummy $files
5845 if test "$#" -gt 2; then
5846 $echo "$modename: \`$dest' is not a directory" 1>&2
5847 $echo "$help" 1>&2
5848 exit $EXIT_FAILURE
5849 fi
5850 fi
5851 case $destdir in
5852 [\\/]* | [A-Za-z]:[\\/]*) ;;
5853 *)
5854 for file in $files; do
5855 case $file in
5856 *.lo) ;;
5857 *)
5858 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5859 $echo "$help" 1>&2
5860 exit $EXIT_FAILURE
5861 ;;
5862 esac
5863 done
5864 ;;
5865 esac
5866
5867 # This variable tells wrapper scripts just to set variables rather
5868 # than running their programs.
5869 libtool_install_magic="$magic"
5870
5871 staticlibs=
5872 future_libdirs=
5873 current_libdirs=
5874 for file in $files; do
5875
5876 # Do each installation.
5877 case $file in
5878 *.$libext)
5879 # Do the static libraries later.
5880 staticlibs="$staticlibs $file"
5881 ;;
5882
5883 *.la)
5884 # Check to see that this really is a libtool archive.
5885 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
5886 else
5887 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5888 $echo "$help" 1>&2
5889 exit $EXIT_FAILURE
5890 fi
5891
5892 library_names=
5893 old_library=
5894 relink_command=
5895 # If there is no directory component, then add one.
5896 case $file in
5897 */* | *\\*) . $file ;;
5898 *) . ./$file ;;
5899 esac
5900
5901 # Add the libdir to current_libdirs if it is the destination.
5902 if test "X$destdir" = "X$libdir"; then
5903 case "$current_libdirs " in
5904 *" $libdir "*) ;;
5905 *) current_libdirs="$current_libdirs $libdir" ;;
5906 esac
5907 else
5908 # Note the libdir as a future libdir.
5909 case "$future_libdirs " in
5910 *" $libdir "*) ;;
5911 *) future_libdirs="$future_libdirs $libdir" ;;
5912 esac
5913 fi
5914
5915 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
5916 test "X$dir" = "X$file/" && dir=
5917 dir="$dir$objdir"
5918
5919 if test -n "$relink_command"; then
5920 # Determine the prefix the user has applied to our future dir.
5921 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
5922
5923 # Don't allow the user to place us outside of our expected
5924 # location b/c this prevents finding dependent libraries that
5925 # are installed to the same prefix.
5926 # At present, this check doesn't affect windows .dll's that
5927 # are installed into $libdir/../bin (currently, that works fine)
5928 # but it's something to keep an eye on.
5929 if test "$inst_prefix_dir" = "$destdir"; then
5930 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5931 exit $EXIT_FAILURE
5932 fi
5933
5934 if test -n "$inst_prefix_dir"; then
5935 # Stick the inst_prefix_dir data into the link command.
5936 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
5937 else
5938 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
5939 fi
5940
5941 $echo "$modename: warning: relinking \`$file'" 1>&2
5942 $show "$relink_command"
5943 if $run eval "$relink_command"; then :
5944 else
5945 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5946 exit $EXIT_FAILURE
5947 fi
5948 fi
5949
5950 # See the names of the shared library.
5951 set dummy $library_names
5952 if test -n "$2"; then
5953 realname="$2"
5954 shift
5955 shift
5956
5957 srcname="$realname"
5958 test -n "$relink_command" && srcname="$realname"T
5959
5960 # Install the shared library and build the symlinks.
5961 $show "$install_prog $dir/$srcname $destdir/$realname"
5962 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
5963 if test -n "$stripme" && test -n "$striplib"; then
5964 $show "$striplib $destdir/$realname"
5965 $run eval "$striplib $destdir/$realname" || exit $?
5966 fi
5967
5968 if test "$#" -gt 0; then
5969 # Delete the old symlinks, and create new ones.
5970 # Try `ln -sf' first, because the `ln' binary might depend on
5971 # the symlink we replace! Solaris /bin/ln does not understand -f,
5972 # so we also need to try rm && ln -s.
5973 for linkname
5974 do
5975 if test "$linkname" != "$realname"; then
5976 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
5977 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
5978 fi
5979 done
5980 fi
5981
5982 # Do each command in the postinstall commands.
5983 lib="$destdir/$realname"
5984 cmds=$postinstall_cmds
5985 save_ifs="$IFS"; IFS='~'
5986 for cmd in $cmds; do
5987 IFS="$save_ifs"
5988 eval cmd=\"$cmd\"
5989 $show "$cmd"
5990 $run eval "$cmd" || {
5991 lt_exit=$?
5992
5993 # Restore the uninstalled library and exit
5994 if test "$mode" = relink; then
5995 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
5996 fi
5997
5998 exit $lt_exit
5999 }
6000 done
6001 IFS="$save_ifs"
6002 fi
6003
6004 # Install the pseudo-library for information purposes.
6005 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6006 instname="$dir/$name"i
6007 $show "$install_prog $instname $destdir/$name"
6008 $run eval "$install_prog $instname $destdir/$name" || exit $?
6009
6010 # Maybe install the static library, too.
6011 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
6012 ;;
6013
6014 *.lo)
6015 # Install (i.e. copy) a libtool object.
6016
6017 # Figure out destination file name, if it wasn't already specified.
6018 if test -n "$destname"; then
6019 destfile="$destdir/$destname"
6020 else
6021 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6022 destfile="$destdir/$destfile"
6023 fi
6024
6025 # Deduce the name of the destination old-style object file.
6026 case $destfile in
6027 *.lo)
6028 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
6029 ;;
6030 *.$objext)
6031 staticdest="$destfile"
6032 destfile=
6033 ;;
6034 *)
6035 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
6036 $echo "$help" 1>&2
6037 exit $EXIT_FAILURE
6038 ;;
6039 esac
6040
6041 # Install the libtool object if requested.
6042 if test -n "$destfile"; then
6043 $show "$install_prog $file $destfile"
6044 $run eval "$install_prog $file $destfile" || exit $?
6045 fi
6046
6047 # Install the old object if enabled.
6048 if test "$build_old_libs" = yes; then
6049 # Deduce the name of the old-style object file.
6050 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
6051
6052 $show "$install_prog $staticobj $staticdest"
6053 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
6054 fi
6055 exit $EXIT_SUCCESS
6056 ;;
6057
6058 *)
6059 # Figure out destination file name, if it wasn't already specified.
6060 if test -n "$destname"; then
6061 destfile="$destdir/$destname"
6062 else
6063 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6064 destfile="$destdir/$destfile"
6065 fi
6066
6067 # If the file is missing, and there is a .exe on the end, strip it
6068 # because it is most likely a libtool script we actually want to
6069 # install
6070 stripped_ext=""
6071 case $file in
6072 *.exe)
6073 if test ! -f "$file"; then
6074 file=`$echo $file|${SED} 's,.exe$,,'`
6075 stripped_ext=".exe"
6076 fi
6077 ;;
6078 esac
6079
6080 # Do a test to see if this is really a libtool program.
6081 case $host in
6082 *cygwin*|*mingw*)
6083 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
6084 ;;
6085 *)
6086 wrapper=$file
6087 ;;
6088 esac
6089 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
6090 notinst_deplibs=
6091 relink_command=
6092
6093 # Note that it is not necessary on cygwin/mingw to append a dot to
6094 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6095 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6096 # `FILE.' does not work on cygwin managed mounts.
6097 #
6098 # If there is no directory component, then add one.
6099 case $wrapper in
6100 */* | *\\*) . ${wrapper} ;;
6101 *) . ./${wrapper} ;;
6102 esac
6103
6104 # Check the variables that should have been set.
6105 if test -z "$notinst_deplibs"; then
6106 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6107 exit $EXIT_FAILURE
6108 fi
6109
6110 finalize=yes
6111 for lib in $notinst_deplibs; do
6112 # Check to see that each library is installed.
6113 libdir=
6114 if test -f "$lib"; then
6115 # If there is no directory component, then add one.
6116 case $lib in
6117 */* | *\\*) . $lib ;;
6118 *) . ./$lib ;;
6119 esac
6120 fi
6121 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6122 if test -n "$libdir" && test ! -f "$libfile"; then
6123 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6124 finalize=no
6125 fi
6126 done
6127
6128 relink_command=
6129 # Note that it is not necessary on cygwin/mingw to append a dot to
6130 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6131 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6132 # `FILE.' does not work on cygwin managed mounts.
6133 #
6134 # If there is no directory component, then add one.
6135 case $wrapper in
6136 */* | *\\*) . ${wrapper} ;;
6137 *) . ./${wrapper} ;;
6138 esac
6139
6140 outputname=
6141 if test "$fast_install" = no && test -n "$relink_command"; then
6142 if test "$finalize" = yes && test -z "$run"; then
6143 tmpdir=`func_mktempdir`
6144 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6145 outputname="$tmpdir/$file"
6146 # Replace the output file specification.
6147 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
6148
6149 $show "$relink_command"
6150 if $run eval "$relink_command"; then :
6151 else
6152 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6153 ${rm}r "$tmpdir"
6154 continue
6155 fi
6156 file="$outputname"
6157 else
6158 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6159 fi
6160 else
6161 # Install the binary that we compiled earlier.
6162 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6163 fi
6164 fi
6165
6166 # remove .exe since cygwin /usr/bin/install will append another
6167 # one anyway
6168 case $install_prog,$host in
6169 */usr/bin/install*,*cygwin*)
6170 case $file:$destfile in
6171 *.exe:*.exe)
6172 # this is ok
6173 ;;
6174 *.exe:*)
6175 destfile=$destfile.exe
6176 ;;
6177 *:*.exe)
6178 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6179 ;;
6180 esac
6181 ;;
6182 esac
6183 $show "$install_prog$stripme $file $destfile"
6184 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
6185 test -n "$outputname" && ${rm}r "$tmpdir"
6186 ;;
6187 esac
6188 done
6189
6190 for file in $staticlibs; do
6191 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6192
6193 # Set up the ranlib parameters.
6194 oldlib="$destdir/$name"
6195
6196 $show "$install_prog $file $oldlib"
6197 $run eval "$install_prog \$file \$oldlib" || exit $?
6198
6199 if test -n "$stripme" && test -n "$old_striplib"; then
6200 $show "$old_striplib $oldlib"
6201 $run eval "$old_striplib $oldlib" || exit $?
6202 fi
6203
6204 # Do each command in the postinstall commands.
6205 cmds=$old_postinstall_cmds
6206 save_ifs="$IFS"; IFS='~'
6207 for cmd in $cmds; do
6208 IFS="$save_ifs"
6209 eval cmd=\"$cmd\"
6210 $show "$cmd"
6211 $run eval "$cmd" || exit $?
6212 done
6213 IFS="$save_ifs"
6214 done
6215
6216 if test -n "$future_libdirs"; then
6217 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6218 fi
6219
6220 if test -n "$current_libdirs"; then
6221 # Maybe just do a dry run.
6222 test -n "$run" && current_libdirs=" -n$current_libdirs"
6223 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
6224 else
6225 exit $EXIT_SUCCESS
6226 fi
6227 ;;
6228
6229 # libtool finish mode
6230 finish)
6231 modename="$modename: finish"
6232 libdirs="$nonopt"
6233 admincmds=
6234
6235 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6236 for dir
6237 do
6238 libdirs="$libdirs $dir"
6239 done
6240
6241 for libdir in $libdirs; do
6242 if test -n "$finish_cmds"; then
6243 # Do each command in the finish commands.
6244 cmds=$finish_cmds
6245 save_ifs="$IFS"; IFS='~'
6246 for cmd in $cmds; do
6247 IFS="$save_ifs"
6248 eval cmd=\"$cmd\"
6249 $show "$cmd"
6250 $run eval "$cmd" || admincmds="$admincmds
6251 $cmd"
6252 done
6253 IFS="$save_ifs"
6254 fi
6255 if test -n "$finish_eval"; then
6256 # Do the single finish_eval.
6257 eval cmds=\"$finish_eval\"
6258 $run eval "$cmds" || admincmds="$admincmds
6259 $cmds"
6260 fi
6261 done
6262 fi
6263
6264 # Exit here if they wanted silent mode.
6265 test "$show" = : && exit $EXIT_SUCCESS
6266
6267 $echo "X----------------------------------------------------------------------" | $Xsed
6268 $echo "Libraries have been installed in:"
6269 for libdir in $libdirs; do
6270 $echo " $libdir"
6271 done
6272 $echo
6273 $echo "If you ever happen to want to link against installed libraries"
6274 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6275 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6276 $echo "flag during linking and do at least one of the following:"
6277 if test -n "$shlibpath_var"; then
6278 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6279 $echo " during execution"
6280 fi
6281 if test -n "$runpath_var"; then
6282 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6283 $echo " during linking"
6284 fi
6285 if test -n "$hardcode_libdir_flag_spec"; then
6286 libdir=LIBDIR
6287 eval flag=\"$hardcode_libdir_flag_spec\"
6288
6289 $echo " - use the \`$flag' linker flag"
6290 fi
6291 if test -n "$admincmds"; then
6292 $echo " - have your system administrator run these commands:$admincmds"
6293 fi
6294 if test -f /etc/ld.so.conf; then
6295 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6296 fi
6297 $echo
6298 $echo "See any operating system documentation about shared libraries for"
6299 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6300 $echo "X----------------------------------------------------------------------" | $Xsed
6301 exit $EXIT_SUCCESS
6302 ;;
6303
6304 # libtool execute mode
6305 execute)
6306 modename="$modename: execute"
6307
6308 # The first argument is the command name.
6309 cmd="$nonopt"
6310 if test -z "$cmd"; then
6311 $echo "$modename: you must specify a COMMAND" 1>&2
6312 $echo "$help"
6313 exit $EXIT_FAILURE
6314 fi
6315
6316 # Handle -dlopen flags immediately.
6317 for file in $execute_dlfiles; do
6318 if test ! -f "$file"; then
6319 $echo "$modename: \`$file' is not a file" 1>&2
6320 $echo "$help" 1>&2
6321 exit $EXIT_FAILURE
6322 fi
6323
6324 dir=
6325 case $file in
6326 *.la)
6327 # Check to see that this really is a libtool archive.
6328 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6329 else
6330 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6331 $echo "$help" 1>&2
6332 exit $EXIT_FAILURE
6333 fi
6334
6335 # Read the libtool library.
6336 dlname=
6337 library_names=
6338
6339 # If there is no directory component, then add one.
6340 case $file in
6341 */* | *\\*) . $file ;;
6342 *) . ./$file ;;
6343 esac
6344
6345 # Skip this library if it cannot be dlopened.
6346 if test -z "$dlname"; then
6347 # Warn if it was a shared library.
6348 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6349 continue
6350 fi
6351
6352 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6353 test "X$dir" = "X$file" && dir=.
6354
6355 if test -f "$dir/$objdir/$dlname"; then
6356 dir="$dir/$objdir"
6357 else
6358 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6359 exit $EXIT_FAILURE
6360 fi
6361 ;;
6362
6363 *.lo)
6364 # Just add the directory containing the .lo file.
6365 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6366 test "X$dir" = "X$file" && dir=.
6367 ;;
6368
6369 *)
6370 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6371 continue
6372 ;;
6373 esac
6374
6375 # Get the absolute pathname.
6376 absdir=`cd "$dir" && pwd`
6377 test -n "$absdir" && dir="$absdir"
6378
6379 # Now add the directory to shlibpath_var.
6380 if eval "test -z \"\$$shlibpath_var\""; then
6381 eval "$shlibpath_var=\"\$dir\""
6382 else
6383 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6384 fi
6385 done
6386
6387 # This variable tells wrapper scripts just to set shlibpath_var
6388 # rather than running their programs.
6389 libtool_execute_magic="$magic"
6390
6391 # Check if any of the arguments is a wrapper script.
6392 args=
6393 for file
6394 do
6395 case $file in
6396 -*) ;;
6397 *)
6398 # Do a test to see if this is really a libtool program.
6399 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6400 # If there is no directory component, then add one.
6401 case $file in
6402 */* | *\\*) . $file ;;
6403 *) . ./$file ;;
6404 esac
6405
6406 # Transform arg to wrapped name.
6407 file="$progdir/$program"
6408 fi
6409 ;;
6410 esac
6411 # Quote arguments (to preserve shell metacharacters).
6412 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6413 args="$args \"$file\""
6414 done
6415
6416 if test -z "$run"; then
6417 if test -n "$shlibpath_var"; then
6418 # Export the shlibpath_var.
6419 eval "export $shlibpath_var"
6420 fi
6421
6422 # Restore saved environment variables
6423 if test "${save_LC_ALL+set}" = set; then
6424 LC_ALL="$save_LC_ALL"; export LC_ALL
6425 fi
6426 if test "${save_LANG+set}" = set; then
6427 LANG="$save_LANG"; export LANG
6428 fi
6429
6430 # Now prepare to actually exec the command.
6431 exec_cmd="\$cmd$args"
6432 else
6433 # Display what would be done.
6434 if test -n "$shlibpath_var"; then
6435 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6436 $echo "export $shlibpath_var"
6437 fi
6438 $echo "$cmd$args"
6439 exit $EXIT_SUCCESS
6440 fi
6441 ;;
6442
6443 # libtool clean and uninstall mode
6444 clean | uninstall)
6445 modename="$modename: $mode"
6446 rm="$nonopt"
6447 files=
6448 rmforce=
6449 exit_status=0
6450
6451 # This variable tells wrapper scripts just to set variables rather
6452 # than running their programs.
6453 libtool_install_magic="$magic"
6454
6455 for arg
6456 do
6457 case $arg in
6458 -f) rm="$rm $arg"; rmforce=yes ;;
6459 -*) rm="$rm $arg" ;;
6460 *) files="$files $arg" ;;
6461 esac
6462 done
6463
6464 if test -z "$rm"; then
6465 $echo "$modename: you must specify an RM program" 1>&2
6466 $echo "$help" 1>&2
6467 exit $EXIT_FAILURE
6468 fi
6469
6470 rmdirs=
6471
6472 origobjdir="$objdir"
6473 for file in $files; do
6474 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6475 if test "X$dir" = "X$file"; then
6476 dir=.
6477 objdir="$origobjdir"
6478 else
6479 objdir="$dir/$origobjdir"
6480 fi
6481 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6482 test "$mode" = uninstall && objdir="$dir"
6483
6484 # Remember objdir for removal later, being careful to avoid duplicates
6485 if test "$mode" = clean; then
6486 case " $rmdirs " in
6487 *" $objdir "*) ;;
6488 *) rmdirs="$rmdirs $objdir" ;;
6489 esac
6490 fi
6491
6492 # Don't error if the file doesn't exist and rm -f was used.
6493 if (test -L "$file") >/dev/null 2>&1 \
6494 || (test -h "$file") >/dev/null 2>&1 \
6495 || test -f "$file"; then
6496 :
6497 elif test -d "$file"; then
6498 exit_status=1
6499 continue
6500 elif test "$rmforce" = yes; then
6501 continue
6502 fi
6503
6504 rmfiles="$file"
6505
6506 case $name in
6507 *.la)
6508 # Possibly a libtool archive, so verify it.
6509 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6510 . $dir/$name
6511
6512 # Delete the libtool libraries and symlinks.
6513 for n in $library_names; do
6514 rmfiles="$rmfiles $objdir/$n"
6515 done
6516 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6517
6518 case "$mode" in
6519 clean)
6520 case " $library_names " in
6521 # " " in the beginning catches empty $dlname
6522 *" $dlname "*) ;;
6523 *) rmfiles="$rmfiles $objdir/$dlname" ;;
6524 esac
6525 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6526 ;;
6527 uninstall)
6528 if test -n "$library_names"; then
6529 # Do each command in the postuninstall commands.
6530 cmds=$postuninstall_cmds
6531 save_ifs="$IFS"; IFS='~'
6532 for cmd in $cmds; do
6533 IFS="$save_ifs"
6534 eval cmd=\"$cmd\"
6535 $show "$cmd"
6536 $run eval "$cmd"
6537 if test "$?" -ne 0 && test "$rmforce" != yes; then
6538 exit_status=1
6539 fi
6540 done
6541 IFS="$save_ifs"
6542 fi
6543
6544 if test -n "$old_library"; then
6545 # Do each command in the old_postuninstall commands.
6546 cmds=$old_postuninstall_cmds
6547 save_ifs="$IFS"; IFS='~'
6548 for cmd in $cmds; do
6549 IFS="$save_ifs"
6550 eval cmd=\"$cmd\"
6551 $show "$cmd"
6552 $run eval "$cmd"
6553 if test "$?" -ne 0 && test "$rmforce" != yes; then
6554 exit_status=1
6555 fi
6556 done
6557 IFS="$save_ifs"
6558 fi
6559 # FIXME: should reinstall the best remaining shared library.
6560 ;;
6561 esac
6562 fi
6563 ;;
6564
6565 *.lo)
6566 # Possibly a libtool object, so verify it.
6567 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6568
6569 # Read the .lo file
6570 . $dir/$name
6571
6572 # Add PIC object to the list of files to remove.
6573 if test -n "$pic_object" \
6574 && test "$pic_object" != none; then
6575 rmfiles="$rmfiles $dir/$pic_object"
6576 fi
6577
6578 # Add non-PIC object to the list of files to remove.
6579 if test -n "$non_pic_object" \
6580 && test "$non_pic_object" != none; then
6581 rmfiles="$rmfiles $dir/$non_pic_object"
6582 fi
6583 fi
6584 ;;
6585
6586 *)
6587 if test "$mode" = clean ; then
6588 noexename=$name
6589 case $file in
6590 *.exe)
6591 file=`$echo $file|${SED} 's,.exe$,,'`
6592 noexename=`$echo $name|${SED} 's,.exe$,,'`
6593 # $file with .exe has already been added to rmfiles,
6594 # add $file without .exe
6595 rmfiles="$rmfiles $file"
6596 ;;
6597 esac
6598 # Do a test to see if this is a libtool program.
6599 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6600 relink_command=
6601 . $dir/$noexename
6602
6603 # note $name still contains .exe if it was in $file originally
6604 # as does the version of $file that was added into $rmfiles
6605 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6606 if test "$fast_install" = yes && test -n "$relink_command"; then
6607 rmfiles="$rmfiles $objdir/lt-$name"
6608 fi
6609 if test "X$noexename" != "X$name" ; then
6610 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
6611 fi
6612 fi
6613 fi
6614 ;;
6615 esac
6616 $show "$rm $rmfiles"
6617 $run $rm $rmfiles || exit_status=1
6618 done
6619 objdir="$origobjdir"
6620
6621 # Try to remove the ${objdir}s in the directories where we deleted files
6622 for dir in $rmdirs; do
6623 if test -d "$dir"; then
6624 $show "rmdir $dir"
6625 $run rmdir $dir >/dev/null 2>&1
6626 fi
6627 done
6628
6629 exit $exit_status
6630 ;;
6631
6632 "")
6633 $echo "$modename: you must specify a MODE" 1>&2
6634 $echo "$generic_help" 1>&2
6635 exit $EXIT_FAILURE
6636 ;;
6637 esac
6638
6639 if test -z "$exec_cmd"; then
6640 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6641 $echo "$generic_help" 1>&2
6642 exit $EXIT_FAILURE
6643 fi
6644 fi # test -z "$show_help"
6645
6646 if test -n "$exec_cmd"; then
6647 eval exec $exec_cmd
6648 exit $EXIT_FAILURE
6649 fi
6650
6651 # We need to display help for each of the modes.
6652 case $mode in
6653 "") $echo \
6654 "Usage: $modename [OPTION]... [MODE-ARG]...
6655
6656 Provide generalized library-building support services.
6657
6658 --config show all configuration variables
6659 --debug enable verbose shell tracing
6660 -n, --dry-run display commands without modifying any files
6661 --features display basic configuration information and exit
6662 --finish same as \`--mode=finish'
6663 --help display this help message and exit
6664 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
6665 --quiet same as \`--silent'
6666 --silent don't print informational messages
6667 --tag=TAG use configuration variables from tag TAG
6668 --version print version information
6669
6670 MODE must be one of the following:
6671
6672 clean remove files from the build directory
6673 compile compile a source file into a libtool object
6674 execute automatically set library path, then run a program
6675 finish complete the installation of libtool libraries
6676 install install libraries or executables
6677 link create a library or an executable
6678 uninstall remove libraries from an installed directory
6679
6680 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
6681 a more detailed description of MODE.
6682
6683 Report bugs to <bug-libtool@gnu.org>."
6684 exit $EXIT_SUCCESS
6685 ;;
6686
6687 clean)
6688 $echo \
6689 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
6690
6691 Remove files from the build directory.
6692
6693 RM is the name of the program to use to delete files associated with each FILE
6694 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6695 to RM.
6696
6697 If FILE is a libtool library, object or program, all the files associated
6698 with it are deleted. Otherwise, only FILE itself is deleted using RM."
6699 ;;
6700
6701 compile)
6702 $echo \
6703 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
6704
6705 Compile a source file into a libtool library object.
6706
6707 This mode accepts the following additional options:
6708
6709 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
6710 -prefer-pic try to building PIC objects only
6711 -prefer-non-pic try to building non-PIC objects only
6712 -static always build a \`.o' file suitable for static linking
6713
6714 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
6715 from the given SOURCEFILE.
6716
6717 The output file name is determined by removing the directory component from
6718 SOURCEFILE, then substituting the C source code suffix \`.c' with the
6719 library object suffix, \`.lo'."
6720 ;;
6721
6722 execute)
6723 $echo \
6724 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
6725
6726 Automatically set library path, then run a program.
6727
6728 This mode accepts the following additional options:
6729
6730 -dlopen FILE add the directory containing FILE to the library path
6731
6732 This mode sets the library path environment variable according to \`-dlopen'
6733 flags.
6734
6735 If any of the ARGS are libtool executable wrappers, then they are translated
6736 into their corresponding uninstalled binary, and any of their required library
6737 directories are added to the library path.
6738
6739 Then, COMMAND is executed, with ARGS as arguments."
6740 ;;
6741
6742 finish)
6743 $echo \
6744 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6745
6746 Complete the installation of libtool libraries.
6747
6748 Each LIBDIR is a directory that contains libtool libraries.
6749
6750 The commands that this mode executes may require superuser privileges. Use
6751 the \`--dry-run' option if you just want to see what would be executed."
6752 ;;
6753
6754 install)
6755 $echo \
6756 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6757
6758 Install executables or libraries.
6759
6760 INSTALL-COMMAND is the installation command. The first component should be
6761 either the \`install' or \`cp' program.
6762
6763 The rest of the components are interpreted as arguments to that command (only
6764 BSD-compatible install options are recognized)."
6765 ;;
6766
6767 link)
6768 $echo \
6769 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6770
6771 Link object files or libraries together to form another library, or to
6772 create an executable program.
6773
6774 LINK-COMMAND is a command using the C compiler that you would use to create
6775 a program from several object files.
6776
6777 The following components of LINK-COMMAND are treated specially:
6778
6779 -all-static do not do any dynamic linking at all
6780 -avoid-version do not add a version suffix if possible
6781 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
6782 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
6783 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6784 -export-symbols SYMFILE
6785 try to export only the symbols listed in SYMFILE
6786 -export-symbols-regex REGEX
6787 try to export only the symbols matching REGEX
6788 -LLIBDIR search LIBDIR for required installed libraries
6789 -lNAME OUTPUT-FILE requires the installed library libNAME
6790 -module build a library that can dlopened
6791 -no-fast-install disable the fast-install mode
6792 -no-install link a not-installable executable
6793 -no-undefined declare that a library does not refer to external symbols
6794 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6795 -objectlist FILE Use a list of object files found in FILE to specify objects
6796 -precious-files-regex REGEX
6797 don't remove output files matching REGEX
6798 -release RELEASE specify package release information
6799 -rpath LIBDIR the created library will eventually be installed in LIBDIR
6800 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
6801 -static do not do any dynamic linking of libtool libraries
6802 -version-info CURRENT[:REVISION[:AGE]]
6803 specify library version info [each variable defaults to 0]
6804
6805 All other options (arguments beginning with \`-') are ignored.
6806
6807 Every other argument is treated as a filename. Files ending in \`.la' are
6808 treated as uninstalled libtool libraries, other files are standard or library
6809 object files.
6810
6811 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6812 only library objects (\`.lo' files) may be specified, and \`-rpath' is
6813 required, except when creating a convenience library.
6814
6815 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6816 using \`ar' and \`ranlib', or on Windows using \`lib'.
6817
6818 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6819 is created, otherwise an executable program is created."
6820 ;;
6821
6822 uninstall)
6823 $echo \
6824 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6825
6826 Remove libraries from an installation directory.
6827
6828 RM is the name of the program to use to delete files associated with each FILE
6829 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6830 to RM.
6831
6832 If FILE is a libtool library, all the files associated with it are deleted.
6833 Otherwise, only FILE itself is deleted using RM."
6834 ;;
6835
6836 *)
6837 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6838 $echo "$help" 1>&2
6839 exit $EXIT_FAILURE
6840 ;;
6841 esac
6842
6843 $echo
6844 $echo "Try \`$modename --help' for more information about other modes."
6845
6846 exit $?
6847
6848 # The TAGs below are defined such that we never get into a situation
6849 # in which we disable both kinds of libraries. Given conflicting
6850 # choices, we go for a static library, that is the most portable,
6851 # since we can't tell whether shared libraries were disabled because
6852 # the user asked for that or because the platform doesn't support
6853 # them. This is particularly important on AIX, because we don't
6854 # support having both static and shared libraries enabled at the same
6855 # time on that platform, so we default to a shared-only configuration.
6856 # If a disable-shared tag is given, we'll fallback to a static-only
6857 # configuration. But we'll never go from static-only to shared-only.
6858
6859 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6860 disable_libs=shared
6861 # ### END LIBTOOL TAG CONFIG: disable-shared
6862
6863 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
6864 disable_libs=static
6865 # ### END LIBTOOL TAG CONFIG: disable-static
6866
6867 # Local Variables:
6868 # mode:shell-script
6869 # sh-indentation:2
6870 # End:
0 #! /bin/sh
1 # Common stub for a few missing GNU programs while installing.
2 # Copyright (C) 1996, 1997, 2001, 2002 Free Software Foundation, Inc.
3 # Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
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, or (at your option)
8 # 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
18 # 02111-1307, USA.
19
20 if test $# -eq 0; then
21 echo 1>&2 "Try \`$0 --help' for more information"
22 exit 1
23 fi
24
25 # In the cases where this matters, `missing' is being run in the
26 # srcdir already.
27 if test -f configure.in; then
28 configure_ac=configure.ac
29 else
30 configure_ac=configure.in
31 fi
32
33 case "$1" in
34
35 -h|--h|--he|--hel|--help)
36 echo "\
37 $0 [OPTION]... PROGRAM [ARGUMENT]...
38
39 Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
40 error status if there is no known handling for PROGRAM.
41
42 Options:
43 -h, --help display this help and exit
44 -v, --version output version information and exit
45
46 Supported PROGRAM values:
47 aclocal touch file \`aclocal.m4'
48 autoconf touch file \`configure'
49 autoheader touch file \`config.h.in'
50 automake touch all \`Makefile.in' files
51 bison create \`y.tab.[ch]', if possible, from existing .[ch]
52 flex create \`lex.yy.c', if possible, from existing .c
53 lex create \`lex.yy.c', if possible, from existing .c
54 makeinfo touch the output file
55 yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
56 ;;
57
58 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
59 echo "missing - GNU libit 0.0"
60 ;;
61
62 -*)
63 echo 1>&2 "$0: Unknown \`$1' option"
64 echo 1>&2 "Try \`$0 --help' for more information"
65 exit 1
66 ;;
67
68 aclocal*)
69 echo 1>&2 "\
70 WARNING: \`$1' is missing on your system. You should only need it if
71 you modified \`acinclude.m4' or \`$configure_ac'. You might want
72 to install the \`Automake' and \`Perl' packages. Grab them from
73 any GNU archive site."
74 touch aclocal.m4
75 ;;
76
77 autoconf)
78 echo 1>&2 "\
79 WARNING: \`$1' is missing on your system. You should only need it if
80 you modified \`$configure_ac'. You might want to install the
81 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
82 archive site."
83 touch configure
84 ;;
85
86 autoheader)
87 echo 1>&2 "\
88 WARNING: \`$1' is missing on your system. You should only need it if
89 you modified \`acconfig.h' or \`$configure_ac'. You might want
90 to install the \`Autoconf' and \`GNU m4' packages. Grab them
91 from any GNU archive site."
92 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' $configure_ac`
93 test -z "$files" && files="config.h"
94 touch_files=
95 for f in $files; do
96 case "$f" in
97 *:*) touch_files="$touch_files "`echo "$f" |
98 sed -e 's/^[^:]*://' -e 's/:.*//'`;;
99 *) touch_files="$touch_files $f.in";;
100 esac
101 done
102 touch $touch_files
103 ;;
104
105 automake*)
106 echo 1>&2 "\
107 WARNING: \`$1' is missing on your system. You should only need it if
108 you modified \`Makefile.am', \`acinclude.m4' or \`$configure_ac'.
109 You might want to install the \`Automake' and \`Perl' packages.
110 Grab them from any GNU archive site."
111 find . -type f -name Makefile.am -print |
112 sed 's/\.am$/.in/' |
113 while read f; do touch "$f"; done
114 ;;
115
116 bison|yacc)
117 echo 1>&2 "\
118 WARNING: \`$1' is missing on your system. You should only need it if
119 you modified a \`.y' file. You may need the \`Bison' package
120 in order for those modifications to take effect. You can get
121 \`Bison' from any GNU archive site."
122 rm -f y.tab.c y.tab.h
123 if [ $# -ne 1 ]; then
124 eval LASTARG="\${$#}"
125 case "$LASTARG" in
126 *.y)
127 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
128 if [ -f "$SRCFILE" ]; then
129 cp "$SRCFILE" y.tab.c
130 fi
131 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
132 if [ -f "$SRCFILE" ]; then
133 cp "$SRCFILE" y.tab.h
134 fi
135 ;;
136 esac
137 fi
138 if [ ! -f y.tab.h ]; then
139 echo >y.tab.h
140 fi
141 if [ ! -f y.tab.c ]; then
142 echo 'main() { return 0; }' >y.tab.c
143 fi
144 ;;
145
146 lex|flex)
147 echo 1>&2 "\
148 WARNING: \`$1' is missing on your system. You should only need it if
149 you modified a \`.l' file. You may need the \`Flex' package
150 in order for those modifications to take effect. You can get
151 \`Flex' from any GNU archive site."
152 rm -f lex.yy.c
153 if [ $# -ne 1 ]; then
154 eval LASTARG="\${$#}"
155 case "$LASTARG" in
156 *.l)
157 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
158 if [ -f "$SRCFILE" ]; then
159 cp "$SRCFILE" lex.yy.c
160 fi
161 ;;
162 esac
163 fi
164 if [ ! -f lex.yy.c ]; then
165 echo 'main() { return 0; }' >lex.yy.c
166 fi
167 ;;
168
169 makeinfo)
170 echo 1>&2 "\
171 WARNING: \`$1' is missing on your system. You should only need it if
172 you modified a \`.texi' or \`.texinfo' file, or any other file
173 indirectly affecting the aspect of the manual. The spurious
174 call might also be the consequence of using a buggy \`make' (AIX,
175 DU, IRIX). You might want to install the \`Texinfo' package or
176 the \`GNU make' package. Grab either from any GNU archive site."
177 file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
178 if test -z "$file"; then
179 file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
180 file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
181 fi
182 touch $file
183 ;;
184
185 *)
186 echo 1>&2 "\
187 WARNING: \`$1' is needed, and you do not seem to have it handy on your
188 system. You might have modified some files without having the
189 proper tools for further handling them. Check the \`README' file,
190 it often tells you about the needed prerequirements for installing
191 this package. You may also peek at any GNU archive site, in case
192 some other package would contain this missing \`$1' program."
193 exit 1
194 ;;
195 esac
196
197 exit 0
0 #! /bin/sh
1 # mkinstalldirs --- make directory hierarchy
2 # Author: Noah Friedman <friedman@prep.ai.mit.edu>
3 # Created: 1993-05-16
4 # Public domain
5
6 # $Id: mkinstalldirs,v 1.1.1.1 2005/02/18 07:45:37 kzamir Exp $
7
8 errstatus=0
9
10 for file
11 do
12 set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
13 shift
14
15 pathcomp=
16 for d
17 do
18 pathcomp="$pathcomp$d"
19 case "$pathcomp" in
20 -* ) pathcomp=./$pathcomp ;;
21 esac
22
23 if test ! -d "$pathcomp"; then
24 echo "mkdir $pathcomp"
25
26 mkdir "$pathcomp" || lasterr=$?
27
28 if test ! -d "$pathcomp"; then
29 errstatus=$lasterr
30 fi
31 fi
32
33 pathcomp="$pathcomp/"
34 done
35 done
36
37 exit $errstatus
38
39 # mkinstalldirs ends here
(New empty file)
0 # Makefile for program source directory in GNU NLS utilities package.
1 # Copyright (C) 1995-1997, 2000, 2001 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
2 #
3 # This file file be copied and used freely without restrictions. It can
4 # be used in projects which are not available under the GNU Public License
5 # but which still want to provide support for the GNU gettext functionality.
6 # Please note that the actual code is *not* freely available.
7
8 PACKAGE = @PACKAGE@
9 VERSION = @VERSION@
10
11 # These two variables depend on the location of this directory.
12 subdir = po
13 top_builddir = ..
14
15 SHELL = /bin/sh
16 @SET_MAKE@
17
18 srcdir = @srcdir@
19 top_srcdir = @top_srcdir@
20 VPATH = @srcdir@
21
22 prefix = @prefix@
23 exec_prefix = @exec_prefix@
24 datadir = @datadir@
25 localedir = $(datadir)/locale
26 gettextsrcdir = $(datadir)/gettext/po
27
28 INSTALL = @INSTALL@
29 INSTALL_DATA = @INSTALL_DATA@
30 MKINSTALLDIRS = @MKINSTALLDIRS@
31 mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(MKINSTALLDIRS)" ;; esac`
32
33 CC = @CC@
34 GMSGFMT = @GMSGFMT@
35 MSGFMT = @MSGFMT@
36 XGETTEXT = @XGETTEXT@
37 MSGMERGE = msgmerge
38
39 DEFS = @DEFS@
40 CFLAGS = @CFLAGS@
41 CPPFLAGS = @CPPFLAGS@
42
43 INCLUDES = -I.. -I$(top_srcdir)/intl
44
45 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
46
47 POFILES = @POFILES@
48 GMOFILES = @GMOFILES@
49 DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
50 $(POFILES) $(GMOFILES)
51
52 POTFILES = \
53
54 CATALOGS = @CATALOGS@
55
56 .SUFFIXES:
57 .SUFFIXES: .c .o .po .pox .gmo .mo
58
59 .c.o:
60 $(COMPILE) $<
61
62 .po.pox:
63 $(MAKE) $(PACKAGE).pot
64 $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
65
66 .po.mo:
67 $(MSGFMT) -o $@ $<
68
69 .po.gmo:
70 file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
71 && rm -f $$file && $(GMSGFMT) --statistics -o $$file $<
72
73
74 all: all-@USE_NLS@
75
76 all-yes: $(CATALOGS)
77 all-no:
78
79 # Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot',
80 # otherwise packages like GCC can not be built if only parts of the source
81 # have been downloaded.
82
83 $(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in
84 $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
85 --add-comments --keyword=_ --keyword=N_ \
86 --files-from=$(srcdir)/POTFILES.in \
87 && test ! -f $(PACKAGE).po \
88 || ( rm -f $(srcdir)/$(PACKAGE).pot \
89 && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
90
91
92 install: install-exec install-data
93 install-exec:
94 install-data: install-data-@USE_NLS@
95 if test "$(PACKAGE)" = "gettext"; then \
96 $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
97 $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
98 $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
99 else \
100 : ; \
101 fi
102 install-data-no: all
103 install-data-yes: all
104 $(mkinstalldirs) $(DESTDIR)$(datadir)
105 @catalogs='$(CATALOGS)'; \
106 for cat in $$catalogs; do \
107 cat=`basename $$cat`; \
108 lang=`echo $$cat | sed 's/\.gmo$$//'`; \
109 dir=$(localedir)/$$lang/LC_MESSAGES; \
110 $(mkinstalldirs) $(DESTDIR)$$dir; \
111 if test -r $$cat; then \
112 $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
113 echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \
114 else \
115 $(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
116 echo "installing $(srcdir)/$$cat as" \
117 "$(DESTDIR)$$dir/$(PACKAGE).mo"; \
118 fi; \
119 done
120
121 # Define this as empty until I found a useful application.
122 installcheck:
123
124 uninstall:
125 catalogs='$(CATALOGS)'; \
126 for cat in $$catalogs; do \
127 cat=`basename $$cat`; \
128 lang=`echo $$cat | sed 's/\.gmo$$//'`; \
129 rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
130 done
131 if test "$(PACKAGE)" = "gettext"; then \
132 rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
133 else \
134 : ; \
135 fi
136
137 check: all
138
139 dvi info tags TAGS ID:
140
141 mostlyclean:
142 rm -f core core.* *.pox $(PACKAGE).po *.new.po
143 rm -fr *.o
144
145 clean: mostlyclean
146
147 distclean: clean
148 rm -f Makefile Makefile.in POTFILES *.mo
149
150 maintainer-clean: distclean
151 @echo "This command is intended for maintainers to use;"
152 @echo "it deletes files that may require special tools to rebuild."
153 rm -f $(GMOFILES)
154
155 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
156 dist distdir:
157 $(MAKE) update-po
158 @$(MAKE) dist2
159 # This is a separate target because 'update-po' must be executed before.
160 dist2: $(DISTFILES)
161 dists="$(DISTFILES)"; \
162 for file in $$dists; do \
163 if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
164 cp -p $$dir/$$file $(distdir); \
165 done
166
167 update-po: Makefile
168 $(MAKE) $(PACKAGE).pot
169 if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
170 cd $(srcdir); \
171 catalogs='$(GMOFILES)'; \
172 for cat in $$catalogs; do \
173 cat=`basename $$cat`; \
174 lang=`echo $$cat | sed 's/\.gmo$$//'`; \
175 echo "$$lang:"; \
176 if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \
177 mv -f $$lang.new.po $$lang.po; \
178 else \
179 echo "msgmerge for $$cat failed!"; \
180 rm -f $$lang.new.po; \
181 fi; \
182 done
183 $(MAKE) update-gmo
184
185 update-gmo: Makefile $(GMOFILES)
186 @:
187
188 Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
189 cd $(top_builddir) \
190 && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
191 $(SHELL) ./config.status
192
193 # Tell versions [3.59,3.63) of GNU make not to export all variables.
194 # Otherwise a system limit (for SysV at least) may be exceeded.
195 .NOEXPORT:
0 # List of source files containing translatable strings.
1
2 ## Created by Anjuta - will be overwritten
3 ## If you don't want it to overwrite it,
4 ## Please disable it in the Anjuta project configuration
5
6 # Source files
7 src/hdate_strings.c
Binary diff not shown
0 # translation of libhdate.po to Spanish
1 # This file is distributed under the same license as the libhdate package.
2 # Copyright (C) 2005 Yaacov Zamir, Peled Esti
3 # Peled Esti <esti@actcom.co.il>, 2005.
4 #
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: es_MX\n"
8 "Report-Msgid-Bugs-To: \n"
9 "POT-Creation-Date: 2005-08-08 00:38+0300\n"
10 "PO-Revision-Date: 2005-03-07 12:44+0200\n"
11 "Last-Translator: Peled Esti <esti@actcom.co.il>\n"
12 "Language-Team: Spanish\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16
17 #: src/hdate_strings.c:131
18 msgid "Sun"
19 msgstr "Dom"
20
21 #: src/hdate_strings.c:131
22 msgid "Mon"
23 msgstr "Lun"
24
25 #: src/hdate_strings.c:131
26 msgid "Tue"
27 msgstr "Mar"
28
29 #: src/hdate_strings.c:131
30 msgid "Wed"
31 msgstr "Mier"
32
33 #: src/hdate_strings.c:131
34 msgid "Thu"
35 msgstr "Jue"
36
37 #: src/hdate_strings.c:132
38 msgid "Fri"
39 msgstr "Vier"
40
41 #: src/hdate_strings.c:132
42 msgid "Sat"
43 msgstr "Sab"
44
45 #: src/hdate_strings.c:133
46 msgid "Sunday"
47 msgstr "Domingo"
48
49 #: src/hdate_strings.c:133
50 msgid "Monday"
51 msgstr "Lunes"
52
53 #: src/hdate_strings.c:133
54 msgid "Tuesday"
55 msgstr "Martes"
56
57 #: src/hdate_strings.c:133
58 msgid "Wednesday"
59 msgstr "Miercoles"
60
61 #: src/hdate_strings.c:134
62 msgid "Thursday"
63 msgstr "Jueves"
64
65 #: src/hdate_strings.c:134
66 msgid "Friday"
67 msgstr "Viernes"
68
69 #: src/hdate_strings.c:134
70 msgid "Saturday"
71 msgstr "Sabado"
72
73 #: src/hdate_strings.c:165
74 msgid "Jan"
75 msgstr "Ene"
76
77 #: src/hdate_strings.c:165
78 msgid "Feb"
79 msgstr "Feb"
80
81 #: src/hdate_strings.c:165
82 msgid "Mar"
83 msgstr "Mar"
84
85 #: src/hdate_strings.c:165
86 msgid "Apr"
87 msgstr "Abr"
88
89 #: src/hdate_strings.c:165 src/hdate_strings.c:169
90 msgid "May"
91 msgstr "May"
92
93 #: src/hdate_strings.c:166
94 msgid "Jun"
95 msgstr "Jun"
96
97 #: src/hdate_strings.c:166
98 msgid "Jul"
99 msgstr "Jul"
100
101 #: src/hdate_strings.c:166
102 msgid "Aug"
103 msgstr "Ago"
104
105 #: src/hdate_strings.c:166
106 msgid "Sep"
107 msgstr "Sep"
108
109 #: src/hdate_strings.c:166
110 msgid "Oct"
111 msgstr "Oct"
112
113 #: src/hdate_strings.c:167
114 msgid "Nov"
115 msgstr "Nov"
116
117 #: src/hdate_strings.c:167
118 msgid "Dec"
119 msgstr "Dic"
120
121 #: src/hdate_strings.c:168
122 msgid "January"
123 msgstr "Enero"
124
125 #: src/hdate_strings.c:168
126 msgid "February"
127 msgstr "Febrero"
128
129 #: src/hdate_strings.c:168
130 msgid "March"
131 msgstr "Marzo"
132
133 #: src/hdate_strings.c:169
134 msgid "April"
135 msgstr "Abril"
136
137 #: src/hdate_strings.c:169
138 msgid "June"
139 msgstr "Junio"
140
141 #: src/hdate_strings.c:170
142 msgid "July"
143 msgstr "Julio"
144
145 #: src/hdate_strings.c:170
146 msgid "August"
147 msgstr "Agosto"
148
149 #: src/hdate_strings.c:170
150 msgid "September"
151 msgstr "Septiembre"
152
153 #: src/hdate_strings.c:171
154 msgid "October"
155 msgstr "Octubre"
156
157 #: src/hdate_strings.c:171
158 msgid "November"
159 msgstr "Noviembre"
160
161 #: src/hdate_strings.c:171
162 msgid "December"
163 msgstr "Diciembre"
164
165 #: src/hdate_strings.c:202 src/hdate_strings.c:206
166 msgid "Tishrei"
167 msgstr "Tishrei"
168
169 #: src/hdate_strings.c:202 src/hdate_strings.c:206
170 msgid "Cheshvan"
171 msgstr "Jeshván"
172
173 #: src/hdate_strings.c:202 src/hdate_strings.c:206
174 msgid "Kislev"
175 msgstr "Kislev"
176
177 #: src/hdate_strings.c:202 src/hdate_strings.c:206
178 msgid "Tevet"
179 msgstr "Tevet"
180
181 #: src/hdate_strings.c:203 src/hdate_strings.c:207
182 #, fuzzy
183 msgid "Sh'vat"
184 msgstr "Sh'vat"
185
186 #: src/hdate_strings.c:203 src/hdate_strings.c:207
187 msgid "Adar"
188 msgstr "Adar"
189
190 #: src/hdate_strings.c:203 src/hdate_strings.c:207
191 msgid "Nisan"
192 msgstr "Nisan"
193
194 #: src/hdate_strings.c:203 src/hdate_strings.c:207
195 #, fuzzy
196 msgid "Iyyar"
197 msgstr "Iyyar"
198
199 #: src/hdate_strings.c:204 src/hdate_strings.c:208
200 msgid "Sivan"
201 msgstr "Siván"
202
203 #: src/hdate_strings.c:204 src/hdate_strings.c:208
204 msgid "Tamuz"
205 msgstr "Tamuz"
206
207 #: src/hdate_strings.c:204 src/hdate_strings.c:208
208 msgid "Av"
209 msgstr "Av"
210
211 #: src/hdate_strings.c:204 src/hdate_strings.c:208
212 msgid "Elul"
213 msgstr "Elul"
214
215 #: src/hdate_strings.c:204 src/hdate_strings.c:208
216 msgid "Adar I"
217 msgstr "Adar I"
218
219 #: src/hdate_strings.c:205 src/hdate_strings.c:209
220 msgid "Adar II"
221 msgstr "Adar II"
222
223 #: src/hdate_strings.c:241 src/hdate_strings.c:274
224 msgid "Rosh Hashana I"
225 msgstr "Rosh Hashana I"
226
227 #. 1
228 #: src/hdate_strings.c:242 src/hdate_strings.c:275
229 msgid "Rosh Hashana II"
230 msgstr "Rosh Hashana II"
231
232 #: src/hdate_strings.c:243 src/hdate_strings.c:276
233 msgid "Tzom Gedaliah"
234 msgstr "Ayuno de Gedaliah"
235
236 #: src/hdate_strings.c:244 src/hdate_strings.c:277
237 msgid "Yom Kippur"
238 msgstr "Yom Kippur"
239
240 #: src/hdate_strings.c:245 src/hdate_strings.c:278
241 msgid "Sukkot"
242 msgstr "Sukkot"
243
244 #: src/hdate_strings.c:246 src/hdate_strings.c:279
245 msgid "Hol hamoed Sukkot"
246 msgstr "Hol hamoed Sukkot"
247
248 #: src/hdate_strings.c:247 src/hdate_strings.c:280
249 msgid "Hoshana raba"
250 msgstr "Hoshana raba"
251
252 #: src/hdate_strings.c:248 src/hdate_strings.c:281
253 msgid "Simchat Torah"
254 msgstr "Simjat Torah"
255
256 #: src/hdate_strings.c:249 src/hdate_strings.c:282
257 msgid "Chanukah"
258 msgstr "Januka"
259
260 #: src/hdate_strings.c:250 src/hdate_strings.c:283
261 #, fuzzy
262 msgid "Asara B'Tevet"
263 msgstr "Asara B'Tevet"
264
265 #. 10
266 #: src/hdate_strings.c:251 src/hdate_strings.c:284
267 msgid "Tu B'Shvat"
268 msgstr "Tu B'Shvat"
269
270 #: src/hdate_strings.c:252 src/hdate_strings.c:285
271 #, fuzzy
272 msgid "Ta'anit Esther"
273 msgstr "Ta'anit Esther"
274
275 #: src/hdate_strings.c:253 src/hdate_strings.c:286
276 msgid "Purim"
277 msgstr "Purim"
278
279 #: src/hdate_strings.c:254 src/hdate_strings.c:287
280 msgid "Shushan Purim"
281 msgstr "Shushan Purim"
282
283 #: src/hdate_strings.c:255 src/hdate_strings.c:288
284 msgid "Pesach"
285 msgstr "Pesaj"
286
287 #: src/hdate_strings.c:256 src/hdate_strings.c:289
288 msgid "Hol hamoed Pesach"
289 msgstr "Jol hamoed Pesaj"
290
291 #: src/hdate_strings.c:257 src/hdate_strings.c:290
292 msgid "Yom HaAtzma'ut"
293 msgstr "Yom HaAtzma'ut"
294
295 #: src/hdate_strings.c:258 src/hdate_strings.c:291
296 msgid "Lag B'Omer"
297 msgstr "Lag B'Omer"
298
299 #: src/hdate_strings.c:259 src/hdate_strings.c:292
300 msgid "Erev Shavuot"
301 msgstr "Víspera de Shavuot"
302
303 #: src/hdate_strings.c:260 src/hdate_strings.c:293
304 msgid "Shavuot"
305 msgstr "Shavuot"
306
307 #. 20
308 #: src/hdate_strings.c:261 src/hdate_strings.c:294
309 msgid "Tzom Tammuz"
310 msgstr "Ayuno de Tammuz"
311
312 #: src/hdate_strings.c:262 src/hdate_strings.c:295
313 msgid "Tish'a B'Av"
314 msgstr "Tish'a B'Av"
315
316 #: src/hdate_strings.c:263 src/hdate_strings.c:296
317 msgid "Tu B'Av"
318 msgstr "Tu B'Av"
319
320 #: src/hdate_strings.c:264 src/hdate_strings.c:297
321 msgid "Yom HaShoah"
322 msgstr "Día del Holocausto"
323
324 #: src/hdate_strings.c:265 src/hdate_strings.c:298
325 msgid "Yom HaZikaron"
326 msgstr "Día del Recuerdo"
327
328 #. 25
329 #: src/hdate_strings.c:266 src/hdate_strings.c:299
330 #, fuzzy
331 msgid "Yom Yerushalayim"
332 msgstr "Yom Yerushalayim"
333
334 #: src/hdate_strings.c:267 src/hdate_strings.c:300
335 msgid "Shmini Atzeret"
336 msgstr "Shemini Atzeret"
337
338 #: src/hdate_strings.c:268 src/hdate_strings.c:301
339 msgid "Pesach VII"
340 msgstr "Pesaj VII"
341
342 #: src/hdate_strings.c:269 src/hdate_strings.c:302
343 msgid "Pesach VIII"
344 msgstr "Pesaj VIII"
345
346 #: src/hdate_strings.c:270 src/hdate_strings.c:303
347 msgid "Shavuot II"
348 msgstr "Shavuot II"
349
350 #: src/hdate_strings.c:271 src/hdate_strings.c:304
351 #, fuzzy
352 msgid "Sukkot II"
353 msgstr "Sukkot II"
354
355 #: src/hdate_strings.c:272 src/hdate_strings.c:305
356 #, fuzzy
357 msgid "Pesach II"
358 msgstr "Pesaj II"
359
360 #: src/hdate_strings.c:338 src/hdate_strings.c:401
361 msgid "none"
362 msgstr "ninguno"
363
364 #: src/hdate_strings.c:339 src/hdate_strings.c:402
365 msgid "Bereshit"
366 msgstr "Bereshit"
367
368 #. 1
369 #: src/hdate_strings.c:340 src/hdate_strings.c:403
370 msgid "Noach"
371 msgstr "Noaj"
372
373 #: src/hdate_strings.c:341 src/hdate_strings.c:404
374 msgid "Lech-Lecha"
375 msgstr "Lej-Lejá"
376
377 #: src/hdate_strings.c:342 src/hdate_strings.c:405
378 msgid "Vayera"
379 msgstr "Vaira"
380
381 #: src/hdate_strings.c:343 src/hdate_strings.c:406
382 msgid "Chayei Sara"
383 msgstr "Jayei Sará"
384
385 #: src/hdate_strings.c:344 src/hdate_strings.c:407
386 #, fuzzy
387 msgid "Toldot"
388 msgstr "Toldot"
389
390 #: src/hdate_strings.c:345 src/hdate_strings.c:408
391 #, fuzzy
392 msgid "Vayetzei"
393 msgstr "Vayetzei"
394
395 #: src/hdate_strings.c:346 src/hdate_strings.c:409
396 #, fuzzy
397 msgid "Vayishlach"
398 msgstr "Vayishalaj"
399
400 #: src/hdate_strings.c:347 src/hdate_strings.c:410
401 #, fuzzy
402 msgid "Vayeshev"
403 msgstr "Vayeshev"
404
405 #: src/hdate_strings.c:348 src/hdate_strings.c:411
406 #, fuzzy
407 msgid "Miketz"
408 msgstr "Miketz"
409
410 #. 10
411 #: src/hdate_strings.c:349 src/hdate_strings.c:412
412 #, fuzzy
413 msgid "Vayigash"
414 msgstr "Vayigash"
415
416 #: src/hdate_strings.c:350 src/hdate_strings.c:413
417 #, fuzzy
418 msgid "Vayechi"
419 msgstr "Vayejí"
420
421 #: src/hdate_strings.c:351 src/hdate_strings.c:414
422 msgid "Shemot"
423 msgstr "Shemot"
424
425 #: src/hdate_strings.c:352 src/hdate_strings.c:415
426 msgid "Vaera"
427 msgstr "Vaerá"
428
429 #: src/hdate_strings.c:353 src/hdate_strings.c:416
430 msgid "Bo"
431 msgstr "Bo"
432
433 #: src/hdate_strings.c:354 src/hdate_strings.c:417
434 msgid "Beshalach"
435 msgstr "Beshalaj"
436
437 #: src/hdate_strings.c:355 src/hdate_strings.c:418
438 msgid "Yitro"
439 msgstr "Yitro"
440
441 #: src/hdate_strings.c:356 src/hdate_strings.c:419
442 msgid "Mishpatim"
443 msgstr "Mishpatim"
444
445 #: src/hdate_strings.c:357 src/hdate_strings.c:420
446 msgid "Terumah"
447 msgstr "Terumá"
448
449 #: src/hdate_strings.c:358 src/hdate_strings.c:421
450 msgid "Tetzaveh"
451 msgstr "Tetzavé"
452
453 #. 20
454 #: src/hdate_strings.c:359 src/hdate_strings.c:422
455 msgid "Ki Tisa"
456 msgstr "Ki Tisá"
457
458 #: src/hdate_strings.c:360 src/hdate_strings.c:423
459 msgid "Vayakhel"
460 msgstr "Vayajel"
461
462 #: src/hdate_strings.c:361 src/hdate_strings.c:424
463 msgid "Pekudei"
464 msgstr "Pekudei"
465
466 #: src/hdate_strings.c:362 src/hdate_strings.c:425
467 msgid "Vayikra"
468 msgstr "Vayikrá"
469
470 #: src/hdate_strings.c:363 src/hdate_strings.c:426
471 msgid "Tzav"
472 msgstr "Tzav"
473
474 #: src/hdate_strings.c:364 src/hdate_strings.c:427
475 msgid "Shmini"
476 msgstr "Shemini"
477
478 #: src/hdate_strings.c:365 src/hdate_strings.c:428
479 msgid "Tazria"
480 msgstr "Tazría"
481
482 #: src/hdate_strings.c:366 src/hdate_strings.c:429
483 msgid "Metzora"
484 msgstr "Metzorá"
485
486 #: src/hdate_strings.c:367 src/hdate_strings.c:430
487 msgid "Achrei Mot"
488 msgstr "Ajrei Mot"
489
490 #: src/hdate_strings.c:368 src/hdate_strings.c:431
491 msgid "Kedoshim"
492 msgstr "Kedoshim"
493
494 #. 30
495 #: src/hdate_strings.c:369 src/hdate_strings.c:432
496 msgid "Emor"
497 msgstr "Emor"
498
499 #: src/hdate_strings.c:370 src/hdate_strings.c:433
500 msgid "Behar"
501 msgstr "Bejar"
502
503 #: src/hdate_strings.c:371 src/hdate_strings.c:434
504 msgid "Bechukotai"
505 msgstr "Bejukotai"
506
507 #: src/hdate_strings.c:372 src/hdate_strings.c:435
508 msgid "Bamidbar"
509 msgstr "Bamidbar"
510
511 #: src/hdate_strings.c:373 src/hdate_strings.c:436
512 #, fuzzy
513 msgid "Nasso"
514 msgstr "Nasso"
515
516 #: src/hdate_strings.c:374 src/hdate_strings.c:437
517 msgid "Beha'alotcha"
518 msgstr "Beha'alotja"
519
520 #: src/hdate_strings.c:375 src/hdate_strings.c:438
521 msgid "Sh'lach"
522 msgstr "Shalaj"
523
524 #: src/hdate_strings.c:376 src/hdate_strings.c:439
525 msgid "Korach"
526 msgstr "Koraj"
527
528 #: src/hdate_strings.c:377 src/hdate_strings.c:440
529 msgid "Chukat"
530 msgstr "Jukat"
531
532 #: src/hdate_strings.c:378 src/hdate_strings.c:441
533 msgid "Balak"
534 msgstr "Balak"
535
536 #. 40
537 #: src/hdate_strings.c:379 src/hdate_strings.c:442
538 msgid "Pinchas"
539 msgstr "Pinjas"
540
541 #: src/hdate_strings.c:380 src/hdate_strings.c:443
542 msgid "Matot"
543 msgstr "Matot"
544
545 #: src/hdate_strings.c:381 src/hdate_strings.c:444
546 msgid "Masei"
547 msgstr "Masei"
548
549 #: src/hdate_strings.c:382 src/hdate_strings.c:445
550 msgid "Devarim"
551 msgstr "Devarim"
552
553 #: src/hdate_strings.c:383 src/hdate_strings.c:446
554 msgid "Vaetchanan"
555 msgstr "Vaetjanan"
556
557 #: src/hdate_strings.c:384 src/hdate_strings.c:447
558 msgid "Eikev"
559 msgstr "Eikev"
560
561 #: src/hdate_strings.c:385 src/hdate_strings.c:448
562 msgid "Re'eh"
563 msgstr "Re'é"
564
565 #: src/hdate_strings.c:386 src/hdate_strings.c:449
566 msgid "Shoftim"
567 msgstr "Shoftim"
568
569 #: src/hdate_strings.c:387 src/hdate_strings.c:450
570 msgid "Ki Teitzei"
571 msgstr "Ki Teitzei"
572
573 #: src/hdate_strings.c:388 src/hdate_strings.c:451
574 msgid "Ki Tavo"
575 msgstr "Ki Tavó"
576
577 #. 50
578 #: src/hdate_strings.c:389 src/hdate_strings.c:452
579 msgid "Nitzavim"
580 msgstr "Nitzavim"
581
582 #: src/hdate_strings.c:390 src/hdate_strings.c:453
583 msgid "Vayeilech"
584 msgstr "Vayeilej"
585
586 #: src/hdate_strings.c:391 src/hdate_strings.c:454
587 msgid "Ha'Azinu"
588 msgstr "Ha'Azinu"
589
590 #: src/hdate_strings.c:392 src/hdate_strings.c:455
591 msgid "Vezot Habracha"
592 msgstr "Vezot Haberaja"
593
594 #. 54
595 #: src/hdate_strings.c:393 src/hdate_strings.c:456
596 #, fuzzy
597 msgid "Vayakhel-Pekudei"
598 msgstr "Vayakhel-Pekudei"
599
600 #: src/hdate_strings.c:394 src/hdate_strings.c:457
601 msgid "Tazria-Metzora"
602 msgstr "Tazría-Metzora"
603
604 #: src/hdate_strings.c:395 src/hdate_strings.c:458
605 msgid "Achrei Mot-Kedoshim"
606 msgstr "Ajrei Mot-Kedoshim"
607
608 #: src/hdate_strings.c:396 src/hdate_strings.c:459
609 msgid "Behar-Bechukotai"
610 msgstr "Bejar-Bejukotai"
611
612 #: src/hdate_strings.c:397 src/hdate_strings.c:460
613 msgid "Chukat-Balak"
614 msgstr "Jukat-Balak"
615
616 #: src/hdate_strings.c:398 src/hdate_strings.c:461
617 msgid "Matot-Masei"
618 msgstr "Matot-Masei"
619
620 #: src/hdate_strings.c:399 src/hdate_strings.c:462
621 #, fuzzy
622 msgid "Nitzavim-Vayeilech"
623 msgstr "Nitzavim-Vayeilej"
624
625 #. if untranslated return null
626 #. return the translator name
627 #: src/hdate_strings.c:564 src/hdate_strings.c:568
628 msgid "translator"
629 msgstr "Esther Peled <esti@actcom.co.il>"
Binary diff not shown
0 # translation of libhdate.po to French
1 # This file is distributed under the same license as the libhdate package.
2 # Copyright (C) 2005 Yaacov Zamir
3 # Yaacov Zamir, 2005.
4 #
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: fr\n"
8 "Report-Msgid-Bugs-To: \n"
9 "POT-Creation-Date: 2005-08-08 00:38+0300\n"
10 "PO-Revision-Date: 2005-03-07 12:44+0200\n"
11 "Last-Translator: Yaacov Zamir\n"
12 "Language-Team: Franch\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16
17 #: src/hdate_strings.c:131
18 msgid "Sun"
19 msgstr "Dim"
20
21 #: src/hdate_strings.c:131
22 msgid "Mon"
23 msgstr "Lun"
24
25 #: src/hdate_strings.c:131
26 msgid "Tue"
27 msgstr "Mar"
28
29 #: src/hdate_strings.c:131
30 msgid "Wed"
31 msgstr "Mer"
32
33 #: src/hdate_strings.c:131
34 msgid "Thu"
35 msgstr "Jeu"
36
37 #: src/hdate_strings.c:132
38 msgid "Fri"
39 msgstr "Ven"
40
41 #: src/hdate_strings.c:132
42 msgid "Sat"
43 msgstr "Sam"
44
45 #: src/hdate_strings.c:133
46 msgid "Sunday"
47 msgstr "Dimanche"
48
49 #: src/hdate_strings.c:133
50 msgid "Monday"
51 msgstr "Lundi"
52
53 #: src/hdate_strings.c:133
54 msgid "Tuesday"
55 msgstr "Mardi"
56
57 #: src/hdate_strings.c:133
58 msgid "Wednesday"
59 msgstr "Mercredi"
60
61 #: src/hdate_strings.c:134
62 msgid "Thursday"
63 msgstr "Jeudi"
64
65 #: src/hdate_strings.c:134
66 msgid "Friday"
67 msgstr "Vendredi"
68
69 #: src/hdate_strings.c:134
70 msgid "Saturday"
71 msgstr "Samedi"
72
73 #: src/hdate_strings.c:165
74 msgid "Jan"
75 msgstr "Jan"
76
77 #: src/hdate_strings.c:165
78 msgid "Feb"
79 msgstr "Fév"
80
81 #: src/hdate_strings.c:165
82 msgid "Mar"
83 msgstr "Mar"
84
85 #: src/hdate_strings.c:165
86 msgid "Apr"
87 msgstr "Avr"
88
89 #: src/hdate_strings.c:165 src/hdate_strings.c:169
90 msgid "May"
91 msgstr "mai"
92
93 #: src/hdate_strings.c:166
94 msgid "Jun"
95 msgstr "Juin"
96
97 #: src/hdate_strings.c:166
98 msgid "Jul"
99 msgstr "Juil"
100
101 #: src/hdate_strings.c:166
102 msgid "Aug"
103 msgstr "Août"
104
105 #: src/hdate_strings.c:166
106 msgid "Sep"
107 msgstr "Sep"
108
109 #: src/hdate_strings.c:166
110 msgid "Oct"
111 msgstr "Oct"
112
113 #: src/hdate_strings.c:167
114 msgid "Nov"
115 msgstr "Nov"
116
117 #: src/hdate_strings.c:167
118 msgid "Dec"
119 msgstr "Déc"
120
121 #: src/hdate_strings.c:168
122 msgid "January"
123 msgstr "Janvier"
124
125 #: src/hdate_strings.c:168
126 msgid "February"
127 msgstr "Février"
128
129 #: src/hdate_strings.c:168
130 msgid "March"
131 msgstr "Mars"
132
133 #: src/hdate_strings.c:169
134 msgid "April"
135 msgstr "Avril"
136
137 #: src/hdate_strings.c:169
138 msgid "June"
139 msgstr "Juin"
140
141 #: src/hdate_strings.c:170
142 msgid "July"
143 msgstr "Juillet"
144
145 #: src/hdate_strings.c:170
146 msgid "August"
147 msgstr "Août"
148
149 #: src/hdate_strings.c:170
150 msgid "September"
151 msgstr "Septembre"
152
153 #: src/hdate_strings.c:171
154 msgid "October"
155 msgstr "Octobre"
156
157 #: src/hdate_strings.c:171
158 msgid "November"
159 msgstr "Novembre"
160
161 #: src/hdate_strings.c:171
162 msgid "December"
163 msgstr "Décembre"
164
165 #: src/hdate_strings.c:202 src/hdate_strings.c:206
166 msgid "Tishrei"
167 msgstr "Tishrei"
168
169 #: src/hdate_strings.c:202 src/hdate_strings.c:206
170 msgid "Cheshvan"
171 msgstr "Cheshván"
172
173 #: src/hdate_strings.c:202 src/hdate_strings.c:206
174 msgid "Kislev"
175 msgstr "Kislev"
176
177 #: src/hdate_strings.c:202 src/hdate_strings.c:206
178 msgid "Tevet"
179 msgstr "Tevet"
180
181 #: src/hdate_strings.c:203 src/hdate_strings.c:207
182 msgid "Sh'vat"
183 msgstr "Sh'vat"
184
185 #: src/hdate_strings.c:203 src/hdate_strings.c:207
186 msgid "Adar"
187 msgstr "Adar"
188
189 #: src/hdate_strings.c:203 src/hdate_strings.c:207
190 msgid "Nisan"
191 msgstr "Nisan"
192
193 #: src/hdate_strings.c:203 src/hdate_strings.c:207
194 msgid "Iyyar"
195 msgstr "Iyyar"
196
197 #: src/hdate_strings.c:204 src/hdate_strings.c:208
198 msgid "Sivan"
199 msgstr "Siván"
200
201 #: src/hdate_strings.c:204 src/hdate_strings.c:208
202 msgid "Tamuz"
203 msgstr "Tamuz"
204
205 #: src/hdate_strings.c:204 src/hdate_strings.c:208
206 msgid "Av"
207 msgstr "Av"
208
209 #: src/hdate_strings.c:204 src/hdate_strings.c:208
210 msgid "Elul"
211 msgstr "Elul"
212
213 #: src/hdate_strings.c:204 src/hdate_strings.c:208
214 msgid "Adar I"
215 msgstr "Adar I"
216
217 #: src/hdate_strings.c:205 src/hdate_strings.c:209
218 msgid "Adar II"
219 msgstr "Adar II"
220
221 #: src/hdate_strings.c:241 src/hdate_strings.c:274
222 msgid "Rosh Hashana I"
223 msgstr "Rosh Hashana I"
224
225 #. 1
226 #: src/hdate_strings.c:242 src/hdate_strings.c:275
227 msgid "Rosh Hashana II"
228 msgstr "Rosh Hashana II"
229
230 #: src/hdate_strings.c:243 src/hdate_strings.c:276
231 msgid "Tzom Gedaliah"
232 msgstr "Tzom Gedaliah"
233
234 #: src/hdate_strings.c:244 src/hdate_strings.c:277
235 msgid "Yom Kippur"
236 msgstr "Yom Kippur"
237
238 #: src/hdate_strings.c:245 src/hdate_strings.c:278
239 msgid "Sukkot"
240 msgstr "Sukkot"
241
242 #: src/hdate_strings.c:246 src/hdate_strings.c:279
243 msgid "Hol hamoed Sukkot"
244 msgstr "Hol hamoed Sukkot"
245
246 #: src/hdate_strings.c:247 src/hdate_strings.c:280
247 msgid "Hoshana raba"
248 msgstr "Hoshana raba"
249
250 #: src/hdate_strings.c:248 src/hdate_strings.c:281
251 msgid "Simchat Torah"
252 msgstr "Simchat Torah"
253
254 #: src/hdate_strings.c:249 src/hdate_strings.c:282
255 msgid "Chanukah"
256 msgstr "Chanuka"
257
258 #: src/hdate_strings.c:250 src/hdate_strings.c:283
259 msgid "Asara B'Tevet"
260 msgstr "Asara B'Tevet"
261
262 #. 10
263 #: src/hdate_strings.c:251 src/hdate_strings.c:284
264 msgid "Tu B'Shvat"
265 msgstr "Tu B'Shvat"
266
267 #: src/hdate_strings.c:252 src/hdate_strings.c:285
268 msgid "Ta'anit Esther"
269 msgstr "Ta'anit Esther"
270
271 #: src/hdate_strings.c:253 src/hdate_strings.c:286
272 msgid "Purim"
273 msgstr "Purim"
274
275 #: src/hdate_strings.c:254 src/hdate_strings.c:287
276 msgid "Shushan Purim"
277 msgstr "Shushan Purim"
278
279 #: src/hdate_strings.c:255 src/hdate_strings.c:288
280 msgid "Pesach"
281 msgstr "Pesach"
282
283 #: src/hdate_strings.c:256 src/hdate_strings.c:289
284 msgid "Hol hamoed Pesach"
285 msgstr "Chol hamoed Pesach"
286
287 #: src/hdate_strings.c:257 src/hdate_strings.c:290
288 msgid "Yom HaAtzma'ut"
289 msgstr "Yom HaAtzma'ut"
290
291 #: src/hdate_strings.c:258 src/hdate_strings.c:291
292 msgid "Lag B'Omer"
293 msgstr "Lag B'Omer"
294
295 #: src/hdate_strings.c:259 src/hdate_strings.c:292
296 msgid "Erev Shavuot"
297 msgstr "veille de Shavuot"
298
299 #: src/hdate_strings.c:260 src/hdate_strings.c:293
300 msgid "Shavuot"
301 msgstr "Shavuot"
302
303 #. 20
304 #: src/hdate_strings.c:261 src/hdate_strings.c:294
305 msgid "Tzom Tammuz"
306 msgstr "Tzom Tammuz"
307
308 #: src/hdate_strings.c:262 src/hdate_strings.c:295
309 msgid "Tish'a B'Av"
310 msgstr "Tish'a B'Av"
311
312 #: src/hdate_strings.c:263 src/hdate_strings.c:296
313 msgid "Tu B'Av"
314 msgstr "Tu B'Av"
315
316 #: src/hdate_strings.c:264 src/hdate_strings.c:297
317 msgid "Yom HaShoah"
318 msgstr "Jour des Holocausto"
319
320 #: src/hdate_strings.c:265 src/hdate_strings.c:298
321 msgid "Yom HaZikaron"
322 msgstr "Jour des Recuerdo"
323
324 #. 25
325 #: src/hdate_strings.c:266 src/hdate_strings.c:299
326 #, fuzzy
327 msgid "Yom Yerushalayim"
328 msgstr "Jour des Yerushalayim"
329
330 #: src/hdate_strings.c:267 src/hdate_strings.c:300
331 msgid "Shmini Atzeret"
332 msgstr "Shemini Atzeret"
333
334 #: src/hdate_strings.c:268 src/hdate_strings.c:301
335 msgid "Pesach VII"
336 msgstr "Pesach VII"
337
338 #: src/hdate_strings.c:269 src/hdate_strings.c:302
339 msgid "Pesach VIII"
340 msgstr "Pesach VIII"
341
342 #: src/hdate_strings.c:270 src/hdate_strings.c:303
343 msgid "Shavuot II"
344 msgstr "Shavuot II"
345
346 #: src/hdate_strings.c:271 src/hdate_strings.c:304
347 msgid "Sukkot II"
348 msgstr "Sukkot II"
349
350 #: src/hdate_strings.c:272 src/hdate_strings.c:305
351 msgid "Pesach II"
352 msgstr "Pesach II"
353
354 #: src/hdate_strings.c:338 src/hdate_strings.c:401
355 msgid "none"
356 msgstr "nulle"
357
358 #: src/hdate_strings.c:339 src/hdate_strings.c:402
359 msgid "Bereshit"
360 msgstr "Bereshit"
361
362 #. 1
363 #: src/hdate_strings.c:340 src/hdate_strings.c:403
364 msgid "Noach"
365 msgstr "Noach"
366
367 #: src/hdate_strings.c:341 src/hdate_strings.c:404
368 msgid "Lech-Lecha"
369 msgstr "Lech-Lecha"
370
371 #: src/hdate_strings.c:342 src/hdate_strings.c:405
372 msgid "Vayera"
373 msgstr "Vaira"
374
375 #: src/hdate_strings.c:343 src/hdate_strings.c:406
376 msgid "Chayei Sara"
377 msgstr "Chayei Sará"
378
379 #: src/hdate_strings.c:344 src/hdate_strings.c:407
380 msgid "Toldot"
381 msgstr "Toldot"
382
383 #: src/hdate_strings.c:345 src/hdate_strings.c:408
384 msgid "Vayetzei"
385 msgstr "Vayetzei"
386
387 #: src/hdate_strings.c:346 src/hdate_strings.c:409
388 msgid "Vayishlach"
389 msgstr "Vayishlach"
390
391 #: src/hdate_strings.c:347 src/hdate_strings.c:410
392 msgid "Vayeshev"
393 msgstr "Vayeshev"
394
395 #: src/hdate_strings.c:348 src/hdate_strings.c:411
396 msgid "Miketz"
397 msgstr "Miketz"
398
399 #. 10
400 #: src/hdate_strings.c:349 src/hdate_strings.c:412
401 msgid "Vayigash"
402 msgstr "Vayigash"
403
404 #: src/hdate_strings.c:350 src/hdate_strings.c:413
405 msgid "Vayechi"
406 msgstr "Vayechí"
407
408 #: src/hdate_strings.c:351 src/hdate_strings.c:414
409 msgid "Shemot"
410 msgstr "Shemot"
411
412 #: src/hdate_strings.c:352 src/hdate_strings.c:415
413 msgid "Vaera"
414 msgstr "Vaerá"
415
416 #: src/hdate_strings.c:353 src/hdate_strings.c:416
417 msgid "Bo"
418 msgstr "Bo"
419
420 #: src/hdate_strings.c:354 src/hdate_strings.c:417
421 msgid "Beshalach"
422 msgstr "Beshalach"
423
424 #: src/hdate_strings.c:355 src/hdate_strings.c:418
425 msgid "Yitro"
426 msgstr "Yitro"
427
428 #: src/hdate_strings.c:356 src/hdate_strings.c:419
429 msgid "Mishpatim"
430 msgstr "Mishpatim"
431
432 #: src/hdate_strings.c:357 src/hdate_strings.c:420
433 msgid "Terumah"
434 msgstr "Terumá"
435
436 #: src/hdate_strings.c:358 src/hdate_strings.c:421
437 msgid "Tetzaveh"
438 msgstr "Tetzavé"
439
440 #. 20
441 #: src/hdate_strings.c:359 src/hdate_strings.c:422
442 msgid "Ki Tisa"
443 msgstr "Ki Tisá"
444
445 #: src/hdate_strings.c:360 src/hdate_strings.c:423
446 msgid "Vayakhel"
447 msgstr "Vayakhel"
448
449 #: src/hdate_strings.c:361 src/hdate_strings.c:424
450 msgid "Pekudei"
451 msgstr "Pekudei"
452
453 #: src/hdate_strings.c:362 src/hdate_strings.c:425
454 msgid "Vayikra"
455 msgstr "Vayikrá"
456
457 #: src/hdate_strings.c:363 src/hdate_strings.c:426
458 msgid "Tzav"
459 msgstr "Tzav"
460
461 #: src/hdate_strings.c:364 src/hdate_strings.c:427
462 msgid "Shmini"
463 msgstr "Shemini"
464
465 #: src/hdate_strings.c:365 src/hdate_strings.c:428
466 msgid "Tazria"
467 msgstr "Tazría"
468
469 #: src/hdate_strings.c:366 src/hdate_strings.c:429
470 msgid "Metzora"
471 msgstr "Metzorá"
472
473 #: src/hdate_strings.c:367 src/hdate_strings.c:430
474 msgid "Achrei Mot"
475 msgstr "Achrei Mot"
476
477 #: src/hdate_strings.c:368 src/hdate_strings.c:431
478 msgid "Kedoshim"
479 msgstr "Kedoshim"
480
481 #. 30
482 #: src/hdate_strings.c:369 src/hdate_strings.c:432
483 msgid "Emor"
484 msgstr "Emor"
485
486 #: src/hdate_strings.c:370 src/hdate_strings.c:433
487 msgid "Behar"
488 msgstr "Bechar"
489
490 #: src/hdate_strings.c:371 src/hdate_strings.c:434
491 msgid "Bechukotai"
492 msgstr "Bechukotai"
493
494 #: src/hdate_strings.c:372 src/hdate_strings.c:435
495 msgid "Bamidbar"
496 msgstr "Bamidbar"
497
498 #: src/hdate_strings.c:373 src/hdate_strings.c:436
499 msgid "Nasso"
500 msgstr "Nasso"
501
502 #: src/hdate_strings.c:374 src/hdate_strings.c:437
503 msgid "Beha'alotcha"
504 msgstr "Beha'alotcha"
505
506 #: src/hdate_strings.c:375 src/hdate_strings.c:438
507 msgid "Sh'lach"
508 msgstr "Shalach"
509
510 #: src/hdate_strings.c:376 src/hdate_strings.c:439
511 msgid "Korach"
512 msgstr "Korach"
513
514 #: src/hdate_strings.c:377 src/hdate_strings.c:440
515 msgid "Chukat"
516 msgstr "Chukat"
517
518 #: src/hdate_strings.c:378 src/hdate_strings.c:441
519 msgid "Balak"
520 msgstr "Balak"
521
522 #. 40
523 #: src/hdate_strings.c:379 src/hdate_strings.c:442
524 msgid "Pinchas"
525 msgstr "Pinchas"
526
527 #: src/hdate_strings.c:380 src/hdate_strings.c:443
528 msgid "Matot"
529 msgstr "Matot"
530
531 #: src/hdate_strings.c:381 src/hdate_strings.c:444
532 msgid "Masei"
533 msgstr "Masei"
534
535 #: src/hdate_strings.c:382 src/hdate_strings.c:445
536 msgid "Devarim"
537 msgstr "Devarim"
538
539 #: src/hdate_strings.c:383 src/hdate_strings.c:446
540 msgid "Vaetchanan"
541 msgstr "Vaetchanan"
542
543 #: src/hdate_strings.c:384 src/hdate_strings.c:447
544 msgid "Eikev"
545 msgstr "Eikev"
546
547 #: src/hdate_strings.c:385 src/hdate_strings.c:448
548 msgid "Re'eh"
549 msgstr "Re'é"
550
551 #: src/hdate_strings.c:386 src/hdate_strings.c:449
552 msgid "Shoftim"
553 msgstr "Shoftim"
554
555 #: src/hdate_strings.c:387 src/hdate_strings.c:450
556 msgid "Ki Teitzei"
557 msgstr "Ki Teitzei"
558
559 #: src/hdate_strings.c:388 src/hdate_strings.c:451
560 msgid "Ki Tavo"
561 msgstr "Ki Tavó"
562
563 #. 50
564 #: src/hdate_strings.c:389 src/hdate_strings.c:452
565 msgid "Nitzavim"
566 msgstr "Nitzavim"
567
568 #: src/hdate_strings.c:390 src/hdate_strings.c:453
569 msgid "Vayeilech"
570 msgstr "Vayeilech"
571
572 #: src/hdate_strings.c:391 src/hdate_strings.c:454
573 msgid "Ha'Azinu"
574 msgstr "Ha'Azinu"
575
576 #: src/hdate_strings.c:392 src/hdate_strings.c:455
577 msgid "Vezot Habracha"
578 msgstr "Vezot Haberacha"
579
580 #. 54
581 #: src/hdate_strings.c:393 src/hdate_strings.c:456
582 msgid "Vayakhel-Pekudei"
583 msgstr "Vayakhel-Pekudei"
584
585 #: src/hdate_strings.c:394 src/hdate_strings.c:457
586 msgid "Tazria-Metzora"
587 msgstr "Tazría-Metzora"
588
589 #: src/hdate_strings.c:395 src/hdate_strings.c:458
590 msgid "Achrei Mot-Kedoshim"
591 msgstr "Achrei Mot-Kedoshim"
592
593 #: src/hdate_strings.c:396 src/hdate_strings.c:459
594 msgid "Behar-Bechukotai"
595 msgstr "Bechar-Bechukotai"
596
597 #: src/hdate_strings.c:397 src/hdate_strings.c:460
598 msgid "Chukat-Balak"
599 msgstr "Chukat-Balak"
600
601 #: src/hdate_strings.c:398 src/hdate_strings.c:461
602 msgid "Matot-Masei"
603 msgstr "Matot-Masei"
604
605 #: src/hdate_strings.c:399 src/hdate_strings.c:462
606 msgid "Nitzavim-Vayeilech"
607 msgstr "Nitzavim-Vayeilech"
608
609 #. if untranslated return null
610 #. return the translator name
611 #: src/hdate_strings.c:564 src/hdate_strings.c:568
612 msgid "translator"
613 msgstr "Yaacov Zamir"
Binary diff not shown
0 # SOME DESCRIPTIVE TITLE.
1 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
2 # This file is distributed under the same license as the PACKAGE package.
3 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4 #
5 #, fuzzy
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2005-08-08 00:38+0300\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=utf-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #: src/hdate_strings.c:131
19 msgid "Sun"
20 msgstr "א"
21
22 #: src/hdate_strings.c:131
23 msgid "Mon"
24 msgstr "ב"
25
26 #: src/hdate_strings.c:131
27 msgid "Tue"
28 msgstr "ג"
29
30 #: src/hdate_strings.c:131
31 msgid "Wed"
32 msgstr "ד"
33
34 #: src/hdate_strings.c:131
35 msgid "Thu"
36 msgstr "ה"
37
38 #: src/hdate_strings.c:132
39 msgid "Fri"
40 msgstr "ו"
41
42 #: src/hdate_strings.c:132
43 msgid "Sat"
44 msgstr "ש"
45
46 #: src/hdate_strings.c:133
47 msgid "Sunday"
48 msgstr "ראשון"
49
50 #: src/hdate_strings.c:133
51 msgid "Monday"
52 msgstr "שני"
53
54 #: src/hdate_strings.c:133
55 msgid "Tuesday"
56 msgstr "שלישי"
57
58 #: src/hdate_strings.c:133
59 msgid "Wednesday"
60 msgstr "רביעי"
61
62 #: src/hdate_strings.c:134
63 msgid "Thursday"
64 msgstr "חמישי"
65
66 #: src/hdate_strings.c:134
67 msgid "Friday"
68 msgstr "שישי"
69
70 #: src/hdate_strings.c:134
71 msgid "Saturday"
72 msgstr "שבת"
73
74 #: src/hdate_strings.c:165
75 msgid "Jan"
76 msgstr "ינו"
77
78 #: src/hdate_strings.c:165
79 msgid "Feb"
80 msgstr "פבר"
81
82 #: src/hdate_strings.c:165
83 msgid "Mar"
84 msgstr "מרץ"
85
86 #: src/hdate_strings.c:165
87 msgid "Apr"
88 msgstr "אפר"
89
90 #: src/hdate_strings.c:165 src/hdate_strings.c:169
91 msgid "May"
92 msgstr "מאי"
93
94 #: src/hdate_strings.c:166
95 msgid "Jun"
96 msgstr "יוני"
97
98 #: src/hdate_strings.c:166
99 msgid "Jul"
100 msgstr "יולי"
101
102 #: src/hdate_strings.c:166
103 msgid "Aug"
104 msgstr "אוג"
105
106 #: src/hdate_strings.c:166
107 msgid "Sep"
108 msgstr "ספט"
109
110 #: src/hdate_strings.c:166
111 msgid "Oct"
112 msgstr "אוקט"
113
114 #: src/hdate_strings.c:167
115 msgid "Nov"
116 msgstr "נוב"
117
118 #: src/hdate_strings.c:167
119 msgid "Dec"
120 msgstr "דצמ"
121
122 #: src/hdate_strings.c:168
123 msgid "January"
124 msgstr "ינואר"
125
126 #: src/hdate_strings.c:168
127 msgid "February"
128 msgstr "פברואר"
129
130 #: src/hdate_strings.c:168
131 msgid "March"
132 msgstr "מרץ"
133
134 #: src/hdate_strings.c:169
135 msgid "April"
136 msgstr "אפריל"
137
138 #: src/hdate_strings.c:169
139 msgid "June"
140 msgstr "יוני"
141
142 #: src/hdate_strings.c:170
143 msgid "July"
144 msgstr "יולי"
145
146 #: src/hdate_strings.c:170
147 msgid "August"
148 msgstr "אוגוסט"
149
150 #: src/hdate_strings.c:170
151 msgid "September"
152 msgstr "ספטמבר"
153
154 #: src/hdate_strings.c:171
155 msgid "October"
156 msgstr "אוקטובר"
157
158 #: src/hdate_strings.c:171
159 msgid "November"
160 msgstr "נובמבר"
161
162 #: src/hdate_strings.c:171
163 msgid "December"
164 msgstr "דצמבר"
165
166 #: src/hdate_strings.c:202 src/hdate_strings.c:206
167 msgid "Tishrei"
168 msgstr "תשרי"
169
170 #: src/hdate_strings.c:202 src/hdate_strings.c:206
171 msgid "Cheshvan"
172 msgstr "חשון"
173
174 #: src/hdate_strings.c:202 src/hdate_strings.c:206
175 msgid "Kislev"
176 msgstr "כיסלו"
177
178 #: src/hdate_strings.c:202 src/hdate_strings.c:206
179 msgid "Tevet"
180 msgstr "טבת"
181
182 #: src/hdate_strings.c:203 src/hdate_strings.c:207
183 msgid "Sh'vat"
184 msgstr "שבט"
185
186 #: src/hdate_strings.c:203 src/hdate_strings.c:207
187 msgid "Adar"
188 msgstr "אדר"
189
190 #: src/hdate_strings.c:203 src/hdate_strings.c:207
191 msgid "Nisan"
192 msgstr "ניסן"
193
194 #: src/hdate_strings.c:203 src/hdate_strings.c:207
195 msgid "Iyyar"
196 msgstr "אייר"
197
198 #: src/hdate_strings.c:204 src/hdate_strings.c:208
199 msgid "Sivan"
200 msgstr "סיון"
201
202 #: src/hdate_strings.c:204 src/hdate_strings.c:208
203 msgid "Tamuz"
204 msgstr "תמוז"
205
206 #: src/hdate_strings.c:204 src/hdate_strings.c:208
207 msgid "Av"
208 msgstr "אב"
209
210 #: src/hdate_strings.c:204 src/hdate_strings.c:208
211 msgid "Elul"
212 msgstr "אלול"
213
214 #: src/hdate_strings.c:204 src/hdate_strings.c:208
215 msgid "Adar I"
216 msgstr "אדר א"
217
218 #: src/hdate_strings.c:205 src/hdate_strings.c:209
219 msgid "Adar II"
220 msgstr "אדר ב"
221
222 #: src/hdate_strings.c:241 src/hdate_strings.c:274
223 msgid "Rosh Hashana I"
224 msgstr "א ראש השנה"
225
226 #. 1
227 #: src/hdate_strings.c:242 src/hdate_strings.c:275
228 msgid "Rosh Hashana II"
229 msgstr "ב ראש השנה"
230
231 #: src/hdate_strings.c:243 src/hdate_strings.c:276
232 msgid "Tzom Gedaliah"
233 msgstr "צום גדליה"
234
235 #: src/hdate_strings.c:244 src/hdate_strings.c:277
236 msgid "Yom Kippur"
237 msgstr "יום כיפור"
238
239 #: src/hdate_strings.c:245 src/hdate_strings.c:278
240 msgid "Sukkot"
241 msgstr "סוכות"
242
243 #: src/hdate_strings.c:246 src/hdate_strings.c:279
244 msgid "Hol hamoed Sukkot"
245 msgstr "חול המועד סוכות"
246
247 #: src/hdate_strings.c:247 src/hdate_strings.c:280
248 msgid "Hoshana raba"
249 msgstr "הושענה רבה"
250
251 #: src/hdate_strings.c:248 src/hdate_strings.c:281
252 msgid "Simchat Torah"
253 msgstr "שמחת תורה"
254
255 #: src/hdate_strings.c:249 src/hdate_strings.c:282
256 msgid "Chanukah"
257 msgstr "חנוכה"
258
259 #: src/hdate_strings.c:250 src/hdate_strings.c:283
260 msgid "Asara B'Tevet"
261 msgstr "עשרה בטבת"
262
263 #. 10
264 #: src/hdate_strings.c:251 src/hdate_strings.c:284
265 msgid "Tu B'Shvat"
266 msgstr "טו בשבט"
267
268 #: src/hdate_strings.c:252 src/hdate_strings.c:285
269 msgid "Ta'anit Esther"
270 msgstr "תענית אסתר"
271
272 #: src/hdate_strings.c:253 src/hdate_strings.c:286
273 msgid "Purim"
274 msgstr "פורים"
275
276 #: src/hdate_strings.c:254 src/hdate_strings.c:287
277 msgid "Shushan Purim"
278 msgstr "שושן פורים"
279
280 #: src/hdate_strings.c:255 src/hdate_strings.c:288
281 msgid "Pesach"
282 msgstr "פסח"
283
284 #: src/hdate_strings.c:256 src/hdate_strings.c:289
285 msgid "Hol hamoed Pesach"
286 msgstr "חול המועד פסח"
287
288 #: src/hdate_strings.c:257 src/hdate_strings.c:290
289 msgid "Yom HaAtzma'ut"
290 msgstr "יום העצמאות"
291
292 #: src/hdate_strings.c:258 src/hdate_strings.c:291
293 msgid "Lag B'Omer"
294 msgstr "לג בעומר"
295
296 #: src/hdate_strings.c:259 src/hdate_strings.c:292
297 msgid "Erev Shavuot"
298 msgstr "ערב שבועות"
299
300 #: src/hdate_strings.c:260 src/hdate_strings.c:293
301 msgid "Shavuot"
302 msgstr "שבועות"
303
304 #. 20
305 #: src/hdate_strings.c:261 src/hdate_strings.c:294
306 msgid "Tzom Tammuz"
307 msgstr "יז תמוז"
308
309 #: src/hdate_strings.c:262 src/hdate_strings.c:295
310 msgid "Tish'a B'Av"
311 msgstr "תשעה באב"
312
313 #: src/hdate_strings.c:263 src/hdate_strings.c:296
314 msgid "Tu B'Av"
315 msgstr "טו באב"
316
317 #: src/hdate_strings.c:264 src/hdate_strings.c:297
318 msgid "Yom HaShoah"
319 msgstr "יום השואה"
320
321 #: src/hdate_strings.c:265 src/hdate_strings.c:298
322 msgid "Yom HaZikaron"
323 msgstr "יום הזיכרון"
324
325 #. 25
326 #: src/hdate_strings.c:266 src/hdate_strings.c:299
327 msgid "Yom Yerushalayim"
328 msgstr "יום ירושלים"
329
330 #: src/hdate_strings.c:267 src/hdate_strings.c:300
331 msgid "Shmini Atzeret"
332 msgstr "שמיני עצרת"
333
334 #: src/hdate_strings.c:268 src/hdate_strings.c:301
335 msgid "Pesach VII"
336 msgstr "שביעי של פסח"
337
338 #: src/hdate_strings.c:269 src/hdate_strings.c:302
339 msgid "Pesach VIII"
340 msgstr "שמיני של פסח"
341
342 #: src/hdate_strings.c:270 src/hdate_strings.c:303
343 msgid "Shavuot II"
344 msgstr "שני של שבועות"
345
346 #: src/hdate_strings.c:271 src/hdate_strings.c:304
347 msgid "Sukkot II"
348 msgstr "סוכות שני"
349
350 #: src/hdate_strings.c:272 src/hdate_strings.c:305
351 msgid "Pesach II"
352 msgstr "שני של פסח"
353
354 #: src/hdate_strings.c:338 src/hdate_strings.c:401
355 msgid "none"
356 msgstr "חסר"
357
358 #: src/hdate_strings.c:339 src/hdate_strings.c:402
359 msgid "Bereshit"
360 msgstr "בראשית"
361
362 #. 1
363 #: src/hdate_strings.c:340 src/hdate_strings.c:403
364 msgid "Noach"
365 msgstr "נח"
366
367 #: src/hdate_strings.c:341 src/hdate_strings.c:404
368 msgid "Lech-Lecha"
369 msgstr "לך לך"
370
371 #: src/hdate_strings.c:342 src/hdate_strings.c:405
372 msgid "Vayera"
373 msgstr "וירא"
374
375 #: src/hdate_strings.c:343 src/hdate_strings.c:406
376 msgid "Chayei Sara"
377 msgstr "חיי שרה"
378
379 #: src/hdate_strings.c:344 src/hdate_strings.c:407
380 msgid "Toldot"
381 msgstr "תולדות"
382
383 #: src/hdate_strings.c:345 src/hdate_strings.c:408
384 msgid "Vayetzei"
385 msgstr "ויצא"
386
387 #: src/hdate_strings.c:346 src/hdate_strings.c:409
388 msgid "Vayishlach"
389 msgstr "וישלח"
390
391 #: src/hdate_strings.c:347 src/hdate_strings.c:410
392 msgid "Vayeshev"
393 msgstr "וישב"
394
395 #: src/hdate_strings.c:348 src/hdate_strings.c:411
396 msgid "Miketz"
397 msgstr "מקץ"
398
399 #. 10
400 #: src/hdate_strings.c:349 src/hdate_strings.c:412
401 msgid "Vayigash"
402 msgstr "ויגש"
403
404 #: src/hdate_strings.c:350 src/hdate_strings.c:413
405 msgid "Vayechi"
406 msgstr "ויחי"
407
408 #: src/hdate_strings.c:351 src/hdate_strings.c:414
409 msgid "Shemot"
410 msgstr "שמות"
411
412 #: src/hdate_strings.c:352 src/hdate_strings.c:415
413 msgid "Vaera"
414 msgstr "וארא"
415
416 #: src/hdate_strings.c:353 src/hdate_strings.c:416
417 msgid "Bo"
418 msgstr "בא"
419
420 #: src/hdate_strings.c:354 src/hdate_strings.c:417
421 msgid "Beshalach"
422 msgstr "בשלח"
423
424 #: src/hdate_strings.c:355 src/hdate_strings.c:418
425 msgid "Yitro"
426 msgstr "יתרו"
427
428 #: src/hdate_strings.c:356 src/hdate_strings.c:419
429 msgid "Mishpatim"
430 msgstr "משפטים"
431
432 #: src/hdate_strings.c:357 src/hdate_strings.c:420
433 msgid "Terumah"
434 msgstr "תרומה"
435
436 #: src/hdate_strings.c:358 src/hdate_strings.c:421
437 msgid "Tetzaveh"
438 msgstr "תצווה"
439
440 #. 20
441 #: src/hdate_strings.c:359 src/hdate_strings.c:422
442 msgid "Ki Tisa"
443 msgstr "כי תשא"
444
445 #: src/hdate_strings.c:360 src/hdate_strings.c:423
446 msgid "Vayakhel"
447 msgstr "ויקהל"
448
449 #: src/hdate_strings.c:361 src/hdate_strings.c:424
450 msgid "Pekudei"
451 msgstr "פקודי"
452
453 #: src/hdate_strings.c:362 src/hdate_strings.c:425
454 msgid "Vayikra"
455 msgstr "ויקרא"
456
457 #: src/hdate_strings.c:363 src/hdate_strings.c:426
458 msgid "Tzav"
459 msgstr "צו"
460
461 #: src/hdate_strings.c:364 src/hdate_strings.c:427
462 msgid "Shmini"
463 msgstr "שמיני"
464
465 #: src/hdate_strings.c:365 src/hdate_strings.c:428
466 msgid "Tazria"
467 msgstr "תזריע"
468
469 #: src/hdate_strings.c:366 src/hdate_strings.c:429
470 msgid "Metzora"
471 msgstr "מצורע"
472
473 #: src/hdate_strings.c:367 src/hdate_strings.c:430
474 msgid "Achrei Mot"
475 msgstr "אחרי מות"
476
477 #: src/hdate_strings.c:368 src/hdate_strings.c:431
478 msgid "Kedoshim"
479 msgstr "קדושים"
480
481 #. 30
482 #: src/hdate_strings.c:369 src/hdate_strings.c:432
483 msgid "Emor"
484 msgstr "אמור"
485
486 #: src/hdate_strings.c:370 src/hdate_strings.c:433
487 msgid "Behar"
488 msgstr "בהר"
489
490 #: src/hdate_strings.c:371 src/hdate_strings.c:434
491 msgid "Bechukotai"
492 msgstr "בחוקותי"
493
494 #: src/hdate_strings.c:372 src/hdate_strings.c:435
495 msgid "Bamidbar"
496 msgstr "במדבר"
497
498 #: src/hdate_strings.c:373 src/hdate_strings.c:436
499 msgid "Nasso"
500 msgstr "נשא"
501
502 #: src/hdate_strings.c:374 src/hdate_strings.c:437
503 msgid "Beha'alotcha"
504 msgstr "בהעלותך"
505
506 #: src/hdate_strings.c:375 src/hdate_strings.c:438
507 msgid "Sh'lach"
508 msgstr "שלח"
509
510 #: src/hdate_strings.c:376 src/hdate_strings.c:439
511 msgid "Korach"
512 msgstr "קרח"
513
514 #: src/hdate_strings.c:377 src/hdate_strings.c:440
515 msgid "Chukat"
516 msgstr "חוקת"
517
518 #: src/hdate_strings.c:378 src/hdate_strings.c:441
519 msgid "Balak"
520 msgstr "בלק"
521
522 #. 40
523 #: src/hdate_strings.c:379 src/hdate_strings.c:442
524 msgid "Pinchas"
525 msgstr "פינחס"
526
527 #: src/hdate_strings.c:380 src/hdate_strings.c:443
528 msgid "Matot"
529 msgstr "מטות"
530
531 #: src/hdate_strings.c:381 src/hdate_strings.c:444
532 msgid "Masei"
533 msgstr "מסעי"
534
535 #: src/hdate_strings.c:382 src/hdate_strings.c:445
536 msgid "Devarim"
537 msgstr "דברים"
538
539 #: src/hdate_strings.c:383 src/hdate_strings.c:446
540 msgid "Vaetchanan"
541 msgstr "ואתחנן"
542
543 #: src/hdate_strings.c:384 src/hdate_strings.c:447
544 msgid "Eikev"
545 msgstr "עקב"
546
547 #: src/hdate_strings.c:385 src/hdate_strings.c:448
548 msgid "Re'eh"
549 msgstr "ראה"
550
551 #: src/hdate_strings.c:386 src/hdate_strings.c:449
552 msgid "Shoftim"
553 msgstr "שופטים"
554
555 #: src/hdate_strings.c:387 src/hdate_strings.c:450
556 msgid "Ki Teitzei"
557 msgstr "כי תצא"
558
559 #: src/hdate_strings.c:388 src/hdate_strings.c:451
560 msgid "Ki Tavo"
561 msgstr "כי תבוא"
562
563 #. 50
564 #: src/hdate_strings.c:389 src/hdate_strings.c:452
565 msgid "Nitzavim"
566 msgstr "נצבים"
567
568 #: src/hdate_strings.c:390 src/hdate_strings.c:453
569 msgid "Vayeilech"
570 msgstr "וילך"
571
572 #: src/hdate_strings.c:391 src/hdate_strings.c:454
573 msgid "Ha'Azinu"
574 msgstr "האזינו"
575
576 #: src/hdate_strings.c:392 src/hdate_strings.c:455
577 msgid "Vezot Habracha"
578 msgstr "וזאת הברכה"
579
580 #. 54
581 #: src/hdate_strings.c:393 src/hdate_strings.c:456
582 msgid "Vayakhel-Pekudei"
583 msgstr "ויקהל פקודי"
584
585 #: src/hdate_strings.c:394 src/hdate_strings.c:457
586 msgid "Tazria-Metzora"
587 msgstr "תזריע מצורע"
588
589 #: src/hdate_strings.c:395 src/hdate_strings.c:458
590 msgid "Achrei Mot-Kedoshim"
591 msgstr "אחרי מות קדושים"
592
593 #: src/hdate_strings.c:396 src/hdate_strings.c:459
594 msgid "Behar-Bechukotai"
595 msgstr "בהר בחוקותי"
596
597 #: src/hdate_strings.c:397 src/hdate_strings.c:460
598 msgid "Chukat-Balak"
599 msgstr "חוקת בלק"
600
601 #: src/hdate_strings.c:398 src/hdate_strings.c:461
602 msgid "Matot-Masei"
603 msgstr "מטות מסעי"
604
605 #: src/hdate_strings.c:399 src/hdate_strings.c:462
606 msgid "Nitzavim-Vayeilech"
607 msgstr "נצבים וילך"
608
609 #. if untranslated return null
610 #. return the translator name
611 #: src/hdate_strings.c:564 src/hdate_strings.c:568
612 msgid "translator"
613 msgstr "יעקב זמיר"
0 # SOME DESCRIPTIVE TITLE.
1 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
2 # This file is distributed under the same license as the PACKAGE package.
3 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4 #
5 #, fuzzy
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2005-08-08 00:38+0300\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=CHARSET\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #: src/hdate_strings.c:131
19 msgid "Sun"
20 msgstr ""
21
22 #: src/hdate_strings.c:131
23 msgid "Mon"
24 msgstr ""
25
26 #: src/hdate_strings.c:131
27 msgid "Tue"
28 msgstr ""
29
30 #: src/hdate_strings.c:131
31 msgid "Wed"
32 msgstr ""
33
34 #: src/hdate_strings.c:131
35 msgid "Thu"
36 msgstr ""
37
38 #: src/hdate_strings.c:132
39 msgid "Fri"
40 msgstr ""
41
42 #: src/hdate_strings.c:132
43 msgid "Sat"
44 msgstr ""
45
46 #: src/hdate_strings.c:133
47 msgid "Sunday"
48 msgstr ""
49
50 #: src/hdate_strings.c:133
51 msgid "Monday"
52 msgstr ""
53
54 #: src/hdate_strings.c:133
55 msgid "Tuesday"
56 msgstr ""
57
58 #: src/hdate_strings.c:133
59 msgid "Wednesday"
60 msgstr ""
61
62 #: src/hdate_strings.c:134
63 msgid "Thursday"
64 msgstr ""
65
66 #: src/hdate_strings.c:134
67 msgid "Friday"
68 msgstr ""
69
70 #: src/hdate_strings.c:134
71 msgid "Saturday"
72 msgstr ""
73
74 #: src/hdate_strings.c:165
75 msgid "Jan"
76 msgstr ""
77
78 #: src/hdate_strings.c:165
79 msgid "Feb"
80 msgstr ""
81
82 #: src/hdate_strings.c:165
83 msgid "Mar"
84 msgstr ""
85
86 #: src/hdate_strings.c:165
87 msgid "Apr"
88 msgstr ""
89
90 #: src/hdate_strings.c:165 src/hdate_strings.c:169
91 msgid "May"
92 msgstr ""
93
94 #: src/hdate_strings.c:166
95 msgid "Jun"
96 msgstr ""
97
98 #: src/hdate_strings.c:166
99 msgid "Jul"
100 msgstr ""
101
102 #: src/hdate_strings.c:166
103 msgid "Aug"
104 msgstr ""
105
106 #: src/hdate_strings.c:166
107 msgid "Sep"
108 msgstr ""
109
110 #: src/hdate_strings.c:166
111 msgid "Oct"
112 msgstr ""
113
114 #: src/hdate_strings.c:167
115 msgid "Nov"
116 msgstr ""
117
118 #: src/hdate_strings.c:167
119 msgid "Dec"
120 msgstr ""
121
122 #: src/hdate_strings.c:168
123 msgid "January"
124 msgstr ""
125
126 #: src/hdate_strings.c:168
127 msgid "February"
128 msgstr ""
129
130 #: src/hdate_strings.c:168
131 msgid "March"
132 msgstr ""
133
134 #: src/hdate_strings.c:169
135 msgid "April"
136 msgstr ""
137
138 #: src/hdate_strings.c:169
139 msgid "June"
140 msgstr ""
141
142 #: src/hdate_strings.c:170
143 msgid "July"
144 msgstr ""
145
146 #: src/hdate_strings.c:170
147 msgid "August"
148 msgstr ""
149
150 #: src/hdate_strings.c:170
151 msgid "September"
152 msgstr ""
153
154 #: src/hdate_strings.c:171
155 msgid "October"
156 msgstr ""
157
158 #: src/hdate_strings.c:171
159 msgid "November"
160 msgstr ""
161
162 #: src/hdate_strings.c:171
163 msgid "December"
164 msgstr ""
165
166 #: src/hdate_strings.c:202 src/hdate_strings.c:206
167 msgid "Tishrei"
168 msgstr ""
169
170 #: src/hdate_strings.c:202 src/hdate_strings.c:206
171 msgid "Cheshvan"
172 msgstr ""
173
174 #: src/hdate_strings.c:202 src/hdate_strings.c:206
175 msgid "Kislev"
176 msgstr ""
177
178 #: src/hdate_strings.c:202 src/hdate_strings.c:206
179 msgid "Tevet"
180 msgstr ""
181
182 #: src/hdate_strings.c:203 src/hdate_strings.c:207
183 msgid "Sh'vat"
184 msgstr ""
185
186 #: src/hdate_strings.c:203 src/hdate_strings.c:207
187 msgid "Adar"
188 msgstr ""
189
190 #: src/hdate_strings.c:203 src/hdate_strings.c:207
191 msgid "Nisan"
192 msgstr ""
193
194 #: src/hdate_strings.c:203 src/hdate_strings.c:207
195 msgid "Iyyar"
196 msgstr ""
197
198 #: src/hdate_strings.c:204 src/hdate_strings.c:208
199 msgid "Sivan"
200 msgstr ""
201
202 #: src/hdate_strings.c:204 src/hdate_strings.c:208
203 msgid "Tamuz"
204 msgstr ""
205
206 #: src/hdate_strings.c:204 src/hdate_strings.c:208
207 msgid "Av"
208 msgstr ""
209
210 #: src/hdate_strings.c:204 src/hdate_strings.c:208
211 msgid "Elul"
212 msgstr ""
213
214 #: src/hdate_strings.c:204 src/hdate_strings.c:208
215 msgid "Adar I"
216 msgstr ""
217
218 #: src/hdate_strings.c:205 src/hdate_strings.c:209
219 msgid "Adar II"
220 msgstr ""
221
222 #: src/hdate_strings.c:241 src/hdate_strings.c:274
223 msgid "Rosh Hashana I"
224 msgstr ""
225
226 #. 1
227 #: src/hdate_strings.c:242 src/hdate_strings.c:275
228 msgid "Rosh Hashana II"
229 msgstr ""
230
231 #: src/hdate_strings.c:243 src/hdate_strings.c:276
232 msgid "Tzom Gedaliah"
233 msgstr ""
234
235 #: src/hdate_strings.c:244 src/hdate_strings.c:277
236 msgid "Yom Kippur"
237 msgstr ""
238
239 #: src/hdate_strings.c:245 src/hdate_strings.c:278
240 msgid "Sukkot"
241 msgstr ""
242
243 #: src/hdate_strings.c:246 src/hdate_strings.c:279
244 msgid "Hol hamoed Sukkot"
245 msgstr ""
246
247 #: src/hdate_strings.c:247 src/hdate_strings.c:280
248 msgid "Hoshana raba"
249 msgstr ""
250
251 #: src/hdate_strings.c:248 src/hdate_strings.c:281
252 msgid "Simchat Torah"
253 msgstr ""
254
255 #: src/hdate_strings.c:249 src/hdate_strings.c:282
256 msgid "Chanukah"
257 msgstr ""
258
259 #: src/hdate_strings.c:250 src/hdate_strings.c:283
260 msgid "Asara B'Tevet"
261 msgstr ""
262
263 #. 10
264 #: src/hdate_strings.c:251 src/hdate_strings.c:284
265 msgid "Tu B'Shvat"
266 msgstr ""
267
268 #: src/hdate_strings.c:252 src/hdate_strings.c:285
269 msgid "Ta'anit Esther"
270 msgstr ""
271
272 #: src/hdate_strings.c:253 src/hdate_strings.c:286
273 msgid "Purim"
274 msgstr ""
275
276 #: src/hdate_strings.c:254 src/hdate_strings.c:287
277 msgid "Shushan Purim"
278 msgstr ""
279
280 #: src/hdate_strings.c:255 src/hdate_strings.c:288
281 msgid "Pesach"
282 msgstr ""
283
284 #: src/hdate_strings.c:256 src/hdate_strings.c:289
285 msgid "Hol hamoed Pesach"
286 msgstr ""
287
288 #: src/hdate_strings.c:257 src/hdate_strings.c:290
289 msgid "Yom HaAtzma'ut"
290 msgstr ""
291
292 #: src/hdate_strings.c:258 src/hdate_strings.c:291
293 msgid "Lag B'Omer"
294 msgstr ""
295
296 #: src/hdate_strings.c:259 src/hdate_strings.c:292
297 msgid "Erev Shavuot"
298 msgstr ""
299
300 #: src/hdate_strings.c:260 src/hdate_strings.c:293
301 msgid "Shavuot"
302 msgstr ""
303
304 #. 20
305 #: src/hdate_strings.c:261 src/hdate_strings.c:294
306 msgid "Tzom Tammuz"
307 msgstr ""
308
309 #: src/hdate_strings.c:262 src/hdate_strings.c:295
310 msgid "Tish'a B'Av"
311 msgstr ""
312
313 #: src/hdate_strings.c:263 src/hdate_strings.c:296
314 msgid "Tu B'Av"
315 msgstr ""
316
317 #: src/hdate_strings.c:264 src/hdate_strings.c:297
318 msgid "Yom HaShoah"
319 msgstr ""
320
321 #: src/hdate_strings.c:265 src/hdate_strings.c:298
322 msgid "Yom HaZikaron"
323 msgstr ""
324
325 #. 25
326 #: src/hdate_strings.c:266 src/hdate_strings.c:299
327 msgid "Yom Yerushalayim"
328 msgstr ""
329
330 #: src/hdate_strings.c:267 src/hdate_strings.c:300
331 msgid "Shmini Atzeret"
332 msgstr ""
333
334 #: src/hdate_strings.c:268 src/hdate_strings.c:301
335 msgid "Pesach VII"
336 msgstr ""
337
338 #: src/hdate_strings.c:269 src/hdate_strings.c:302
339 msgid "Pesach VIII"
340 msgstr ""
341
342 #: src/hdate_strings.c:270 src/hdate_strings.c:303
343 msgid "Shavuot II"
344 msgstr ""
345
346 #: src/hdate_strings.c:271 src/hdate_strings.c:304
347 msgid "Sukkot II"
348 msgstr ""
349
350 #: src/hdate_strings.c:272 src/hdate_strings.c:305
351 msgid "Pesach II"
352 msgstr ""
353
354 #: src/hdate_strings.c:338 src/hdate_strings.c:401
355 msgid "none"
356 msgstr ""
357
358 #: src/hdate_strings.c:339 src/hdate_strings.c:402
359 msgid "Bereshit"
360 msgstr ""
361
362 #. 1
363 #: src/hdate_strings.c:340 src/hdate_strings.c:403
364 msgid "Noach"
365 msgstr ""
366
367 #: src/hdate_strings.c:341 src/hdate_strings.c:404
368 msgid "Lech-Lecha"
369 msgstr ""
370
371 #: src/hdate_strings.c:342 src/hdate_strings.c:405
372 msgid "Vayera"
373 msgstr ""
374
375 #: src/hdate_strings.c:343 src/hdate_strings.c:406
376 msgid "Chayei Sara"
377 msgstr ""
378
379 #: src/hdate_strings.c:344 src/hdate_strings.c:407
380 msgid "Toldot"
381 msgstr ""
382
383 #: src/hdate_strings.c:345 src/hdate_strings.c:408
384 msgid "Vayetzei"
385 msgstr ""
386
387 #: src/hdate_strings.c:346 src/hdate_strings.c:409
388 msgid "Vayishlach"
389 msgstr ""
390
391 #: src/hdate_strings.c:347 src/hdate_strings.c:410
392 msgid "Vayeshev"
393 msgstr ""
394
395 #: src/hdate_strings.c:348 src/hdate_strings.c:411
396 msgid "Miketz"
397 msgstr ""
398
399 #. 10
400 #: src/hdate_strings.c:349 src/hdate_strings.c:412
401 msgid "Vayigash"
402 msgstr ""
403
404 #: src/hdate_strings.c:350 src/hdate_strings.c:413
405 msgid "Vayechi"
406 msgstr ""
407
408 #: src/hdate_strings.c:351 src/hdate_strings.c:414
409 msgid "Shemot"
410 msgstr ""
411
412 #: src/hdate_strings.c:352 src/hdate_strings.c:415
413 msgid "Vaera"
414 msgstr ""
415
416 #: src/hdate_strings.c:353 src/hdate_strings.c:416
417 msgid "Bo"
418 msgstr ""
419
420 #: src/hdate_strings.c:354 src/hdate_strings.c:417
421 msgid "Beshalach"
422 msgstr ""
423
424 #: src/hdate_strings.c:355 src/hdate_strings.c:418
425 msgid "Yitro"
426 msgstr ""
427
428 #: src/hdate_strings.c:356 src/hdate_strings.c:419
429 msgid "Mishpatim"
430 msgstr ""
431
432 #: src/hdate_strings.c:357 src/hdate_strings.c:420
433 msgid "Terumah"
434 msgstr ""
435
436 #: src/hdate_strings.c:358 src/hdate_strings.c:421
437 msgid "Tetzaveh"
438 msgstr ""
439
440 #. 20
441 #: src/hdate_strings.c:359 src/hdate_strings.c:422
442 msgid "Ki Tisa"
443 msgstr ""
444
445 #: src/hdate_strings.c:360 src/hdate_strings.c:423
446 msgid "Vayakhel"
447 msgstr ""
448
449 #: src/hdate_strings.c:361 src/hdate_strings.c:424
450 msgid "Pekudei"
451 msgstr ""
452
453 #: src/hdate_strings.c:362 src/hdate_strings.c:425
454 msgid "Vayikra"
455 msgstr ""
456
457 #: src/hdate_strings.c:363 src/hdate_strings.c:426
458 msgid "Tzav"
459 msgstr ""
460
461 #: src/hdate_strings.c:364 src/hdate_strings.c:427
462 msgid "Shmini"
463 msgstr ""
464
465 #: src/hdate_strings.c:365 src/hdate_strings.c:428
466 msgid "Tazria"
467 msgstr ""
468
469 #: src/hdate_strings.c:366 src/hdate_strings.c:429
470 msgid "Metzora"
471 msgstr ""
472
473 #: src/hdate_strings.c:367 src/hdate_strings.c:430
474 msgid "Achrei Mot"
475 msgstr ""
476
477 #: src/hdate_strings.c:368 src/hdate_strings.c:431
478 msgid "Kedoshim"
479 msgstr ""
480
481 #. 30
482 #: src/hdate_strings.c:369 src/hdate_strings.c:432
483 msgid "Emor"
484 msgstr ""
485
486 #: src/hdate_strings.c:370 src/hdate_strings.c:433
487 msgid "Behar"
488 msgstr ""
489
490 #: src/hdate_strings.c:371 src/hdate_strings.c:434
491 msgid "Bechukotai"
492 msgstr ""
493
494 #: src/hdate_strings.c:372 src/hdate_strings.c:435
495 msgid "Bamidbar"
496 msgstr ""
497
498 #: src/hdate_strings.c:373 src/hdate_strings.c:436
499 msgid "Nasso"
500 msgstr ""
501
502 #: src/hdate_strings.c:374 src/hdate_strings.c:437
503 msgid "Beha'alotcha"
504 msgstr ""
505
506 #: src/hdate_strings.c:375 src/hdate_strings.c:438
507 msgid "Sh'lach"
508 msgstr ""
509
510 #: src/hdate_strings.c:376 src/hdate_strings.c:439
511 msgid "Korach"
512 msgstr ""
513
514 #: src/hdate_strings.c:377 src/hdate_strings.c:440
515 msgid "Chukat"
516 msgstr ""
517
518 #: src/hdate_strings.c:378 src/hdate_strings.c:441
519 msgid "Balak"
520 msgstr ""
521
522 #. 40
523 #: src/hdate_strings.c:379 src/hdate_strings.c:442
524 msgid "Pinchas"
525 msgstr ""
526
527 #: src/hdate_strings.c:380 src/hdate_strings.c:443
528 msgid "Matot"
529 msgstr ""
530
531 #: src/hdate_strings.c:381 src/hdate_strings.c:444
532 msgid "Masei"
533 msgstr ""
534
535 #: src/hdate_strings.c:382 src/hdate_strings.c:445
536 msgid "Devarim"
537 msgstr ""
538
539 #: src/hdate_strings.c:383 src/hdate_strings.c:446
540 msgid "Vaetchanan"
541 msgstr ""
542
543 #: src/hdate_strings.c:384 src/hdate_strings.c:447
544 msgid "Eikev"
545 msgstr ""
546
547 #: src/hdate_strings.c:385 src/hdate_strings.c:448
548 msgid "Re'eh"
549 msgstr ""
550
551 #: src/hdate_strings.c:386 src/hdate_strings.c:449
552 msgid "Shoftim"
553 msgstr ""
554
555 #: src/hdate_strings.c:387 src/hdate_strings.c:450
556 msgid "Ki Teitzei"
557 msgstr ""
558
559 #: src/hdate_strings.c:388 src/hdate_strings.c:451
560 msgid "Ki Tavo"
561 msgstr ""
562
563 #. 50
564 #: src/hdate_strings.c:389 src/hdate_strings.c:452
565 msgid "Nitzavim"
566 msgstr ""
567
568 #: src/hdate_strings.c:390 src/hdate_strings.c:453
569 msgid "Vayeilech"
570 msgstr ""
571
572 #: src/hdate_strings.c:391 src/hdate_strings.c:454
573 msgid "Ha'Azinu"
574 msgstr ""
575
576 #: src/hdate_strings.c:392 src/hdate_strings.c:455
577 msgid "Vezot Habracha"
578 msgstr ""
579
580 #. 54
581 #: src/hdate_strings.c:393 src/hdate_strings.c:456
582 msgid "Vayakhel-Pekudei"
583 msgstr ""
584
585 #: src/hdate_strings.c:394 src/hdate_strings.c:457
586 msgid "Tazria-Metzora"
587 msgstr ""
588
589 #: src/hdate_strings.c:395 src/hdate_strings.c:458
590 msgid "Achrei Mot-Kedoshim"
591 msgstr ""
592
593 #: src/hdate_strings.c:396 src/hdate_strings.c:459
594 msgid "Behar-Bechukotai"
595 msgstr ""
596
597 #: src/hdate_strings.c:397 src/hdate_strings.c:460
598 msgid "Chukat-Balak"
599 msgstr ""
600
601 #: src/hdate_strings.c:398 src/hdate_strings.c:461
602 msgid "Matot-Masei"
603 msgstr ""
604
605 #: src/hdate_strings.c:399 src/hdate_strings.c:462
606 msgid "Nitzavim-Vayeilech"
607 msgstr ""
608
609 #. if untranslated return null
610 #. return the translator name
611 #: src/hdate_strings.c:564 src/hdate_strings.c:568
612 msgid "translator"
613 msgstr ""
Binary diff not shown
0 # translation of libhdate.pot to Russian
1 # This file is distributed under the same license as the libhdate package.
2 # Copyright (C) 2005 Boris Peterberg.
3 # Boris Peterberg, 2005.
4 #
5 #, fuzzy
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: ru\n"
9 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2005-08-08 00:38+0300\n"
11 "PO-Revision-Date: 2005-03-08 22:44-0200\n"
12 "Last-Translator: Boeis Peterberg\n"
13 "Language-Team: Russian\n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #: src/hdate_strings.c:131
19 msgid "Sun"
20 msgstr "Вс."
21
22 #: src/hdate_strings.c:131
23 msgid "Mon"
24 msgstr "Пн."
25
26 #: src/hdate_strings.c:131
27 msgid "Tue"
28 msgstr "Вт."
29
30 #: src/hdate_strings.c:131
31 msgid "Wed"
32 msgstr "Ср."
33
34 #: src/hdate_strings.c:131
35 msgid "Thu"
36 msgstr "Чт."
37
38 #: src/hdate_strings.c:132
39 msgid "Fri"
40 msgstr "Пт."
41
42 #: src/hdate_strings.c:132
43 msgid "Sat"
44 msgstr "Сб."
45
46 #: src/hdate_strings.c:133
47 msgid "Sunday"
48 msgstr "Воскресенье"
49
50 #: src/hdate_strings.c:133
51 msgid "Monday"
52 msgstr "Понедельник"
53
54 #: src/hdate_strings.c:133
55 msgid "Tuesday"
56 msgstr "Вторник"
57
58 #: src/hdate_strings.c:133
59 msgid "Wednesday"
60 msgstr "Среда"
61
62 #: src/hdate_strings.c:134
63 msgid "Thursday"
64 msgstr "Четверг"
65
66 #: src/hdate_strings.c:134
67 msgid "Friday"
68 msgstr "Пятница"
69
70 #: src/hdate_strings.c:134
71 msgid "Saturday"
72 msgstr "Суботта"
73
74 #: src/hdate_strings.c:165
75 msgid "Jan"
76 msgstr "Янв"
77
78 #: src/hdate_strings.c:165
79 msgid "Feb"
80 msgstr "Фев"
81
82 #: src/hdate_strings.c:165
83 msgid "Mar"
84 msgstr "Мар"
85
86 #: src/hdate_strings.c:165
87 msgid "Apr"
88 msgstr "Апр"
89
90 #: src/hdate_strings.c:165 src/hdate_strings.c:169
91 msgid "May"
92 msgstr "Май"
93
94 #: src/hdate_strings.c:166
95 msgid "Jun"
96 msgstr "Июнь"
97
98 #: src/hdate_strings.c:166
99 msgid "Jul"
100 msgstr "Июль"
101
102 #: src/hdate_strings.c:166
103 msgid "Aug"
104 msgstr "Авг"
105
106 #: src/hdate_strings.c:166
107 msgid "Sep"
108 msgstr "Сен"
109
110 #: src/hdate_strings.c:166
111 msgid "Oct"
112 msgstr "Окт"
113
114 #: src/hdate_strings.c:167
115 msgid "Nov"
116 msgstr "Но"
117
118 #: src/hdate_strings.c:167
119 msgid "Dec"
120 msgstr "Дек"
121
122 #: src/hdate_strings.c:168
123 msgid "January"
124 msgstr "Январь"
125
126 #: src/hdate_strings.c:168
127 msgid "February"
128 msgstr "Февраль"
129
130 #: src/hdate_strings.c:168
131 msgid "March"
132 msgstr "Март"
133
134 #: src/hdate_strings.c:169
135 msgid "April"
136 msgstr "Апрель"
137
138 #: src/hdate_strings.c:169
139 msgid "June"
140 msgstr "Июнь"
141
142 #: src/hdate_strings.c:170
143 msgid "July"
144 msgstr "Июль"
145
146 #: src/hdate_strings.c:170
147 msgid "August"
148 msgstr "Август"
149
150 #: src/hdate_strings.c:170
151 msgid "September"
152 msgstr "Сентябрь"
153
154 #: src/hdate_strings.c:171
155 msgid "October"
156 msgstr "Октябрь"
157
158 #: src/hdate_strings.c:171
159 msgid "November"
160 msgstr "Ноябрь"
161
162 #: src/hdate_strings.c:171
163 msgid "December"
164 msgstr "Декабрь"
165
166 #: src/hdate_strings.c:202 src/hdate_strings.c:206
167 msgid "Tishrei"
168 msgstr "Тишрэй"
169
170 #: src/hdate_strings.c:202 src/hdate_strings.c:206
171 msgid "Cheshvan"
172 msgstr "Хешван"
173
174 #: src/hdate_strings.c:202 src/hdate_strings.c:206
175 msgid "Kislev"
176 msgstr "Кислэв"
177
178 #: src/hdate_strings.c:202 src/hdate_strings.c:206
179 msgid "Tevet"
180 msgstr "Тэвэт"
181
182 #: src/hdate_strings.c:203 src/hdate_strings.c:207
183 msgid "Sh'vat"
184 msgstr "Шват"
185
186 #: src/hdate_strings.c:203 src/hdate_strings.c:207
187 msgid "Adar"
188 msgstr "Адар"
189
190 #: src/hdate_strings.c:203 src/hdate_strings.c:207
191 msgid "Nisan"
192 msgstr "Нисан"
193
194 #: src/hdate_strings.c:203 src/hdate_strings.c:207
195 msgid "Iyyar"
196 msgstr "Ийар"
197
198 #: src/hdate_strings.c:204 src/hdate_strings.c:208
199 msgid "Sivan"
200 msgstr "Сиван"
201
202 #: src/hdate_strings.c:204 src/hdate_strings.c:208
203 msgid "Tamuz"
204 msgstr "Тамуз"
205
206 #: src/hdate_strings.c:204 src/hdate_strings.c:208
207 msgid "Av"
208 msgstr "Ав"
209
210 #: src/hdate_strings.c:204 src/hdate_strings.c:208
211 msgid "Elul"
212 msgstr "Элул"
213
214 #: src/hdate_strings.c:204 src/hdate_strings.c:208
215 msgid "Adar I"
216 msgstr "Адар 1"
217
218 #: src/hdate_strings.c:205 src/hdate_strings.c:209
219 msgid "Adar II"
220 msgstr "Адар 2"
221
222 #: src/hdate_strings.c:241 src/hdate_strings.c:274
223 msgid "Rosh Hashana I"
224 msgstr "Рош-а-Шана I"
225
226 #. 1
227 #: src/hdate_strings.c:242 src/hdate_strings.c:275
228 msgid "Rosh Hashana II"
229 msgstr "Рош-а-Шана II"
230
231 #: src/hdate_strings.c:243 src/hdate_strings.c:276
232 msgid "Tzom Gedaliah"
233 msgstr "Цом гдаляа"
234
235 #: src/hdate_strings.c:244 src/hdate_strings.c:277
236 msgid "Yom Kippur"
237 msgstr "Йом Кипур"
238
239 #: src/hdate_strings.c:245 src/hdate_strings.c:278
240 msgid "Sukkot"
241 msgstr "Суккот I"
242
243 #: src/hdate_strings.c:246 src/hdate_strings.c:279
244 msgid "Hol hamoed Sukkot"
245 msgstr "Суккот"
246
247 #: src/hdate_strings.c:247 src/hdate_strings.c:280
248 msgid "Hoshana raba"
249 msgstr "hoшана Раба"
250
251 #: src/hdate_strings.c:248 src/hdate_strings.c:281
252 msgid "Simchat Torah"
253 msgstr "Симхат-Тора"
254
255 #: src/hdate_strings.c:249 src/hdate_strings.c:282
256 msgid "Chanukah"
257 msgstr "Ханука"
258
259 #: src/hdate_strings.c:250 src/hdate_strings.c:283
260 msgid "Asara B'Tevet"
261 msgstr "Десятое Тевета"
262
263 #. 10
264 #: src/hdate_strings.c:251 src/hdate_strings.c:284
265 msgid "Tu B'Shvat"
266 msgstr "Ту би-Шват"
267
268 #: src/hdate_strings.c:252 src/hdate_strings.c:285
269 msgid "Ta'anit Esther"
270 msgstr "Танйт зстер"
271
272 #: src/hdate_strings.c:253 src/hdate_strings.c:286
273 msgid "Purim"
274 msgstr "Пурим"
275
276 #: src/hdate_strings.c:254 src/hdate_strings.c:287
277 msgid "Shushan Purim"
278 msgstr "Ш. Пурим"
279
280 #: src/hdate_strings.c:255 src/hdate_strings.c:288
281 msgid "Pesach"
282 msgstr "Пэсах I"
283
284 #: src/hdate_strings.c:256 src/hdate_strings.c:289
285 msgid "Hol hamoed Pesach"
286 msgstr "Песах"
287
288 #: src/hdate_strings.c:257 src/hdate_strings.c:290
289 msgid "Yom HaAtzma'ut"
290 msgstr "День Независимости"
291
292 #: src/hdate_strings.c:258 src/hdate_strings.c:291
293 msgid "Lag B'Omer"
294 msgstr "Лаг ба-Омер"
295
296 #: src/hdate_strings.c:259 src/hdate_strings.c:292
297 msgid "Erev Shavuot"
298 msgstr "Шавуот"
299
300 #: src/hdate_strings.c:260 src/hdate_strings.c:293
301 msgid "Shavuot"
302 msgstr "Шавуот"
303
304 #. 20
305 #: src/hdate_strings.c:261 src/hdate_strings.c:294
306 msgid "Tzom Tammuz"
307 msgstr "17 Тамуза"
308
309 #: src/hdate_strings.c:262 src/hdate_strings.c:295
310 msgid "Tish'a B'Av"
311 msgstr "9 Ава"
312
313 #: src/hdate_strings.c:263 src/hdate_strings.c:296
314 msgid "Tu B'Av"
315 msgstr "15-ое Ава"
316
317 #: src/hdate_strings.c:264 src/hdate_strings.c:297
318 msgid "Yom HaShoah"
319 msgstr "День Холокоста"
320
321 #: src/hdate_strings.c:265 src/hdate_strings.c:298
322 msgid "Yom HaZikaron"
323 msgstr "День Памяти"
324
325 #. 25
326 #: src/hdate_strings.c:266 src/hdate_strings.c:299
327 msgid "Yom Yerushalayim"
328 msgstr "День Йерусалима"
329
330 #: src/hdate_strings.c:267 src/hdate_strings.c:300
331 msgid "Shmini Atzeret"
332 msgstr "Шмини-Ацерет"
333
334 #: src/hdate_strings.c:268 src/hdate_strings.c:301
335 msgid "Pesach VII"
336 msgstr "Песах VII"
337
338 #: src/hdate_strings.c:269 src/hdate_strings.c:302
339 msgid "Pesach VIII"
340 msgstr "Песах VIII"
341
342 #: src/hdate_strings.c:270 src/hdate_strings.c:303
343 msgid "Shavuot II"
344 msgstr "Шавуот II"
345
346 #: src/hdate_strings.c:271 src/hdate_strings.c:304
347 #, fuzzy
348 msgid "Sukkot II"
349 msgstr "Суккот II"
350
351 #: src/hdate_strings.c:272 src/hdate_strings.c:305
352 #, fuzzy
353 msgid "Pesach II"
354 msgstr "Песах II"
355
356 #: src/hdate_strings.c:338 src/hdate_strings.c:401
357 msgid "none"
358 msgstr "Нет"
359
360 #: src/hdate_strings.c:339 src/hdate_strings.c:402
361 msgid "Bereshit"
362 msgstr ""
363
364 #. 1
365 #: src/hdate_strings.c:340 src/hdate_strings.c:403
366 msgid "Noach"
367 msgstr "Ноах"
368
369 #: src/hdate_strings.c:341 src/hdate_strings.c:404
370 msgid "Lech-Lecha"
371 msgstr ""
372
373 #: src/hdate_strings.c:342 src/hdate_strings.c:405
374 msgid "Vayera"
375 msgstr ""
376
377 #: src/hdate_strings.c:343 src/hdate_strings.c:406
378 msgid "Chayei Sara"
379 msgstr "Жизнь Сары"
380
381 #: src/hdate_strings.c:344 src/hdate_strings.c:407
382 msgid "Toldot"
383 msgstr ""
384
385 #: src/hdate_strings.c:345 src/hdate_strings.c:408
386 msgid "Vayetzei"
387 msgstr ""
388
389 #: src/hdate_strings.c:346 src/hdate_strings.c:409
390 msgid "Vayishlach"
391 msgstr ""
392
393 #: src/hdate_strings.c:347 src/hdate_strings.c:410
394 msgid "Vayeshev"
395 msgstr ""
396
397 #: src/hdate_strings.c:348 src/hdate_strings.c:411
398 msgid "Miketz"
399 msgstr ""
400
401 #. 10
402 #: src/hdate_strings.c:349 src/hdate_strings.c:412
403 msgid "Vayigash"
404 msgstr ""
405
406 #: src/hdate_strings.c:350 src/hdate_strings.c:413
407 msgid "Vayechi"
408 msgstr ""
409
410 #: src/hdate_strings.c:351 src/hdate_strings.c:414
411 msgid "Shemot"
412 msgstr ""
413
414 #: src/hdate_strings.c:352 src/hdate_strings.c:415
415 msgid "Vaera"
416 msgstr ""
417
418 #: src/hdate_strings.c:353 src/hdate_strings.c:416
419 msgid "Bo"
420 msgstr ""
421
422 #: src/hdate_strings.c:354 src/hdate_strings.c:417
423 msgid "Beshalach"
424 msgstr ""
425
426 #: src/hdate_strings.c:355 src/hdate_strings.c:418
427 msgid "Yitro"
428 msgstr ""
429
430 #: src/hdate_strings.c:356 src/hdate_strings.c:419
431 msgid "Mishpatim"
432 msgstr ""
433
434 #: src/hdate_strings.c:357 src/hdate_strings.c:420
435 msgid "Terumah"
436 msgstr ""
437
438 #: src/hdate_strings.c:358 src/hdate_strings.c:421
439 msgid "Tetzaveh"
440 msgstr ""
441
442 #. 20
443 #: src/hdate_strings.c:359 src/hdate_strings.c:422
444 msgid "Ki Tisa"
445 msgstr ""
446
447 #: src/hdate_strings.c:360 src/hdate_strings.c:423
448 msgid "Vayakhel"
449 msgstr ""
450
451 #: src/hdate_strings.c:361 src/hdate_strings.c:424
452 msgid "Pekudei"
453 msgstr ""
454
455 #: src/hdate_strings.c:362 src/hdate_strings.c:425
456 msgid "Vayikra"
457 msgstr ""
458
459 #: src/hdate_strings.c:363 src/hdate_strings.c:426
460 msgid "Tzav"
461 msgstr ""
462
463 #: src/hdate_strings.c:364 src/hdate_strings.c:427
464 msgid "Shmini"
465 msgstr ""
466
467 #: src/hdate_strings.c:365 src/hdate_strings.c:428
468 msgid "Tazria"
469 msgstr ""
470
471 #: src/hdate_strings.c:366 src/hdate_strings.c:429
472 msgid "Metzora"
473 msgstr ""
474
475 #: src/hdate_strings.c:367 src/hdate_strings.c:430
476 msgid "Achrei Mot"
477 msgstr ""
478
479 #: src/hdate_strings.c:368 src/hdate_strings.c:431
480 msgid "Kedoshim"
481 msgstr ""
482
483 #. 30
484 #: src/hdate_strings.c:369 src/hdate_strings.c:432
485 msgid "Emor"
486 msgstr ""
487
488 #: src/hdate_strings.c:370 src/hdate_strings.c:433
489 msgid "Behar"
490 msgstr ""
491
492 #: src/hdate_strings.c:371 src/hdate_strings.c:434
493 msgid "Bechukotai"
494 msgstr ""
495
496 #: src/hdate_strings.c:372 src/hdate_strings.c:435
497 msgid "Bamidbar"
498 msgstr ""
499
500 #: src/hdate_strings.c:373 src/hdate_strings.c:436
501 msgid "Nasso"
502 msgstr ""
503
504 #: src/hdate_strings.c:374 src/hdate_strings.c:437
505 msgid "Beha'alotcha"
506 msgstr ""
507
508 #: src/hdate_strings.c:375 src/hdate_strings.c:438
509 msgid "Sh'lach"
510 msgstr ""
511
512 #: src/hdate_strings.c:376 src/hdate_strings.c:439
513 msgid "Korach"
514 msgstr ""
515
516 #: src/hdate_strings.c:377 src/hdate_strings.c:440
517 msgid "Chukat"
518 msgstr ""
519
520 #: src/hdate_strings.c:378 src/hdate_strings.c:441
521 msgid "Balak"
522 msgstr ""
523
524 #. 40
525 #: src/hdate_strings.c:379 src/hdate_strings.c:442
526 msgid "Pinchas"
527 msgstr ""
528
529 #: src/hdate_strings.c:380 src/hdate_strings.c:443
530 msgid "Matot"
531 msgstr ""
532
533 #: src/hdate_strings.c:381 src/hdate_strings.c:444
534 msgid "Masei"
535 msgstr ""
536
537 #: src/hdate_strings.c:382 src/hdate_strings.c:445
538 msgid "Devarim"
539 msgstr ""
540
541 #: src/hdate_strings.c:383 src/hdate_strings.c:446
542 msgid "Vaetchanan"
543 msgstr ""
544
545 #: src/hdate_strings.c:384 src/hdate_strings.c:447
546 msgid "Eikev"
547 msgstr ""
548
549 #: src/hdate_strings.c:385 src/hdate_strings.c:448
550 msgid "Re'eh"
551 msgstr ""
552
553 #: src/hdate_strings.c:386 src/hdate_strings.c:449
554 msgid "Shoftim"
555 msgstr ""
556
557 #: src/hdate_strings.c:387 src/hdate_strings.c:450
558 msgid "Ki Teitzei"
559 msgstr ""
560
561 #: src/hdate_strings.c:388 src/hdate_strings.c:451
562 msgid "Ki Tavo"
563 msgstr ""
564
565 #. 50
566 #: src/hdate_strings.c:389 src/hdate_strings.c:452
567 msgid "Nitzavim"
568 msgstr ""
569
570 #: src/hdate_strings.c:390 src/hdate_strings.c:453
571 msgid "Vayeilech"
572 msgstr ""
573
574 #: src/hdate_strings.c:391 src/hdate_strings.c:454
575 msgid "Ha'Azinu"
576 msgstr ""
577
578 #: src/hdate_strings.c:392 src/hdate_strings.c:455
579 msgid "Vezot Habracha"
580 msgstr ""
581
582 #. 54
583 #: src/hdate_strings.c:393 src/hdate_strings.c:456
584 msgid "Vayakhel-Pekudei"
585 msgstr ""
586
587 #: src/hdate_strings.c:394 src/hdate_strings.c:457
588 msgid "Tazria-Metzora"
589 msgstr ""
590
591 #: src/hdate_strings.c:395 src/hdate_strings.c:458
592 msgid "Achrei Mot-Kedoshim"
593 msgstr ""
594
595 #: src/hdate_strings.c:396 src/hdate_strings.c:459
596 msgid "Behar-Bechukotai"
597 msgstr ""
598
599 #: src/hdate_strings.c:397 src/hdate_strings.c:460
600 msgid "Chukat-Balak"
601 msgstr ""
602
603 #: src/hdate_strings.c:398 src/hdate_strings.c:461
604 msgid "Matot-Masei"
605 msgstr ""
606
607 #: src/hdate_strings.c:399 src/hdate_strings.c:462
608 msgid "Nitzavim-Vayeilech"
609 msgstr ""
610
611 #. if untranslated return null
612 #. return the translator name
613 #: src/hdate_strings.c:564 src/hdate_strings.c:568
614 msgid "translator"
615 msgstr "Борис Петербарг"
Binary diff not shown
0 # Swedish translation of libhdate.
1 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
2 # This file is distributed under the same license as the libhdate package.
3 # Daniel Nylander <po@danielnylander.se>, 2006.
4 #
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: libhdate\n"
8 "Report-Msgid-Bugs-To: \n"
9 "POT-Creation-Date: 2005-08-08 00:38+0300\n"
10 "PO-Revision-Date: 2006-03-19 16:53+0100\n"
11 "Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
12 "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=utf-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16
17 #: src/hdate_strings.c:131
18 msgid "Sun"
19 msgstr "Sön"
20
21 #: src/hdate_strings.c:131
22 msgid "Mon"
23 msgstr "Mån"
24
25 #: src/hdate_strings.c:131
26 msgid "Tue"
27 msgstr "Tis"
28
29 #: src/hdate_strings.c:131
30 msgid "Wed"
31 msgstr "Ons"
32
33 #: src/hdate_strings.c:131
34 msgid "Thu"
35 msgstr "Tor"
36
37 #: src/hdate_strings.c:132
38 msgid "Fri"
39 msgstr "Fre"
40
41 #: src/hdate_strings.c:132
42 msgid "Sat"
43 msgstr "Lör"
44
45 #: src/hdate_strings.c:133
46 msgid "Sunday"
47 msgstr "Söndag"
48
49 #: src/hdate_strings.c:133
50 msgid "Monday"
51 msgstr "Måndag"
52
53 #: src/hdate_strings.c:133
54 msgid "Tuesday"
55 msgstr "Tisdag"
56
57 #: src/hdate_strings.c:133
58 msgid "Wednesday"
59 msgstr "Onsdag"
60
61 #: src/hdate_strings.c:134
62 msgid "Thursday"
63 msgstr "Torsdag"
64
65 #: src/hdate_strings.c:134
66 msgid "Friday"
67 msgstr "Fredag"
68
69 #: src/hdate_strings.c:134
70 msgid "Saturday"
71 msgstr "Lördag"
72
73 #: src/hdate_strings.c:165
74 msgid "Jan"
75 msgstr "Jan"
76
77 #: src/hdate_strings.c:165
78 msgid "Feb"
79 msgstr "Feb"
80
81 #: src/hdate_strings.c:165
82 msgid "Mar"
83 msgstr "Mar"
84
85 #: src/hdate_strings.c:165
86 msgid "Apr"
87 msgstr "Apr"
88
89 #: src/hdate_strings.c:165 src/hdate_strings.c:169
90 msgid "May"
91 msgstr "Maj"
92
93 #: src/hdate_strings.c:166
94 msgid "Jun"
95 msgstr "Jun"
96
97 #: src/hdate_strings.c:166
98 msgid "Jul"
99 msgstr "Jul"
100
101 #: src/hdate_strings.c:166
102 msgid "Aug"
103 msgstr "Aug"
104
105 #: src/hdate_strings.c:166
106 msgid "Sep"
107 msgstr "Sep"
108
109 #: src/hdate_strings.c:166
110 msgid "Oct"
111 msgstr "Okt"
112
113 #: src/hdate_strings.c:167
114 msgid "Nov"
115 msgstr "Nov"
116
117 #: src/hdate_strings.c:167
118 msgid "Dec"
119 msgstr "Dec"
120
121 #: src/hdate_strings.c:168
122 msgid "January"
123 msgstr "Januari"
124
125 #: src/hdate_strings.c:168
126 msgid "February"
127 msgstr "Februari"
128
129 #: src/hdate_strings.c:168
130 msgid "March"
131 msgstr "Mars"
132
133 #: src/hdate_strings.c:169
134 msgid "April"
135 msgstr "April"
136
137 #: src/hdate_strings.c:169
138 msgid "June"
139 msgstr "Juni"
140
141 #: src/hdate_strings.c:170
142 msgid "July"
143 msgstr "Juli"
144
145 #: src/hdate_strings.c:170
146 msgid "August"
147 msgstr "Augusti"
148
149 #: src/hdate_strings.c:170
150 msgid "September"
151 msgstr "September"
152
153 #: src/hdate_strings.c:171
154 msgid "October"
155 msgstr "Oktober"
156
157 #: src/hdate_strings.c:171
158 msgid "November"
159 msgstr "November"
160
161 #: src/hdate_strings.c:171
162 msgid "December"
163 msgstr "December"
164
165 #: src/hdate_strings.c:202 src/hdate_strings.c:206
166 msgid "Tishrei"
167 msgstr "Tishrei"
168
169 #: src/hdate_strings.c:202 src/hdate_strings.c:206
170 msgid "Cheshvan"
171 msgstr "Cheshvan"
172
173 #: src/hdate_strings.c:202 src/hdate_strings.c:206
174 msgid "Kislev"
175 msgstr "Kislev"
176
177 #: src/hdate_strings.c:202 src/hdate_strings.c:206
178 msgid "Tevet"
179 msgstr "Tevet"
180
181 #: src/hdate_strings.c:203 src/hdate_strings.c:207
182 msgid "Sh'vat"
183 msgstr "Sh'vat"
184
185 #: src/hdate_strings.c:203 src/hdate_strings.c:207
186 msgid "Adar"
187 msgstr "Adar"
188
189 #: src/hdate_strings.c:203 src/hdate_strings.c:207
190 msgid "Nisan"
191 msgstr "Nisan"
192
193 #: src/hdate_strings.c:203 src/hdate_strings.c:207
194 msgid "Iyyar"
195 msgstr "Iyyar"
196
197 #: src/hdate_strings.c:204 src/hdate_strings.c:208
198 msgid "Sivan"
199 msgstr "Sivan"
200
201 #: src/hdate_strings.c:204 src/hdate_strings.c:208
202 msgid "Tamuz"
203 msgstr "Tamuz"
204
205 #: src/hdate_strings.c:204 src/hdate_strings.c:208
206 msgid "Av"
207 msgstr "Av"
208
209 #: src/hdate_strings.c:204 src/hdate_strings.c:208
210 msgid "Elul"
211 msgstr "Elul"
212
213 #: src/hdate_strings.c:204 src/hdate_strings.c:208
214 msgid "Adar I"
215 msgstr "Adar I"
216
217 #: src/hdate_strings.c:205 src/hdate_strings.c:209
218 msgid "Adar II"
219 msgstr "Adar II"
220
221 #: src/hdate_strings.c:241 src/hdate_strings.c:274
222 msgid "Rosh Hashana I"
223 msgstr "Rosh Hashana I"
224
225 #. 1
226 #: src/hdate_strings.c:242 src/hdate_strings.c:275
227 msgid "Rosh Hashana II"
228 msgstr "Rosh Hashana II"
229
230 #: src/hdate_strings.c:243 src/hdate_strings.c:276
231 msgid "Tzom Gedaliah"
232 msgstr "Tzom Gedaliah"
233
234 #: src/hdate_strings.c:244 src/hdate_strings.c:277
235 msgid "Yom Kippur"
236 msgstr "Yom Kippur"
237
238 #: src/hdate_strings.c:245 src/hdate_strings.c:278
239 msgid "Sukkot"
240 msgstr "Sukkot"
241
242 #: src/hdate_strings.c:246 src/hdate_strings.c:279
243 msgid "Hol hamoed Sukkot"
244 msgstr "Hol hamoed Sukkot"
245
246 #: src/hdate_strings.c:247 src/hdate_strings.c:280
247 msgid "Hoshana raba"
248 msgstr "Hoshana raba"
249
250 #: src/hdate_strings.c:248 src/hdate_strings.c:281
251 msgid "Simchat Torah"
252 msgstr "Simchat Torah"
253
254 #: src/hdate_strings.c:249 src/hdate_strings.c:282
255 msgid "Chanukah"
256 msgstr "Chanukah"
257
258 #: src/hdate_strings.c:250 src/hdate_strings.c:283
259 msgid "Asara B'Tevet"
260 msgstr "Asara B'Tevet"
261
262 #. 10
263 #: src/hdate_strings.c:251 src/hdate_strings.c:284
264 msgid "Tu B'Shvat"
265 msgstr "Tu B'Shvat"
266
267 #: src/hdate_strings.c:252 src/hdate_strings.c:285
268 msgid "Ta'anit Esther"
269 msgstr "Ta'anit Esther"
270
271 #: src/hdate_strings.c:253 src/hdate_strings.c:286
272 msgid "Purim"
273 msgstr "Purim"
274
275 #: src/hdate_strings.c:254 src/hdate_strings.c:287
276 msgid "Shushan Purim"
277 msgstr "Shushan Purim"
278
279 #: src/hdate_strings.c:255 src/hdate_strings.c:288
280 msgid "Pesach"
281 msgstr "Pesach"
282
283 #: src/hdate_strings.c:256 src/hdate_strings.c:289
284 msgid "Hol hamoed Pesach"
285 msgstr "Hol hamoed Pesach"
286
287 #: src/hdate_strings.c:257 src/hdate_strings.c:290
288 msgid "Yom HaAtzma'ut"
289 msgstr "Yom HaAtzma'ut"
290
291 #: src/hdate_strings.c:258 src/hdate_strings.c:291
292 msgid "Lag B'Omer"
293 msgstr "Lag B'Omer"
294
295 #: src/hdate_strings.c:259 src/hdate_strings.c:292
296 msgid "Erev Shavuot"
297 msgstr "Erev Shavuot"
298
299 #: src/hdate_strings.c:260 src/hdate_strings.c:293
300 msgid "Shavuot"
301 msgstr "Shavuot"
302
303 #. 20
304 #: src/hdate_strings.c:261 src/hdate_strings.c:294
305 msgid "Tzom Tammuz"
306 msgstr "Tzom Tammuz"
307
308 #: src/hdate_strings.c:262 src/hdate_strings.c:295
309 msgid "Tish'a B'Av"
310 msgstr "Tish'a B'Av"
311
312 #: src/hdate_strings.c:263 src/hdate_strings.c:296
313 msgid "Tu B'Av"
314 msgstr "Tu B'Av"
315
316 #: src/hdate_strings.c:264 src/hdate_strings.c:297
317 msgid "Yom HaShoah"
318 msgstr "Yom HaShoah"
319
320 #: src/hdate_strings.c:265 src/hdate_strings.c:298
321 msgid "Yom HaZikaron"
322 msgstr "Yom HaZikaron"
323
324 #. 25
325 #: src/hdate_strings.c:266 src/hdate_strings.c:299
326 msgid "Yom Yerushalayim"
327 msgstr "Yom Yerushalayim"
328
329 #: src/hdate_strings.c:267 src/hdate_strings.c:300
330 msgid "Shmini Atzeret"
331 msgstr "Shmini Atzeret"
332
333 #: src/hdate_strings.c:268 src/hdate_strings.c:301
334 msgid "Pesach VII"
335 msgstr "Pesach VII"
336
337 #: src/hdate_strings.c:269 src/hdate_strings.c:302
338 msgid "Pesach VIII"
339 msgstr "Pesach VIII"
340
341 #: src/hdate_strings.c:270 src/hdate_strings.c:303
342 msgid "Shavuot II"
343 msgstr "Shavuot II"
344
345 #: src/hdate_strings.c:271 src/hdate_strings.c:304
346 msgid "Sukkot II"
347 msgstr "Sukkot II"
348
349 #: src/hdate_strings.c:272 src/hdate_strings.c:305
350 msgid "Pesach II"
351 msgstr "Pesach II"
352
353 #: src/hdate_strings.c:338 src/hdate_strings.c:401
354 msgid "none"
355 msgstr "ingen"
356
357 #: src/hdate_strings.c:339 src/hdate_strings.c:402
358 msgid "Bereshit"
359 msgstr "Bereshit"
360
361 #. 1
362 #: src/hdate_strings.c:340 src/hdate_strings.c:403
363 msgid "Noach"
364 msgstr "Noach"
365
366 #: src/hdate_strings.c:341 src/hdate_strings.c:404
367 msgid "Lech-Lecha"
368 msgstr "Lech-Lecha"
369
370 #: src/hdate_strings.c:342 src/hdate_strings.c:405
371 msgid "Vayera"
372 msgstr "Vayera"
373
374 #: src/hdate_strings.c:343 src/hdate_strings.c:406
375 msgid "Chayei Sara"
376 msgstr "Chayei Sara"
377
378 #: src/hdate_strings.c:344 src/hdate_strings.c:407
379 msgid "Toldot"
380 msgstr "Toldot"
381
382 #: src/hdate_strings.c:345 src/hdate_strings.c:408
383 msgid "Vayetzei"
384 msgstr "Vayetzei"
385
386 #: src/hdate_strings.c:346 src/hdate_strings.c:409
387 msgid "Vayishlach"
388 msgstr "Vayishlach"
389
390 #: src/hdate_strings.c:347 src/hdate_strings.c:410
391 msgid "Vayeshev"
392 msgstr "Vayeshev"
393
394 #: src/hdate_strings.c:348 src/hdate_strings.c:411
395 msgid "Miketz"
396 msgstr "Miketz"
397
398 #. 10
399 #: src/hdate_strings.c:349 src/hdate_strings.c:412
400 msgid "Vayigash"
401 msgstr "Vayigash"
402
403 #: src/hdate_strings.c:350 src/hdate_strings.c:413
404 msgid "Vayechi"
405 msgstr "Vayechi"
406
407 #: src/hdate_strings.c:351 src/hdate_strings.c:414
408 msgid "Shemot"
409 msgstr "Shemot"
410
411 #: src/hdate_strings.c:352 src/hdate_strings.c:415
412 msgid "Vaera"
413 msgstr "Vaera"
414
415 #: src/hdate_strings.c:353 src/hdate_strings.c:416
416 msgid "Bo"
417 msgstr "Bo"
418
419 #: src/hdate_strings.c:354 src/hdate_strings.c:417
420 msgid "Beshalach"
421 msgstr "Beshalach"
422
423 #: src/hdate_strings.c:355 src/hdate_strings.c:418
424 msgid "Yitro"
425 msgstr "Yitro"
426
427 #: src/hdate_strings.c:356 src/hdate_strings.c:419
428 msgid "Mishpatim"
429 msgstr "Mishpatim"
430
431 #: src/hdate_strings.c:357 src/hdate_strings.c:420
432 msgid "Terumah"
433 msgstr "Terumah"
434
435 #: src/hdate_strings.c:358 src/hdate_strings.c:421
436 msgid "Tetzaveh"
437 msgstr "Tetzaveh"
438
439 #. 20
440 #: src/hdate_strings.c:359 src/hdate_strings.c:422
441 msgid "Ki Tisa"
442 msgstr "Ki Tisa"
443
444 #: src/hdate_strings.c:360 src/hdate_strings.c:423
445 msgid "Vayakhel"
446 msgstr "Vayakhel"
447
448 #: src/hdate_strings.c:361 src/hdate_strings.c:424
449 msgid "Pekudei"
450 msgstr "Pekudei"
451
452 #: src/hdate_strings.c:362 src/hdate_strings.c:425
453 msgid "Vayikra"
454 msgstr "Vayikra"
455
456 #: src/hdate_strings.c:363 src/hdate_strings.c:426
457 msgid "Tzav"
458 msgstr "Tzav"
459
460 #: src/hdate_strings.c:364 src/hdate_strings.c:427
461 msgid "Shmini"
462 msgstr "Shmini"
463
464 #: src/hdate_strings.c:365 src/hdate_strings.c:428
465 msgid "Tazria"
466 msgstr "Tazria"
467
468 #: src/hdate_strings.c:366 src/hdate_strings.c:429
469 msgid "Metzora"
470 msgstr "Metzora"
471
472 #: src/hdate_strings.c:367 src/hdate_strings.c:430
473 msgid "Achrei Mot"
474 msgstr "Achrei Mot"
475
476 #: src/hdate_strings.c:368 src/hdate_strings.c:431
477 msgid "Kedoshim"
478 msgstr "Kedoshim"
479
480 #. 30
481 #: src/hdate_strings.c:369 src/hdate_strings.c:432
482 msgid "Emor"
483 msgstr "Emor"
484
485 #: src/hdate_strings.c:370 src/hdate_strings.c:433
486 msgid "Behar"
487 msgstr "Behar"
488
489 #: src/hdate_strings.c:371 src/hdate_strings.c:434
490 msgid "Bechukotai"
491 msgstr "Bechukotai"
492
493 #: src/hdate_strings.c:372 src/hdate_strings.c:435
494 msgid "Bamidbar"
495 msgstr "Bamidbar"
496
497 #: src/hdate_strings.c:373 src/hdate_strings.c:436
498 msgid "Nasso"
499 msgstr "Nasso"
500
501 #: src/hdate_strings.c:374 src/hdate_strings.c:437
502 msgid "Beha'alotcha"
503 msgstr "Beha'alotcha"
504
505 #: src/hdate_strings.c:375 src/hdate_strings.c:438
506 msgid "Sh'lach"
507 msgstr "Sh'lach"
508
509 #: src/hdate_strings.c:376 src/hdate_strings.c:439
510 msgid "Korach"
511 msgstr "Korach"
512
513 #: src/hdate_strings.c:377 src/hdate_strings.c:440
514 msgid "Chukat"
515 msgstr "Chukat"
516
517 #: src/hdate_strings.c:378 src/hdate_strings.c:441
518 msgid "Balak"
519 msgstr "Balak"
520
521 #. 40
522 #: src/hdate_strings.c:379 src/hdate_strings.c:442
523 msgid "Pinchas"
524 msgstr "Pinchas"
525
526 #: src/hdate_strings.c:380 src/hdate_strings.c:443
527 msgid "Matot"
528 msgstr "Matot"
529
530 #: src/hdate_strings.c:381 src/hdate_strings.c:444
531 msgid "Masei"
532 msgstr "Masei"
533
534 #: src/hdate_strings.c:382 src/hdate_strings.c:445
535 msgid "Devarim"
536 msgstr "Devarim"
537
538 #: src/hdate_strings.c:383 src/hdate_strings.c:446
539 msgid "Vaetchanan"
540 msgstr "Vaetchanan"
541
542 #: src/hdate_strings.c:384 src/hdate_strings.c:447
543 msgid "Eikev"
544 msgstr "Eikev"
545
546 #: src/hdate_strings.c:385 src/hdate_strings.c:448
547 msgid "Re'eh"
548 msgstr "Re'eh"
549
550 #: src/hdate_strings.c:386 src/hdate_strings.c:449
551 msgid "Shoftim"
552 msgstr "Shoftim"
553
554 #: src/hdate_strings.c:387 src/hdate_strings.c:450
555 msgid "Ki Teitzei"
556 msgstr "Ki Teitzei"
557
558 #: src/hdate_strings.c:388 src/hdate_strings.c:451
559 msgid "Ki Tavo"
560 msgstr "Ki Tavo"
561
562 #. 50
563 #: src/hdate_strings.c:389 src/hdate_strings.c:452
564 msgid "Nitzavim"
565 msgstr "Nitzavim"
566
567 #: src/hdate_strings.c:390 src/hdate_strings.c:453
568 msgid "Vayeilech"
569 msgstr "Vayeilech"
570
571 #: src/hdate_strings.c:391 src/hdate_strings.c:454
572 msgid "Ha'Azinu"
573 msgstr "Ha'Azinu"
574
575 #: src/hdate_strings.c:392 src/hdate_strings.c:455
576 msgid "Vezot Habracha"
577 msgstr "Vezot Habracha"
578
579 #. 54
580 #: src/hdate_strings.c:393 src/hdate_strings.c:456
581 msgid "Vayakhel-Pekudei"
582 msgstr "Vayakhel-Pekudei"
583
584 #: src/hdate_strings.c:394 src/hdate_strings.c:457
585 msgid "Tazria-Metzora"
586 msgstr "Tazria-Metzora"
587
588 #: src/hdate_strings.c:395 src/hdate_strings.c:458
589 msgid "Achrei Mot-Kedoshim"
590 msgstr "Achrei Mot-Kedoshim"
591
592 #: src/hdate_strings.c:396 src/hdate_strings.c:459
593 msgid "Behar-Bechukotai"
594 msgstr "Behar-Bechukotai"
595
596 #: src/hdate_strings.c:397 src/hdate_strings.c:460
597 msgid "Chukat-Balak"
598 msgstr "Chukat-Balak"
599
600 #: src/hdate_strings.c:398 src/hdate_strings.c:461
601 msgid "Matot-Masei"
602 msgstr "Matot-Masei"
603
604 #: src/hdate_strings.c:399 src/hdate_strings.c:462
605 msgid "Nitzavim-Vayeilech"
606 msgstr "Nitzavim-Vayeilech"
607
608 #. if untranslated return null
609 #. return the translator name
610 #: src/hdate_strings.c:564 src/hdate_strings.c:568
611 msgid "translator"
612 msgstr "Daniel Nylander"
0 EXTRA_DIST = hdate.h.3 hdate_struct.3
1
2 libhdate_la_CFLAGS =\
3 -Wall\
4 -g
5
6 lib_LTLIBRARIES = libhdate.la
7
8 libhdate_la_SOURCES = \
9 hdate_strings.c\
10 hdate_julian.c\
11 hdate_holyday.c\
12 hdate_parasha.c\
13 hdate_sun_time.c\
14 hdate.h\
15 support.h
16
17 libhdate_la_LDFLAGS = -version-info $(VERSION_INFO)
18
19 libhdate_la_LIBADD =
20
21 include_HEADERS = hdate.h hdatepp.h
22
23 man_MANS = hdate.h.3 hdate_struct.3
0 # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
1
2 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
3 # This Makefile.in is free software; the Free Software Foundation
4 # gives unlimited permission to copy and/or distribute it,
5 # with or without modifications, as long as this notice is preserved.
6
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
9 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 # PARTICULAR PURPOSE.
11
12
13 SHELL = @SHELL@
14
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 VPATH = @srcdir@
18 prefix = @prefix@
19 exec_prefix = @exec_prefix@
20
21 bindir = @bindir@
22 sbindir = @sbindir@
23 libexecdir = @libexecdir@
24 datadir = @datadir@
25 sysconfdir = @sysconfdir@
26 sharedstatedir = @sharedstatedir@
27 localstatedir = @localstatedir@
28 libdir = @libdir@
29 infodir = @infodir@
30 mandir = @mandir@
31 includedir = @includedir@
32 oldincludedir = /usr/include
33
34 DESTDIR =
35
36 pkgdatadir = $(datadir)/@PACKAGE@
37 pkglibdir = $(libdir)/@PACKAGE@
38 pkgincludedir = $(includedir)/@PACKAGE@
39
40 top_builddir = ..
41
42 ACLOCAL = @ACLOCAL@
43 AUTOCONF = @AUTOCONF@
44 AUTOMAKE = @AUTOMAKE@
45 AUTOHEADER = @AUTOHEADER@
46
47 INSTALL = @INSTALL@
48 INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
49 INSTALL_DATA = @INSTALL_DATA@
50 INSTALL_SCRIPT = @INSTALL_SCRIPT@
51 transform = @program_transform_name@
52
53 NORMAL_INSTALL = :
54 PRE_INSTALL = :
55 POST_INSTALL = :
56 NORMAL_UNINSTALL = :
57 PRE_UNINSTALL = :
58 POST_UNINSTALL = :
59 host_alias = @host_alias@
60 host_triplet = @host@
61 AR = @AR@
62 AS = @AS@
63 BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
64 CATOBJEXT = @CATOBJEXT@
65 CC = @CC@
66 CFLAGS = @CFLAGS@
67 CXX = @CXX@
68 CXXCPP = @CXXCPP@
69 DATADIRNAME = @DATADIRNAME@
70 DLLTOOL = @DLLTOOL@
71 ECHO = @ECHO@
72 EGREP = @EGREP@
73 EXEEXT = @EXEEXT@
74 F77 = @F77@
75 GCJ = @GCJ@
76 GCJFLAGS = @GCJFLAGS@
77 GENCAT = @GENCAT@
78 GLIBC2 = @GLIBC2@
79 GLIBC21 = @GLIBC21@
80 GMSGFMT = @GMSGFMT@
81 HAVE_ASPRINTF = @HAVE_ASPRINTF@
82 HAVE_LIB = @HAVE_LIB@
83 HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
84 HAVE_SNPRINTF = @HAVE_SNPRINTF@
85 HAVE_WPRINTF = @HAVE_WPRINTF@
86 INSTOBJEXT = @INSTOBJEXT@
87 INTLBISON = @INTLBISON@
88 INTLLIBS = @INTLLIBS@
89 INTLOBJS = @INTLOBJS@
90 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
91 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
92 LIB = @LIB@
93 LIBICONV = @LIBICONV@
94 LIBINTL = @LIBINTL@
95 LIBS = @LIBS@
96 LIBTOOL = @LIBTOOL@
97 LN_S = @LN_S@
98 LTLIB = @LTLIB@
99 LTLIBICONV = @LTLIBICONV@
100 LTLIBINTL = @LTLIBINTL@
101 MAINT = @MAINT@
102 MAKEINFO = @MAKEINFO@
103 MKINSTALLDIRS = @MKINSTALLDIRS@
104 OBJDUMP = @OBJDUMP@
105 OBJEXT = @OBJEXT@
106 PACKAGE = @PACKAGE@
107 PA_MODULES_PATH = @PA_MODULES_PATH@
108 PA_VERSION = @PA_VERSION@
109 PE_CFLAGS = @PE_CFLAGS@
110 PE_MODULES_PATH = @PE_MODULES_PATH@
111 PKG_CONFIG = @PKG_CONFIG@
112 POSUB = @POSUB@
113 PY_CFLAGS = @PY_CFLAGS@
114 PY_MODULES_PATH = @PY_MODULES_PATH@
115 PY_VERSION = @PY_VERSION@
116 RANLIB = @RANLIB@
117 RC = @RC@
118 STRIP = @STRIP@
119 USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
120 USE_NLS = @USE_NLS@
121 VERSION = @VERSION@
122 VERSION_INFO = @VERSION_INFO@
123 have_pascal = @have_pascal@
124 have_perl = @have_perl@
125 have_python = @have_python@
126 have_swig = @have_swig@
127
128 EXTRA_DIST = hdate.h.3 hdate_struct.3
129
130 libhdate_la_CFLAGS = -Wall -g
131
132
133 lib_LTLIBRARIES = libhdate.la
134
135 libhdate_la_SOURCES = hdate_strings.c hdate_julian.c hdate_holyday.c hdate_parasha.c hdate_sun_time.c hdate.h support.h
136
137
138 libhdate_la_LDFLAGS = -version-info $(VERSION_INFO)
139
140 libhdate_la_LIBADD =
141
142 include_HEADERS = hdate.h hdatepp.h
143
144 man_MANS = hdate.h.3 hdate_struct.3
145 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
146 CONFIG_CLEAN_FILES =
147 LTLIBRARIES = $(lib_LTLIBRARIES)
148
149
150 DEFS = @DEFS@ -I. -I$(srcdir)
151 CPPFLAGS = @CPPFLAGS@
152 LDFLAGS = @LDFLAGS@
153 libhdate_la_DEPENDENCIES =
154 libhdate_la_OBJECTS = hdate_strings.lo hdate_julian.lo hdate_holyday.lo \
155 hdate_parasha.lo hdate_sun_time.lo
156 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
157 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
158 CCLD = $(CC)
159 LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
160 man3dir = $(mandir)/man3
161 MANS = $(man_MANS)
162
163 NROFF = nroff
164 HEADERS = $(include_HEADERS)
165
166 DIST_COMMON = Makefile.am Makefile.in
167
168
169 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
170
171 TAR = tar
172 GZIP_ENV = --best
173 SOURCES = $(libhdate_la_SOURCES)
174 OBJECTS = $(libhdate_la_OBJECTS)
175
176 all: all-redirect
177 .SUFFIXES:
178 .SUFFIXES: .S .c .lo .o .obj .s
179 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
180 cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/Makefile
181
182 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
183 cd $(top_builddir) \
184 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
185
186
187 mostlyclean-libLTLIBRARIES:
188
189 clean-libLTLIBRARIES:
190 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
191
192 distclean-libLTLIBRARIES:
193
194 maintainer-clean-libLTLIBRARIES:
195
196 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
197 @$(NORMAL_INSTALL)
198 $(mkinstalldirs) $(DESTDIR)$(libdir)
199 @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
200 if test -f $$p; then \
201 echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
202 $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
203 else :; fi; \
204 done
205
206 uninstall-libLTLIBRARIES:
207 @$(NORMAL_UNINSTALL)
208 list='$(lib_LTLIBRARIES)'; for p in $$list; do \
209 $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
210 done
211
212 .c.o:
213 $(COMPILE) -c $<
214
215 # FIXME: We should only use cygpath when building on Windows,
216 # and only if it is available.
217 .c.obj:
218 $(COMPILE) -c `cygpath -w $<`
219
220 .s.o:
221 $(COMPILE) -c $<
222
223 .S.o:
224 $(COMPILE) -c $<
225
226 mostlyclean-compile:
227 -rm -f *.o core *.core
228 -rm -f *.$(OBJEXT)
229
230 clean-compile:
231
232 distclean-compile:
233 -rm -f *.tab.c
234
235 maintainer-clean-compile:
236
237 .c.lo:
238 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
239
240 .s.lo:
241 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
242
243 .S.lo:
244 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
245
246 mostlyclean-libtool:
247 -rm -f *.lo
248
249 clean-libtool:
250 -rm -rf .libs _libs
251
252 distclean-libtool:
253
254 maintainer-clean-libtool:
255
256 libhdate.la: $(libhdate_la_OBJECTS) $(libhdate_la_DEPENDENCIES)
257 $(LINK) -rpath $(libdir) $(libhdate_la_LDFLAGS) $(libhdate_la_OBJECTS) $(libhdate_la_LIBADD) $(LIBS)
258
259 install-man3:
260 $(mkinstalldirs) $(DESTDIR)$(man3dir)
261 @list='$(man3_MANS)'; \
262 l2='$(man_MANS)'; for i in $$l2; do \
263 case "$$i" in \
264 *.3*) list="$$list $$i" ;; \
265 esac; \
266 done; \
267 for i in $$list; do \
268 if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
269 else file=$$i; fi; \
270 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
271 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
272 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
273 echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man3dir)/$$inst"; \
274 $(INSTALL_DATA) $$file $(DESTDIR)$(man3dir)/$$inst; \
275 done
276
277 uninstall-man3:
278 @list='$(man3_MANS)'; \
279 l2='$(man_MANS)'; for i in $$l2; do \
280 case "$$i" in \
281 *.3*) list="$$list $$i" ;; \
282 esac; \
283 done; \
284 for i in $$list; do \
285 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
286 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
287 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
288 echo " rm -f $(DESTDIR)$(man3dir)/$$inst"; \
289 rm -f $(DESTDIR)$(man3dir)/$$inst; \
290 done
291 install-man: $(MANS)
292 @$(NORMAL_INSTALL)
293 $(MAKE) $(AM_MAKEFLAGS) install-man3
294 uninstall-man:
295 @$(NORMAL_UNINSTALL)
296 $(MAKE) $(AM_MAKEFLAGS) uninstall-man3
297
298 install-includeHEADERS: $(include_HEADERS)
299 @$(NORMAL_INSTALL)
300 $(mkinstalldirs) $(DESTDIR)$(includedir)
301 @list='$(include_HEADERS)'; for p in $$list; do \
302 if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
303 echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \
304 $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \
305 done
306
307 uninstall-includeHEADERS:
308 @$(NORMAL_UNINSTALL)
309 list='$(include_HEADERS)'; for p in $$list; do \
310 rm -f $(DESTDIR)$(includedir)/$$p; \
311 done
312
313 tags: TAGS
314
315 ID: $(HEADERS) $(SOURCES) $(LISP)
316 list='$(SOURCES) $(HEADERS)'; \
317 unique=`for i in $$list; do echo $$i; done | \
318 awk ' { files[$$0] = 1; } \
319 END { for (i in files) print i; }'`; \
320 here=`pwd` && cd $(srcdir) \
321 && mkid -f$$here/ID $$unique $(LISP)
322
323 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
324 tags=; \
325 here=`pwd`; \
326 list='$(SOURCES) $(HEADERS)'; \
327 unique=`for i in $$list; do echo $$i; done | \
328 awk ' { files[$$0] = 1; } \
329 END { for (i in files) print i; }'`; \
330 test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
331 || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
332
333 mostlyclean-tags:
334
335 clean-tags:
336
337 distclean-tags:
338 -rm -f TAGS ID
339
340 maintainer-clean-tags:
341
342 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
343
344 subdir = src
345
346 distdir: $(DISTFILES)
347 @for file in $(DISTFILES); do \
348 d=$(srcdir); \
349 if test -d $$d/$$file; then \
350 cp -pr $$d/$$file $(distdir)/$$file; \
351 else \
352 test -f $(distdir)/$$file \
353 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
354 || cp -p $$d/$$file $(distdir)/$$file || :; \
355 fi; \
356 done
357 hdate_holyday.lo hdate_holyday.o : hdate_holyday.c hdate.h support.h
358 hdate_julian.lo hdate_julian.o : hdate_julian.c hdate.h support.h
359 hdate_parasha.lo hdate_parasha.o : hdate_parasha.c hdate.h support.h
360 hdate_strings.lo hdate_strings.o : hdate_strings.c hdate.h support.h
361 hdate_sun_time.lo hdate_sun_time.o : hdate_sun_time.c hdate.h support.h
362
363 info-am:
364 info: info-am
365 dvi-am:
366 dvi: dvi-am
367 check-am: all-am
368 check: check-am
369 installcheck-am:
370 installcheck: installcheck-am
371 install-exec-am: install-libLTLIBRARIES
372 install-exec: install-exec-am
373
374 install-data-am: install-man install-includeHEADERS
375 install-data: install-data-am
376
377 install-am: all-am
378 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
379 install: install-am
380 uninstall-am: uninstall-libLTLIBRARIES uninstall-man \
381 uninstall-includeHEADERS
382 uninstall: uninstall-am
383 all-am: Makefile $(LTLIBRARIES) $(MANS) $(HEADERS)
384 all-redirect: all-am
385 install-strip:
386 $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
387 installdirs:
388 $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(mandir)/man3 \
389 $(DESTDIR)$(includedir)
390
391
392 mostlyclean-generic:
393
394 clean-generic:
395
396 distclean-generic:
397 -rm -f Makefile $(CONFIG_CLEAN_FILES)
398 -rm -f config.cache config.log stamp-h stamp-h[0-9]*
399
400 maintainer-clean-generic:
401 mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \
402 mostlyclean-libtool mostlyclean-tags \
403 mostlyclean-generic
404
405 mostlyclean: mostlyclean-am
406
407 clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \
408 clean-generic mostlyclean-am
409
410 clean: clean-am
411
412 distclean-am: distclean-libLTLIBRARIES distclean-compile \
413 distclean-libtool distclean-tags distclean-generic \
414 clean-am
415 -rm -f libtool
416
417 distclean: distclean-am
418
419 maintainer-clean-am: maintainer-clean-libLTLIBRARIES \
420 maintainer-clean-compile maintainer-clean-libtool \
421 maintainer-clean-tags maintainer-clean-generic \
422 distclean-am
423 @echo "This command is intended for maintainers to use;"
424 @echo "it deletes files that may require special tools to rebuild."
425
426 maintainer-clean: maintainer-clean-am
427
428 .PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
429 clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
430 uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
431 distclean-compile clean-compile maintainer-clean-compile \
432 mostlyclean-libtool distclean-libtool clean-libtool \
433 maintainer-clean-libtool install-man3 uninstall-man3 install-man \
434 uninstall-man uninstall-includeHEADERS install-includeHEADERS tags \
435 mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
436 distdir info-am info dvi-am dvi check check-am installcheck-am \
437 installcheck install-exec-am install-exec install-data-am install-data \
438 install-am install uninstall-am uninstall all-redirect all-am all \
439 installdirs mostlyclean-generic distclean-generic clean-generic \
440 maintainer-clean-generic clean mostlyclean distclean maintainer-clean
441
442
443 # Tell versions [3.59,3.63) of GNU make to not export all variables.
444 # Otherwise a system limit (for SysV at least) may be exceeded.
445 .NOEXPORT:
0 /* libhdate
1 * Copyright 2004-2005 Yaacov Zamir <kzamir@walla.co.il>
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Library General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16 */
17
18 /*
19 * See Amos Shapir hdate_README file attached for
20 * Copyright notice for functions based on Amos's code
21 */
22
23 #ifndef __HDATE_H__
24 #define __HDATE_H__
25
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30
31 /** @def HDATA_DIASPORA_FLAG
32 @brief use diaspora dates and holydays flag
33 */
34 #define HDATA_DIASPORA_FLAG -1
35
36 /** @def HDATA_ISRAEL_FLAG
37 @brief use israel dates and holydays flag
38 */
39 #define HDATA_ISRAEL_FLAG 0
40
41 /** @def HDATA_SHORT_FLAG
42 @brief use short strings flag
43 */
44 #define HDATA_SHORT_FLAG -1
45
46 /** @def HDATA_LONG_FLAG
47 @brief use long strings flag
48 */
49 #define HDATA_LONG_FLAG 0
50
51 /** Base structore for hebrew dates
52
53 */
54 typedef struct
55 {
56 /** The number of day in the hebrew month (1..31). */
57 int hd_day;
58 /** The number of the hebrew month 1..14 (1 - tishre, 13 - adar 1, 14 - adar 2). */
59 int hd_mon;
60 /** The number of the hebrew year. */
61 int hd_year;
62 /** The number of the day in the month. (1..31) */
63 int gd_day;
64 /** The number of the month 1..12 (1 - jan). */
65 int gd_mon;
66 /** The number of the year. */
67 int gd_year;
68 /** The day of the week 1..7 (1 - sunday). */
69 int hd_dw;
70 /** The length of the year in days. */
71 int hd_size_of_year;
72 /** The week day of Hebrew new year. */
73 int hd_new_year_dw;
74 /** The number type of year. */
75 int hd_year_type;
76 /** The Julian day number */
77 int hd_jd;
78 /** The number of days passed since 1 tishrey */
79 int hd_days;
80 /** The number of weeks passed since 1 tishrey */
81 int hd_weeks;
82 } hdate_struct;
83
84 /*************************************************************/
85 /*************************************************************/
86
87 /**
88 @brief compute date structure from the Gregorian date
89
90 @param h pointer this hdate struct.
91 @param d Day of month 1..31
92 @param m Month 1..12
93 if m or d is 0 return current date.
94 @param y Year in 4 digits e.g. 2001
95 @return pointer to this hdate struct
96 */
97 hdate_struct *
98 hdate_set_gdate (hdate_struct *h, int d, int m, int y);
99
100 /**
101 @brief compute date structure from the Hebrew date
102
103 @param h pointer this hdate struct.
104 @param d Day of month 1..31
105 @param m Month 1..14 ,(13 - Adar 1, 14 - Adar 2)
106 if m or d is 0 return current date.
107 @param y Year in 4 digits e.g. 5731
108 @return pointer to this hdate struct
109 */
110 hdate_struct *
111 hdate_set_hdate (hdate_struct *h, int d, int m, int y);
112
113 /**
114 @brief compute date structure from the Julian day
115
116 @param h pointer this hdate struct.
117 @param jd the julian day number.
118 @return pointer to this hdate struct
119 */
120 hdate_struct *
121 hdate_set_jd (hdate_struct *h, int jd);
122
123 /*************************************************************/
124 /*************************************************************/
125
126 /**
127 @brief get formated hebrew date.
128
129 return the short ( e.g. "1 Tishrey" ) or
130 long (e.g. "Tuesday 18 Tishrey 5763 Hol hamoed Sukot" ) formated date.
131
132 @param h pointer this hdate struct.
133 @param diaspora if true give diaspora holydays.
134 @param s short flag.
135 @return a static string of foramted date
136 */
137 char *
138 hdate_get_format_date (hdate_struct const * h, int diaspora, int s);
139
140 /**
141 @brief get the number of hebrew parasha.
142
143 @param h pointer this hdate struct.
144 @param diaspora if true give diaspora readings
145 @return the number of parasha 1. Bereshit etc..
146 (55 trow 61 are joined strings e.g. Vayakhel Pekudei)
147 */
148 int
149 hdate_get_parasha (hdate_struct const * h, int diaspora);
150
151 /**
152 @brief get the number of hebrew holyday.
153
154 @param h pointer this hdate struct.
155 @param diaspora if true give diaspora holydays
156 @return the number of holyday.
157 */
158 int
159 hdate_get_holyday (hdate_struct const * h, int diaspora);
160
161 /*************************************************************/
162 /*************************************************************/
163
164 /**
165 @brief convert an integer to hebrew string.
166
167 @param n The int to convert
168 @return a static string of the hebrew number UTF-8 (logical)
169 @attention ( 0 < n < 10000)
170 */
171 char *
172 hdate_get_int_string (int n);
173
174 /**
175 @brief get name of week day.
176
177 @param day The number of the day 1..7 (1 - sun).
178 @param s short flag
179 true - returns a short string: sun, false returns: sunday.
180 @return a static string of the day of the week
181 */
182 char *
183 hdate_get_day_string (int day, int s);
184
185 /**
186 @brief name of month.
187
188 @param month the number of the month 1..12 (1 - jan).
189 @param s short flag.
190 @return a static string of month name
191 */
192 char *
193 hdate_get_month_string (int month, int s);
194
195 /**
196 @brief name of hebrew month.
197
198 @param month the number of the month 1..14
199 (1 - tishre, 13 - adar 1, 14 - adar 2).
200 @param s short flag.
201 @return a static string of month name
202 */
203 char *
204 hdate_get_hebrew_month_string (int month, int s);
205
206 /**
207 @brief name of hebrew holyday.
208
209 @param holyday the holyday number.
210 @param s short flag.
211 @return a static string of holyday name
212 */
213 char *
214 hdate_get_holyday_string (int holyday, int s);
215
216 /**
217 @brief name of parasha
218
219 @param parasha the number of parasha 1-Bereshit
220 (55 trow 61 are joined strings e.g. Vayakhel Pekudei)
221 @param s short flag.
222 @return a static string of parasha name
223 */
224 char *
225 hdate_get_parasha_string (int parasha, int s);
226
227 /*************************************************************/
228 /*************************************************************/
229
230 /**
231 @brief get the hebrew holyday type.
232
233 @param holyday the holyday number.
234 @return the number of holyday type.
235 */
236 int
237 hdate_get_holyday_type (int holyday);
238
239 /**
240 @brief size of hebrew year in days.
241
242 @param hebrew_year the hebrew year.
243 @return size of Hebrew year
244 */
245 int
246 hdate_get_size_of_hebrew_year (int hebrew_year);
247
248 /*************************************************************/
249 /*************************************************************/
250
251 /**
252 @brief Days since Tishrey 3744
253
254 @author Amos Shapir 1984 (rev. 1985, 1992) Yaacov Zamir 2003-2005
255
256 @param hebrew_year The Hebrew year
257 @return Number of days since 3,1,3744
258 */
259 int
260 hdate_days_from_3744 (int hebrew_year);
261
262 /**
263 @brief Return Hebrew year type based on size and first week day of year.
264
265 @param size_of_year Length of year in days
266 @param new_year_dw First week day of year
267 @return the number for year type (1..14)
268 */
269 int
270 hdate_get_year_type (int size_of_year, int new_year_dw);
271
272 /**
273 @brief Compute Julian day from Gregorian date
274
275 @author Yaacov Zamir (algorithm from Henry F. Fliegel and Thomas C. Van Flandern ,1968)
276
277 @param day Day of month 1..31
278 @param month Month 1..12
279 @param year Year in 4 digits e.g. 2001
280 @return the julian day number
281 */
282 int
283 hdate_gdate_to_jd (int day, int month, int year);
284
285 /**
286 @brief Compute Julian day from Hebrew day, month and year
287
288 @author Amos Shapir 1984 (rev. 1985, 1992) Yaacov Zamir 2003-2005
289
290 @param day Day of month 1..31
291 @param month Month 1..14 (13 - Adar 1, 14 - Adar 2)
292 @param year Hebrew year in 4 digits e.g. 5753
293 @param jd_tishrey1 return the julian number of 1 Tishrey this year
294 @param jd_tishrey1_next_year return the julian number of 1 Tishrey next year
295 @return the julian day number
296 */
297 int
298 hdate_hdate_to_jd (int day, int month, int year, int *jd_tishrey1, int *jd_tishrey1_next_year);
299
300 /**
301 @brief Converting from the Julian day to the Gregorian date
302
303 @author Yaacov Zamir (Algorithm, Henry F. Fliegel and Thomas C. Van Flandern ,1968)
304
305 @param jd Julian day
306 @param day return Day of month 1..31
307 @param month return Month 1..12
308 @param year return Year in 4 digits e.g. 2001
309 */
310 void
311 hdate_jd_to_gdate (int jd, int *day, int *month, int *year);
312
313 /**
314 @brief Converting from the Julian day to the Hebrew day
315
316 @author Yaacov Zamir 2005
317
318 @param jd Julian day
319 @param day return Day of month 1..31
320 @param month return Month 1..14 (13 - Adar 1, 14 - Adar 2)
321 @param year return Year in 4 digits e.g. 2001
322 @param jd_tishrey1 return the julian number of 1 Tishrey this year
323 @param jd_tishrey1_next_year return the julian number of 1 Tishrey next year
324 */
325 void
326 hdate_jd_to_hdate (int jd, int *day, int *month, int *year, int *jd_tishrey1, int *jd_tishrey1_next_year);
327
328 /*************************************************************/
329 /*************************************************************/
330
331 /**
332 @brief days from 1 january
333
334 @param day this day of month
335 @param month this month
336 @param year this year
337 @return the days from 1 jan
338 */
339 int
340 hdate_get_day_of_year (int day, int month, int year);
341
342 /**
343 @brief utc sun times for altitude at a gregorian date
344
345 @parm day this day of month
346 @parm month this month
347 @parm year this year
348 @parm longitude longitude to use in calculations
349 @parm latitude latitude to use in calculations
350 @parm deg degrees of sun's altitude (0 - Zenith .. 90 - Horizon)
351 @parm sunrise return the utc sunrise in minutes
352 @parm sunset return the utc sunset in minutes
353 */
354 void
355 hdate_get_utc_sun_time_deg (int day, int month, int year,
356 double latitude, double longitude, double deg, int *sunrise, int *sunset);
357
358 /**
359 @brief utc sunrise/set time for a gregorian date
360
361 @param day this day of month
362 @param month this month
363 @param year this year
364 @param longitude longitude to use in calculations
365 degrees, negative values are east
366 @param latitude latitude to use in calculations
367 degrees, negative values are south
368 @param sunrise return the utc sunrise in minutes after midnight (00:00)
369 @param sunset return the utc sunset in minutes after midnight (00:00)
370 */
371 void
372 hdate_get_utc_sun_time (int day, int month, int year,
373 double latitude, double longitude, int *sunrise, int *sunset);
374
375 /**
376 @brief utc sunrise/set time for a gregorian date
377
378 @parm day this day of month
379 @parm month this month
380 @parm year this year
381 @parm longitude longitude to use in calculations
382 @parm latitude latitude to use in calculations
383 @parm sun_hour return the length of shaa zaminit in minutes
384 @parm first_light return the utc alut ha-shachar in minutes
385 @parm talit return the utc tphilin and talit in minutes
386 @parm sunrise return the utc sunrise in minutes
387 @parm midday return the utc midday in minutes
388 @parm sunset return the utc sunset in minutes
389 @parm first_stars return the utc tzeit hacochavim in minutes
390 @parm three_stars return the utc shlosha cochavim in minutes
391 */
392 void
393 hdate_get_utc_sun_time_full (int day, int month, int year, double latitude, double longitude,
394 int *sun_hour, int *first_light, int *talit, int *sunrise,
395 int *midday, int *sunset, int *first_stars, int *three_stars);
396
397 /*************************************************************/
398 /*************************************************************/
399
400 /**
401 @brief get the Gregorian day of the month
402
403 @param h pointer this hdate struct.
404 @return the Gregorian day of the month, 1..31.
405 */
406 int
407 hdate_get_gday (hdate_struct const * h);
408
409 /**
410 @brief get the Gregorian month
411
412 @param h pointer this hdate struct.
413 @return the Gregorian month, jan = 1.
414 */
415 int
416 hdate_get_gmonth (hdate_struct const * h);
417
418 /**
419 @brief get the Gregorian year
420
421 @param h pointer this hdate struct.
422 @return the Gregorian year.
423 */
424 int
425 hdate_get_gyear (hdate_struct const * h);
426
427 /**
428 @brief get the Hebrew day of the month
429
430 @param h pointer this hdate struct.
431 @return the Hebrew day of the month, 1..30.
432 */
433 int
434 hdate_get_hday (hdate_struct const * h);
435
436 /**
437 @brief get the Hebrew month
438
439 @param h pointer this hdate struct.
440 @return the Hebrew month, Tishery = 1 .. Adar I =13, Adar II = 14.
441 */
442 int
443 hdate_get_hmonth (hdate_struct const * h);
444
445 /**
446 @brief get the Hebrew year
447
448 @param h pointer this hdate struct.
449 @return the Hebrew year.
450 */
451 int
452 hdate_get_hyear (hdate_struct const * h);
453
454 /**
455 @brief get the day of the week
456
457 @param h pointer this hdate struct.
458 @return the the day of the week.
459 */
460 int
461 hdate_get_day_of_the_week (hdate_struct const * h);
462
463 /**
464 @brief get the size of the hebrew year
465
466 @param h pointer this hdate struct.
467 @return the the size of the hebrew year.
468 */
469 int
470 hdate_get_size_of_year (hdate_struct const * h);
471
472 /**
473 @brief get the new year day of the week
474
475 @param h pointer this hdate struct.
476 @return the the new year day of the week.
477 */
478 int
479 hdate_get_new_year_day_of_the_week (hdate_struct const * h);
480
481 /**
482 @brief get the Julian day number
483
484 @param h pointer this hdate struct.
485 @return the Julian day number.
486 */
487 int
488 hdate_get_julian (hdate_struct const * h);
489
490 /**
491 @brief get the number of days passed since 1 tishrey
492
493 @param h pointer this hdate struct.
494 @return the number of days passed since 1 tishrey.
495 */
496 int
497 hdate_get_days (hdate_struct const * h);
498
499 /**
500 @brief get the number of weeks passed since 1 tishrey
501
502 @param h pointer this hdate struct.
503 @return the number of weeks passed since 1 tishrey.
504 */
505 int
506 hdate_get_weeks (hdate_struct const * h);
507
508 /*************************************************************/
509 /*************************************************************/
510
511 /**
512 @brief creat a new hdate struct object, must be deleted using delete_hdate.
513
514 @return a new hdate object
515 */
516 hdate_struct *
517 new_hdate ();
518
519 /**
520 @brief delete an hdate struct object.
521
522 @param h pointer this hdate struct.
523 */
524 hdate_struct *
525 delete_hdate (hdate_struct *h);
526
527 /*************************************************************/
528 /*************************************************************/
529
530 /**
531 @brief Return a static string, with the package name and version
532
533 @return a static string, with the package name and version
534 */
535 char *
536 hdate_get_version_string ();
537
538 /**
539 @brief name of translator
540
541 @return a static string with name of translator, or NULL if none.
542 */
543 char *
544 hdate_get_translator_string ();
545
546 #ifdef __cplusplus
547 }
548 #endif
549
550 #endif
0 .TH "src/hdate.h" 3 "11 Nov 2005" "Version 1.4" "libhdate C language" \" -*- nroff -*-
1 .ad l
2 .nh
3 .SH NAME
4 src/hdate.h \-
5 .SH SYNOPSIS
6 .br
7 .PP
8 .SS "Data Structures"
9
10 .in +1c
11 .ti -1c
12 .RI "struct \fBhdate_struct\fP"
13 .br
14 .in -1c
15 .SS "Defines"
16
17 .in +1c
18 .ti -1c
19 .RI "#define \fBHDATA_DIASPORA_FLAG\fP -1"
20 .br
21 .RI "\fIuse diaspora dates and holydays flag \fP"
22 .ti -1c
23 .RI "#define \fBHDATA_ISRAEL_FLAG\fP 0"
24 .br
25 .RI "\fIuse israel dates and holydays flag \fP"
26 .ti -1c
27 .RI "#define \fBHDATA_SHORT_FLAG\fP -1"
28 .br
29 .RI "\fIuse short strings flag \fP"
30 .ti -1c
31 .RI "#define \fBHDATA_LONG_FLAG\fP 0"
32 .br
33 .RI "\fIuse long strings flag \fP"
34 .in -1c
35 .SS "Functions"
36
37 .in +1c
38 .ti -1c
39 .RI "\fBhdate_struct\fP * \fBhdate_set_gdate\fP (\fBhdate_struct\fP *h, int d, int m, int y)"
40 .br
41 .RI "\fIcompute date structure from the Gregorian date \fP"
42 .ti -1c
43 .RI "\fBhdate_struct\fP * \fBhdate_set_hdate\fP (\fBhdate_struct\fP *h, int d, int m, int y)"
44 .br
45 .RI "\fIcompute date structure from the Hebrew date \fP"
46 .ti -1c
47 .RI "\fBhdate_struct\fP * \fBhdate_set_jd\fP (\fBhdate_struct\fP *h, int jd)"
48 .br
49 .RI "\fIcompute date structure from the Julian day \fP"
50 .ti -1c
51 .RI "char * \fBhdate_get_format_date\fP (\fBhdate_struct\fP const *h, int diaspora, int s)"
52 .br
53 .RI "\fIget formated hebrew date. \fP"
54 .ti -1c
55 .RI "int \fBhdate_get_parasha\fP (\fBhdate_struct\fP const *h, int diaspora)"
56 .br
57 .RI "\fIget the number of hebrew parasha. \fP"
58 .ti -1c
59 .RI "int \fBhdate_get_holyday\fP (\fBhdate_struct\fP const *h, int diaspora)"
60 .br
61 .RI "\fIget the number of hebrew holyday. \fP"
62 .ti -1c
63 .RI "char * \fBhdate_get_int_string\fP (int n)"
64 .br
65 .RI "\fIconvert an integer to hebrew string. \fP"
66 .ti -1c
67 .RI "char * \fBhdate_get_day_string\fP (int day, int s)"
68 .br
69 .RI "\fIget name of week day. \fP"
70 .ti -1c
71 .RI "char * \fBhdate_get_month_string\fP (int month, int s)"
72 .br
73 .RI "\fIname of month. \fP"
74 .ti -1c
75 .RI "char * \fBhdate_get_hebrew_month_string\fP (int month, int s)"
76 .br
77 .RI "\fIname of hebrew month. \fP"
78 .ti -1c
79 .RI "char * \fBhdate_get_holyday_string\fP (int holyday, int s)"
80 .br
81 .RI "\fIname of hebrew holyday. \fP"
82 .ti -1c
83 .RI "char * \fBhdate_get_parasha_string\fP (int parasha, int s)"
84 .br
85 .RI "\fIname of parasha \fP"
86 .ti -1c
87 .RI "int \fBhdate_get_holyday_type\fP (int holyday)"
88 .br
89 .RI "\fIget the hebrew holyday type. \fP"
90 .ti -1c
91 .RI "int \fBhdate_get_size_of_hebrew_year\fP (int hebrew_year)"
92 .br
93 .RI "\fIsize of hebrew year in days. \fP"
94 .ti -1c
95 .RI "int \fBhdate_days_from_3744\fP (int hebrew_year)"
96 .br
97 .RI "\fIDays since Tishrey 3744. \fP"
98 .ti -1c
99 .RI "int \fBhdate_get_year_type\fP (int size_of_year, int new_year_dw)"
100 .br
101 .RI "\fIReturn Hebrew year type based on size and first week day of year. \fP"
102 .ti -1c
103 .RI "int \fBhdate_gdate_to_jd\fP (int day, int month, int year)"
104 .br
105 .RI "\fICompute Julian day from Gregorian date. \fP"
106 .ti -1c
107 .RI "int \fBhdate_hdate_to_jd\fP (int day, int month, int year, int *jd_tishrey1, int *jd_tishrey1_next_year)"
108 .br
109 .RI "\fICompute Julian day from Hebrew day, month and year. \fP"
110 .ti -1c
111 .RI "void \fBhdate_jd_to_gdate\fP (int jd, int *day, int *month, int *year)"
112 .br
113 .RI "\fIConverting from the Julian day to the Gregorian date. \fP"
114 .ti -1c
115 .RI "void \fBhdate_jd_to_hdate\fP (int jd, int *day, int *month, int *year, int *jd_tishrey1, int *jd_tishrey1_next_year)"
116 .br
117 .RI "\fIConverting from the Julian day to the Hebrew day. \fP"
118 .ti -1c
119 .RI "int \fBhdate_get_day_of_year\fP (int day, int month, int year)"
120 .br
121 .RI "\fIdays from 1 january \fP"
122 .ti -1c
123 .RI "void \fBhdate_get_utc_sun_time\fP (int day, int month, int year, double latitude, double longitude, int *sunrise, int *sunset)"
124 .br
125 .RI "\fIutc sunrise/set time for a gregorian date \fP"
126 .ti -1c
127 .RI "int \fBhdate_get_gday\fP (\fBhdate_struct\fP const *h)"
128 .br
129 .RI "\fIget the Gregorian day of the month \fP"
130 .ti -1c
131 .RI "int \fBhdate_get_gmonth\fP (\fBhdate_struct\fP const *h)"
132 .br
133 .RI "\fIget the Gregorian month \fP"
134 .ti -1c
135 .RI "int \fBhdate_get_gyear\fP (\fBhdate_struct\fP const *h)"
136 .br
137 .RI "\fIget the Gregorian year \fP"
138 .ti -1c
139 .RI "int \fBhdate_get_hday\fP (\fBhdate_struct\fP const *h)"
140 .br
141 .RI "\fIget the Hebrew day of the month \fP"
142 .ti -1c
143 .RI "int \fBhdate_get_hmonth\fP (\fBhdate_struct\fP const *h)"
144 .br
145 .RI "\fIget the Hebrew month \fP"
146 .ti -1c
147 .RI "int \fBhdate_get_hyear\fP (\fBhdate_struct\fP const *h)"
148 .br
149 .RI "\fIget the Hebrew year \fP"
150 .ti -1c
151 .RI "int \fBhdate_get_day_of_the_week\fP (\fBhdate_struct\fP const *h)"
152 .br
153 .RI "\fIget the day of the week \fP"
154 .ti -1c
155 .RI "int \fBhdate_get_size_of_year\fP (\fBhdate_struct\fP const *h)"
156 .br
157 .RI "\fIget the size of the hebrew year \fP"
158 .ti -1c
159 .RI "int \fBhdate_get_new_year_day_of_the_week\fP (\fBhdate_struct\fP const *h)"
160 .br
161 .RI "\fIget the new year day of the week \fP"
162 .ti -1c
163 .RI "int \fBhdate_get_julian\fP (\fBhdate_struct\fP const *h)"
164 .br
165 .RI "\fIget the Julian day number \fP"
166 .ti -1c
167 .RI "int \fBhdate_get_days\fP (\fBhdate_struct\fP const *h)"
168 .br
169 .RI "\fIget the number of days passed since 1 tishrey \fP"
170 .ti -1c
171 .RI "int \fBhdate_get_weeks\fP (\fBhdate_struct\fP const *h)"
172 .br
173 .RI "\fIget the number of weeks passed since 1 tishrey \fP"
174 .ti -1c
175 .RI "\fBhdate_struct\fP * \fBnew_hdate\fP ()"
176 .br
177 .RI "\fIcreat a new hdate struct object, must be deleted using delete_hdate. \fP"
178 .ti -1c
179 .RI "\fBhdate_struct\fP * \fBdelete_hdate\fP (\fBhdate_struct\fP *h)"
180 .br
181 .RI "\fIdelete an hdate struct object. \fP"
182 .ti -1c
183 .RI "char * \fBhdate_get_version_string\fP ()"
184 .br
185 .RI "\fIReturn a static string, with the package name and version. \fP"
186 .ti -1c
187 .RI "char * \fBhdate_get_translator_string\fP ()"
188 .br
189 .RI "\fIname of translator \fP"
190 .in -1c
191 .SH "Define Documentation"
192 .PP
193 .SS "#define HDATA_DIASPORA_FLAG -1"
194 .PP
195 use diaspora dates and holydays flag
196 .PP
197 .SS "#define HDATA_ISRAEL_FLAG 0"
198 .PP
199 use israel dates and holydays flag
200 .PP
201 .SS "#define HDATA_SHORT_FLAG -1"
202 .PP
203 use short strings flag
204 .PP
205 .SS "#define HDATA_LONG_FLAG 0"
206 .PP
207 use long strings flag
208 .PP
209 .SH "Function Documentation"
210 .PP
211 .SS "\fBhdate_struct\fP* hdate_set_gdate (\fBhdate_struct\fP * h, int d, int m, int y)"
212 .PP
213 compute date structure from the Gregorian date
214 .PP
215 \fBParameters:\fP
216 .RS 4
217 \fIh\fP pointer this hdate struct.
218 .br
219 \fId\fP Day of month 1..31
220 .br
221 \fIm\fP Month 1..12 if m or d is 0 return current date.
222 .br
223 \fIy\fP Year in 4 digits e.g. 2001
224 .RE
225 .PP
226 \fBReturns:\fP
227 .RS 4
228 pointer to this hdate struct
229 .RE
230 .PP
231
232 .SS "\fBhdate_struct\fP* hdate_set_hdate (\fBhdate_struct\fP * h, int d, int m, int y)"
233 .PP
234 compute date structure from the Hebrew date
235 .PP
236 \fBParameters:\fP
237 .RS 4
238 \fIh\fP pointer this hdate struct.
239 .br
240 \fId\fP Day of month 1..31
241 .br
242 \fIm\fP Month 1..14 ,(13 - Adar 1, 14 - Adar 2) if m or d is 0 return current date.
243 .br
244 \fIy\fP Year in 4 digits e.g. 5731
245 .RE
246 .PP
247 \fBReturns:\fP
248 .RS 4
249 pointer to this hdate struct
250 .RE
251 .PP
252
253 .SS "\fBhdate_struct\fP* hdate_set_jd (\fBhdate_struct\fP * h, int jd)"
254 .PP
255 compute date structure from the Julian day
256 .PP
257 \fBParameters:\fP
258 .RS 4
259 \fIh\fP pointer this hdate struct.
260 .br
261 \fIjd\fP the julian day number.
262 .RE
263 .PP
264 \fBReturns:\fP
265 .RS 4
266 pointer to this hdate struct
267 .RE
268 .PP
269
270 .SS "char* hdate_get_format_date (\fBhdate_struct\fP const * h, int diaspora, int s)"
271 .PP
272 get formated hebrew date.
273 .PP
274 return the short ( e.g. '1 Tishrey' ) or long (e.g. 'Tuesday 18 Tishrey 5763 Hol hamoed Sukot' ) formated date.
275 .PP
276 \fBParameters:\fP
277 .RS 4
278 \fIh\fP pointer this hdate struct.
279 .br
280 \fIdiaspora\fP if true give diaspora holydays.
281 .br
282 \fIs\fP short flag.
283 .RE
284 .PP
285 \fBReturns:\fP
286 .RS 4
287 a static string of foramted date
288 .RE
289 .PP
290
291 .SS "int hdate_get_parasha (\fBhdate_struct\fP const * h, int diaspora)"
292 .PP
293 get the number of hebrew parasha.
294 .PP
295 \fBParameters:\fP
296 .RS 4
297 \fIh\fP pointer this hdate struct.
298 .br
299 \fIdiaspora\fP if true give diaspora readings
300 .RE
301 .PP
302 \fBReturns:\fP
303 .RS 4
304 the number of parasha 1. Bereshit etc.. (55 trow 61 are joined strings e.g. Vayakhel Pekudei)
305 .RE
306 .PP
307
308 .SS "int hdate_get_holyday (\fBhdate_struct\fP const * h, int diaspora)"
309 .PP
310 get the number of hebrew holyday.
311 .PP
312 \fBParameters:\fP
313 .RS 4
314 \fIh\fP pointer this hdate struct.
315 .br
316 \fIdiaspora\fP if true give diaspora holydays
317 .RE
318 .PP
319 \fBReturns:\fP
320 .RS 4
321 the number of holyday.
322 .RE
323 .PP
324
325 .SS "char* hdate_get_int_string (int n)"
326 .PP
327 convert an integer to hebrew string.
328 .PP
329 \fBParameters:\fP
330 .RS 4
331 \fIn\fP The int to convert
332 .RE
333 .PP
334 \fBReturns:\fP
335 .RS 4
336 a static string of the hebrew number UTF-8 (logical)
337 .RE
338 .PP
339 \fBAttention:\fP
340 .RS 4
341 ( 0 < n < 10000)
342 .RE
343 .PP
344
345 .SS "char* hdate_get_day_string (int day, int s)"
346 .PP
347 get name of week day.
348 .PP
349 \fBParameters:\fP
350 .RS 4
351 \fIday\fP The number of the day 1..7 (1 - sun).
352 .br
353 \fIs\fP short flag true - returns a short string: sun, false returns: sunday.
354 .RE
355 .PP
356 \fBReturns:\fP
357 .RS 4
358 a static string of the day of the week
359 .RE
360 .PP
361
362 .SS "char* hdate_get_month_string (int month, int s)"
363 .PP
364 name of month.
365 .PP
366 \fBParameters:\fP
367 .RS 4
368 \fImonth\fP the number of the month 1..12 (1 - jan).
369 .br
370 \fIs\fP short flag.
371 .RE
372 .PP
373 \fBReturns:\fP
374 .RS 4
375 a static string of month name
376 .RE
377 .PP
378
379 .SS "char* hdate_get_hebrew_month_string (int month, int s)"
380 .PP
381 name of hebrew month.
382 .PP
383 \fBParameters:\fP
384 .RS 4
385 \fImonth\fP the number of the month 1..14 (1 - tishre, 13 - adar 1, 14 - adar 2).
386 .br
387 \fIs\fP short flag.
388 .RE
389 .PP
390 \fBReturns:\fP
391 .RS 4
392 a static string of month name
393 .RE
394 .PP
395
396 .SS "char* hdate_get_holyday_string (int holyday, int s)"
397 .PP
398 name of hebrew holyday.
399 .PP
400 \fBParameters:\fP
401 .RS 4
402 \fIholyday\fP the holyday number.
403 .br
404 \fIs\fP short flag.
405 .RE
406 .PP
407 \fBReturns:\fP
408 .RS 4
409 a static string of holyday name
410 .RE
411 .PP
412
413 .SS "char* hdate_get_parasha_string (int parasha, int s)"
414 .PP
415 name of parasha
416 .PP
417 \fBParameters:\fP
418 .RS 4
419 \fIparasha\fP the number of parasha 1-Bereshit (55 trow 61 are joined strings e.g. Vayakhel Pekudei)
420 .br
421 \fIs\fP short flag.
422 .RE
423 .PP
424 \fBReturns:\fP
425 .RS 4
426 a static string of parasha name
427 .RE
428 .PP
429
430 .SS "int hdate_get_holyday_type (int holyday)"
431 .PP
432 get the hebrew holyday type.
433 .PP
434 \fBParameters:\fP
435 .RS 4
436 \fIholyday\fP the holyday number.
437 .RE
438 .PP
439 \fBReturns:\fP
440 .RS 4
441 the number of holyday type.
442 .RE
443 .PP
444
445 .SS "int hdate_get_size_of_hebrew_year (int hebrew_year)"
446 .PP
447 size of hebrew year in days.
448 .PP
449 \fBParameters:\fP
450 .RS 4
451 \fIhebrew_year\fP the hebrew year.
452 .RE
453 .PP
454 \fBReturns:\fP
455 .RS 4
456 size of Hebrew year
457 .RE
458 .PP
459
460 .SS "int hdate_days_from_3744 (int hebrew_year)"
461 .PP
462 Days since Tishrey 3744.
463 .PP
464 \fBAuthor:\fP
465 .RS 4
466 Amos Shapir 1984 (rev. 1985, 1992) Yaacov Zamir 2003-2005
467 .RE
468 .PP
469 \fBParameters:\fP
470 .RS 4
471 \fIhebrew_year\fP The Hebrew year
472 .RE
473 .PP
474 \fBReturns:\fP
475 .RS 4
476 Number of days since 3,1,3744
477 .RE
478 .PP
479
480 .SS "int hdate_get_year_type (int size_of_year, int new_year_dw)"
481 .PP
482 Return Hebrew year type based on size and first week day of year.
483 .PP
484 \fBParameters:\fP
485 .RS 4
486 \fIsize_of_year\fP Length of year in days
487 .br
488 \fInew_year_dw\fP First week day of year
489 .RE
490 .PP
491 \fBReturns:\fP
492 .RS 4
493 the number for year type (1..14)
494 .RE
495 .PP
496
497 .SS "int hdate_gdate_to_jd (int day, int month, int year)"
498 .PP
499 Compute Julian day from Gregorian date.
500 .PP
501 \fBAuthor:\fP
502 .RS 4
503 Yaacov Zamir (algorithm from Henry F. Fliegel and Thomas C. Van Flandern ,1968)
504 .RE
505 .PP
506 \fBParameters:\fP
507 .RS 4
508 \fIday\fP Day of month 1..31
509 .br
510 \fImonth\fP Month 1..12
511 .br
512 \fIyear\fP Year in 4 digits e.g. 2001
513 .RE
514 .PP
515 \fBReturns:\fP
516 .RS 4
517 the julian day number
518 .RE
519 .PP
520
521 .SS "int hdate_hdate_to_jd (int day, int month, int year, int * jd_tishrey1, int * jd_tishrey1_next_year)"
522 .PP
523 Compute Julian day from Hebrew day, month and year.
524 .PP
525 \fBAuthor:\fP
526 .RS 4
527 Amos Shapir 1984 (rev. 1985, 1992) Yaacov Zamir 2003-2005
528 .RE
529 .PP
530 \fBParameters:\fP
531 .RS 4
532 \fIday\fP Day of month 1..31
533 .br
534 \fImonth\fP Month 1..14 (13 - Adar 1, 14 - Adar 2)
535 .br
536 \fIyear\fP Hebrew year in 4 digits e.g. 5753
537 .br
538 \fIjd_tishrey1\fP return the julian number of 1 Tishrey this year
539 .br
540 \fIjd_tishrey1_next_year\fP return the julian number of 1 Tishrey next year
541 .RE
542 .PP
543 \fBReturns:\fP
544 .RS 4
545 the julian day number
546 .RE
547 .PP
548
549 .SS "void hdate_jd_to_gdate (int jd, int * day, int * month, int * year)"
550 .PP
551 Converting from the Julian day to the Gregorian date.
552 .PP
553 \fBAuthor:\fP
554 .RS 4
555 Yaacov Zamir (Algorithm, Henry F. Fliegel and Thomas C. Van Flandern ,1968)
556 .RE
557 .PP
558 \fBParameters:\fP
559 .RS 4
560 \fIjd\fP Julian day
561 .br
562 \fIday\fP return Day of month 1..31
563 .br
564 \fImonth\fP return Month 1..12
565 .br
566 \fIyear\fP return Year in 4 digits e.g. 2001
567 .RE
568 .PP
569
570 .SS "void hdate_jd_to_hdate (int jd, int * day, int * month, int * year, int * jd_tishrey1, int * jd_tishrey1_next_year)"
571 .PP
572 Converting from the Julian day to the Hebrew day.
573 .PP
574 \fBAuthor:\fP
575 .RS 4
576 Yaacov Zamir 2005
577 .RE
578 .PP
579 \fBParameters:\fP
580 .RS 4
581 \fIjd\fP Julian day
582 .br
583 \fIday\fP return Day of month 1..31
584 .br
585 \fImonth\fP return Month 1..14 (13 - Adar 1, 14 - Adar 2)
586 .br
587 \fIyear\fP return Year in 4 digits e.g. 2001
588 .br
589 \fIjd_tishrey1\fP return the julian number of 1 Tishrey this year
590 .br
591 \fIjd_tishrey1_next_year\fP return the julian number of 1 Tishrey next year
592 .RE
593 .PP
594
595 .SS "int hdate_get_day_of_year (int day, int month, int year)"
596 .PP
597 days from 1 january
598 .PP
599 \fBParameters:\fP
600 .RS 4
601 \fIday\fP this day of month
602 .br
603 \fImonth\fP this month
604 .br
605 \fIyear\fP this year
606 .RE
607 .PP
608 \fBReturns:\fP
609 .RS 4
610 the days from 1 jan
611 .RE
612 .PP
613
614 .SS "void hdate_get_utc_sun_time (int day, int month, int year, double latitude, double longitude, int * sunrise, int * sunset)"
615 .PP
616 utc sunrise/set time for a gregorian date
617 .PP
618 \fBParameters:\fP
619 .RS 4
620 \fIday\fP this day of month
621 .br
622 \fImonth\fP this month
623 .br
624 \fIyear\fP this year
625 .br
626 \fIlongitude\fP longitude to use in calculations degrees, negative values are east
627 .br
628 \fIlatitude\fP latitude to use in calculations degrees, negative values are south
629 .br
630 \fIsunrise\fP return the utc sunrise in minutes after midnight (00:00)
631 .br
632 \fIsunset\fP return the utc sunset in minutes after midnight (00:00)
633 .RE
634 .PP
635
636 .SS "int hdate_get_gday (\fBhdate_struct\fP const * h)"
637 .PP
638 get the Gregorian day of the month
639 .PP
640 \fBParameters:\fP
641 .RS 4
642 \fIh\fP pointer this hdate struct.
643 .RE
644 .PP
645 \fBReturns:\fP
646 .RS 4
647 the Gregorian day of the month, 1..31.
648 .RE
649 .PP
650
651 .SS "int hdate_get_gmonth (\fBhdate_struct\fP const * h)"
652 .PP
653 get the Gregorian month
654 .PP
655 \fBParameters:\fP
656 .RS 4
657 \fIh\fP pointer this hdate struct.
658 .RE
659 .PP
660 \fBReturns:\fP
661 .RS 4
662 the Gregorian month, jan = 1.
663 .RE
664 .PP
665
666 .SS "int hdate_get_gyear (\fBhdate_struct\fP const * h)"
667 .PP
668 get the Gregorian year
669 .PP
670 \fBParameters:\fP
671 .RS 4
672 \fIh\fP pointer this hdate struct.
673 .RE
674 .PP
675 \fBReturns:\fP
676 .RS 4
677 the Gregorian year.
678 .RE
679 .PP
680
681 .SS "int hdate_get_hday (\fBhdate_struct\fP const * h)"
682 .PP
683 get the Hebrew day of the month
684 .PP
685 \fBParameters:\fP
686 .RS 4
687 \fIh\fP pointer this hdate struct.
688 .RE
689 .PP
690 \fBReturns:\fP
691 .RS 4
692 the Hebrew day of the month, 1..30.
693 .RE
694 .PP
695
696 .SS "int hdate_get_hmonth (\fBhdate_struct\fP const * h)"
697 .PP
698 get the Hebrew month
699 .PP
700 \fBParameters:\fP
701 .RS 4
702 \fIh\fP pointer this hdate struct.
703 .RE
704 .PP
705 \fBReturns:\fP
706 .RS 4
707 the Hebrew month, Tishery = 1 .. Adar I =13, Adar II = 14.
708 .RE
709 .PP
710
711 .SS "int hdate_get_hyear (\fBhdate_struct\fP const * h)"
712 .PP
713 get the Hebrew year
714 .PP
715 \fBParameters:\fP
716 .RS 4
717 \fIh\fP pointer this hdate struct.
718 .RE
719 .PP
720 \fBReturns:\fP
721 .RS 4
722 the Hebrew year.
723 .RE
724 .PP
725
726 .SS "int hdate_get_day_of_the_week (\fBhdate_struct\fP const * h)"
727 .PP
728 get the day of the week
729 .PP
730 \fBParameters:\fP
731 .RS 4
732 \fIh\fP pointer this hdate struct.
733 .RE
734 .PP
735 \fBReturns:\fP
736 .RS 4
737 the the day of the week.
738 .RE
739 .PP
740
741 .SS "int hdate_get_size_of_year (\fBhdate_struct\fP const * h)"
742 .PP
743 get the size of the hebrew year
744 .PP
745 \fBParameters:\fP
746 .RS 4
747 \fIh\fP pointer this hdate struct.
748 .RE
749 .PP
750 \fBReturns:\fP
751 .RS 4
752 the the size of the hebrew year.
753 .RE
754 .PP
755
756 .SS "int hdate_get_new_year_day_of_the_week (\fBhdate_struct\fP const * h)"
757 .PP
758 get the new year day of the week
759 .PP
760 \fBParameters:\fP
761 .RS 4
762 \fIh\fP pointer this hdate struct.
763 .RE
764 .PP
765 \fBReturns:\fP
766 .RS 4
767 the the new year day of the week.
768 .RE
769 .PP
770
771 .SS "int hdate_get_julian (\fBhdate_struct\fP const * h)"
772 .PP
773 get the Julian day number
774 .PP
775 \fBParameters:\fP
776 .RS 4
777 \fIh\fP pointer this hdate struct.
778 .RE
779 .PP
780 \fBReturns:\fP
781 .RS 4
782 the Julian day number.
783 .RE
784 .PP
785
786 .SS "int hdate_get_days (\fBhdate_struct\fP const * h)"
787 .PP
788 get the number of days passed since 1 tishrey
789 .PP
790 \fBParameters:\fP
791 .RS 4
792 \fIh\fP pointer this hdate struct.
793 .RE
794 .PP
795 \fBReturns:\fP
796 .RS 4
797 the number of days passed since 1 tishrey.
798 .RE
799 .PP
800
801 .SS "int hdate_get_weeks (\fBhdate_struct\fP const * h)"
802 .PP
803 get the number of weeks passed since 1 tishrey
804 .PP
805 \fBParameters:\fP
806 .RS 4
807 \fIh\fP pointer this hdate struct.
808 .RE
809 .PP
810 \fBReturns:\fP
811 .RS 4
812 the number of weeks passed since 1 tishrey.
813 .RE
814 .PP
815
816 .SS "\fBhdate_struct\fP* new_hdate ()"
817 .PP
818 creat a new hdate struct object, must be deleted using delete_hdate.
819 .PP
820 \fBReturns:\fP
821 .RS 4
822 a new hdate object
823 .RE
824 .PP
825
826 .SS "\fBhdate_struct\fP* delete_hdate (\fBhdate_struct\fP * h)"
827 .PP
828 delete an hdate struct object.
829 .PP
830 \fBParameters:\fP
831 .RS 4
832 \fIh\fP pointer this hdate struct.
833 .RE
834 .PP
835
836 .SS "char* hdate_get_version_string ()"
837 .PP
838 Return a static string, with the package name and version.
839 .PP
840 \fBReturns:\fP
841 .RS 4
842 a static string, with the package name and version
843 .RE
844 .PP
845
846 .SS "char* hdate_get_translator_string ()"
847 .PP
848 name of translator
849 .PP
850 \fBReturns:\fP
851 .RS 4
852 a static string with name of translator, or NULL if none.
853 .RE
854 .PP
855
856 .SH "Author"
857 .PP
858 Generated automatically by Doxygen for libhdate C language from the source code.
0 /* libhdate
1 * Copyright 2004-2005 Yaacov Zamir <kzamir@walla.co.il>
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Library General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16 */
17
18 #include "hdate.h"
19 #include "support.h"
20
21 /**
22 @brief Return number of hebrew holyday.
23
24 @param h The hdate_struct of the date to use.
25 @param diaspora if True give diaspora holydays
26 @return the number of holyday.
27 */
28 int
29 hdate_get_holyday (hdate_struct const * h, int diaspora)
30 {
31 int holyday;
32
33 /* holydays table */
34 static int holydays_table[14][30] =
35 {
36 { /* Tishrey */
37 1, 2, 3, 3, 0, 0, 0, 0, 0, 4,
38 0, 0, 0, 0, 5, 31, 6, 6, 6, 6,
39 7, 27, 8, 0, 0, 0, 0, 0, 0, 0},
40 { /* Heshvan */
41 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
42 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
43 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
44 { /* Kislev */
45 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
46 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
47 0, 0, 0, 0, 9, 9, 9, 9, 9, 9},
48 { /* Tevet */
49 9, 9, 9, 0, 0, 0, 0, 0, 0, 10,
50 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
51 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
52 { /* Shvat */
53 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
54 0, 0, 0, 0, 11, 0, 0, 0, 0, 0,
55 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
56 { /* Adar */
57 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
58 12, 0, 12, 13, 14, 0, 0, 0, 0, 0,
59 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
60 { /* Nisan */
61 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
62 0, 0, 0, 0, 15, 32, 16, 16, 16, 16,
63 28, 29, 0, 0, 0, 24, 24, 24, 0, 0},
64 { /* Iyar */
65 0, 17, 17, 17, 17, 17, 0, 0, 0, 0,
66 0, 0, 0, 0, 0, 0, 0, 18, 0, 0,
67 0, 0, 0, 0, 0, 0, 0, 26, 0, 0},
68 { /* Sivan */
69 0, 0, 0, 0, 19, 20, 30, 0, 0, 0,
70 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
71 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
72 { /* Tamuz */
73 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
74 0, 0, 0, 0, 0, 0, 21, 21, 0, 0,
75 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
76 { /* Av */
77 0, 0, 0, 0, 0, 0, 0, 0, 22, 22,
78 0, 0, 0, 0, 23, 0, 0, 0, 0, 0,
79 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
80 { /* Elul */
81 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
82 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
83 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
84 { /* Adar 1 */
85 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
86 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
87 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
88 { /* Adar 2 */
89 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90 12, 0, 12, 13, 14, 0, 0, 0, 0, 0,
91 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
92 };
93
94 /* sanity check */
95 if (h->hd_mon < 1 || h->hd_mon > 14 || h->hd_day < 0 || h->hd_day > 30)
96 return 0;
97
98 holyday = holydays_table[h->hd_mon - 1][h->hd_day - 1];
99
100 /* if tzom on sat delay one day */
101 /* yom cipur on sat */
102 if ((holyday == 3) && (h->hd_dw == 7 || (h->hd_day == 4 && h->hd_dw !=1)))
103 holyday = 0;
104 /* 17 of Tanuz on sat */
105 if ((holyday == 21) && ((h->hd_dw == 7) || (h->hd_day == 18 && h->hd_dw != 1)))
106 holyday = 0;
107 /* 9 of Av on sat */
108 if ((holyday == 22) && ((h->hd_dw == 7) || (h->hd_day == 10 && h->hd_dw != 1)))
109 holyday = 0;
110
111 /* Hanukah in a long year */
112 if ((holyday == 9) && (h->hd_size_of_year % 10 != 3) && (h->hd_day == 3))
113 holyday = 0;
114
115 /* if tanit ester on sat mov to Thu */
116 if ((holyday == 12) && ((h->hd_dw == 7) || (h->hd_day == 11 && h->hd_dw != 5)))
117 holyday = 0;
118
119 /* yom yerushalym after 68 */
120 if (holyday == 26)
121 {
122 if (h->gd_year < 1968)
123 holyday = 0;
124 }
125
126 /* yom ha azmaot and yom ha zicaron */
127 if (holyday == 17)
128 {
129 if (h->gd_year < 1948)
130 holyday = 0;
131 else if (h->gd_year < 2004)
132 {
133 if ((h->hd_day == 3) && (h->hd_dw == 5))
134 holyday = 17;
135 else if ((h->hd_day == 4) && (h->hd_dw == 5))
136 holyday = 17;
137 else if ((h->hd_day == 5) && (h->hd_dw != 6 && h->hd_dw != 7))
138 holyday = 17;
139 else if ((h->hd_day == 2) && (h->hd_dw == 4))
140 holyday = 25;
141 else if ((h->hd_day == 3) && (h->hd_dw == 4))
142 holyday = 25;
143 else if ((h->hd_day == 4) && (h->hd_dw != 5 && h->hd_dw != 6))
144 holyday = 25;
145 else
146 holyday = 0;
147 }
148 else
149 {
150 if ((h->hd_day == 3) && (h->hd_dw == 5))
151 holyday = 17;
152 else if ((h->hd_day == 4) && (h->hd_dw == 5))
153 holyday = 17;
154 else if ((h->hd_day == 6) && (h->hd_dw == 3))
155 holyday = 17;
156 else if ((h->hd_day == 5) && (h->hd_dw != 6 && h->hd_dw != 7 && h->hd_dw != 2))
157 holyday = 17;
158 else if ((h->hd_day == 2) && (h->hd_dw == 4))
159 holyday = 25;
160 else if ((h->hd_day == 3) && (h->hd_dw == 4))
161 holyday = 25;
162 else if ((h->hd_day == 5) && (h->hd_dw == 2))
163 holyday = 25;
164 else if ((h->hd_day == 4) && (h->hd_dw != 5 && h->hd_dw != 6 && h->hd_dw != 1))
165 holyday = 25;
166 else
167 holyday = 0;
168 }
169 }
170
171 /* yom ha shoaa, on years after 1958 */
172 if (holyday == 24)
173 {
174 if (h->gd_year < 1958)
175 holyday = 0;
176 else
177 {
178 if ((h->hd_day == 26) && (h->hd_dw != 5))
179 holyday = 0;
180 if ((h->hd_day == 28) && (h->hd_dw != 2))
181 holyday = 0;
182 if ((h->hd_day == 27) && (h->hd_dw == 6 || h->hd_dw == 1))
183 holyday = 0;
184 }
185 }
186
187 /* diaspora holidays */
188
189 /* simchat tora only in diaspora in israel just one day shmini+simchat tora */
190 if (holyday == 8 && !diaspora)
191 holyday = 0;
192
193 /* sukkot II holiday only in diaspora */
194 if (holyday == 31 && !diaspora)
195 holyday = 6;
196
197 /* pesach II holiday only in diaspora */
198 if (holyday == 32 && !diaspora)
199 holyday = 16;
200
201 /* shavot II holiday only in diaspora */
202 if (holyday == 30 && !diaspora)
203 holyday = 0;
204
205 /* pesach VIII holiday only in diaspora */
206 if (holyday == 29 && !diaspora)
207 holyday = 0;
208
209 return holyday;
210 }
211
212 /**
213 @brief Return number of hebrew holyday type.
214
215 @param holyday the holyday number
216 @return the number of holyday type.
217 */
218 int
219 hdate_get_holyday_type (int holyday)
220 {
221 int holyday_type;
222
223 switch (holyday)
224 {
225 case 0: /* regular day */
226 holyday_type = 0;
227 break;
228 case 5:
229 case 15:
230 case 20: /* 3 regels */
231 holyday_type = 2;
232 break;
233 case 3:
234 case 4:
235 case 10:
236 case 12:
237 case 21:
238 case 22: /* tzom */
239 holyday_type = 3;
240 break;
241 default: /* regular holyday */
242 holyday_type = 1;
243 break;
244 }
245
246 return holyday_type;
247 }
0 /* libhdate
1 * Copyright 2004-2005 Yaacov Zamir <kzamir@walla.co.il>
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Library General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16 */
17
18 /*
19 * See Amos Shapir hdate_README file attached for
20 * Copyright notice for functions based on Amos's code
21 */
22
23 #include <time.h>
24 #include <stdio.h>
25 #include <stdlib.h>
26
27 #include "hdate.h"
28 #include "support.h"
29
30 #define HOUR 1080
31 #define DAY (24*HOUR)
32 #define WEEK (7*DAY)
33 #define M(h,p) ((h)*HOUR+p)
34 #define MONTH (DAY+M(12,793)) /* Tikun for regular month */
35
36 /**
37 @brief Days since bet (?) Tishrey 3744
38
39 @author Amos Shapir 1984 (rev. 1985, 1992) Yaacov Zamir 2003-2005
40
41 @param hebrew_year The Hebrew year
42 @return Number of days since 3,1,3744
43 */
44 int
45 hdate_days_from_3744 (int hebrew_year)
46 {
47 int years_from_3744;
48 int molad_3744;
49 int leap_months;
50 int leap_left;
51 int months;
52 int parts;
53 int days;
54 int parts_left_in_week;
55 int parts_left_in_day;
56 int week_day;
57
58 /* Start point for calculation is Molad new year 3744 (16BC) */
59 years_from_3744 = hebrew_year - 3744;
60 molad_3744 = M (1 + 6, 779); /* Molad 3744 + 6 hours in parts */
61
62 /* Time in months */
63 leap_months = (years_from_3744 * 7 + 1) / 19; /* Number of leap months */
64 leap_left = (years_from_3744 * 7 + 1) % 19; /* Months left of leap cycle */
65 months = years_from_3744 * 12 + leap_months; /* Total Number of months */
66
67 /* Time in parts and days */
68 parts = months * MONTH + molad_3744; /* Molad This year + Molad 3744 - corections */
69 days = months * 28 + parts / DAY - 2; /* 28 days in month + corections */
70
71 /* Time left for round date in corections */
72 parts_left_in_week = parts % WEEK; /* 28 % 7 = 0 so only corections counts */
73 parts_left_in_day = parts % DAY;
74 week_day = parts_left_in_week / DAY;
75
76 /* Special cases of Molad Zaken */
77 if ((leap_left < 12 && week_day == 3
78 && parts_left_in_day >= M (9 + 6, 204)) ||
79 (leap_left < 7 && week_day == 2
80 && parts_left_in_day >= M (15 + 6, 589)))
81 {
82 days++, week_day++;
83 }
84
85 /* ADU */
86 if (week_day == 1 || week_day == 4 || week_day == 6)
87 {
88 days++;
89 }
90
91 return days;
92 }
93
94 /**
95 @brief Size of Hebrew year in days
96
97 @param hebrew_year The Hebrew year
98 @return Size of Hebrew year
99 */
100 int
101 hdate_get_size_of_hebrew_year (int hebrew_year)
102 {
103 return hdate_days_from_3744 (hebrew_year + 1) -
104 hdate_days_from_3744 (hebrew_year);
105 }
106
107 /**
108 @brief Return Hebrew year type based on size and first week day of year.
109
110 year type | year length | Tishery 1 day of week
111 | 1 | 353 | 2
112 | 2 | 353 | 7
113 | 3 | 354 | 3
114 | 4 | 354 | 5
115 | 5 | 355 | 2
116 | 6 | 355 | 5
117 | 7 | 355 | 7
118 | 8 | 383 | 2
119 | 9 | 383 | 5
120 |10 | 383 | 7
121 |11 | 384 | 3
122 |12 | 385 | 2
123 |13 | 385 | 5
124 |14 | 385 | 7
125
126 @param size_of_year Length of year in days
127 @param new_year_dw First week day of year
128 @return A number for year type (1..14)
129 */
130 int
131 hdate_get_year_type (int size_of_year, int new_year_dw)
132 {
133 /* Only 14 combinations of size and week day are posible */
134 static int year_types[24] =
135 {1, 0, 0, 2, 0, 3, 4, 0, 5, 0, 6, 7,
136 8, 0, 9, 10, 0, 11, 0, 0, 12, 0, 13, 14};
137
138 int offset;
139
140 /* convert size and first day to 1..24 number */
141 /* 2,3,5,7 -> 1,2,3,4 */
142 /* 353, 354, 355, 383, 384, 385 -> 0, 1, 2, 3, 4, 5 */
143 offset = (new_year_dw + 1) / 2;
144 offset = offset + 4 * ((size_of_year % 10 - 3) + (size_of_year / 10 - 35));
145
146 /* some combinations are imposible */
147 return year_types[offset - 1];
148 }
149
150 /**
151 @brief Compute Julian day from Gregorian day, month and year
152 Algorithm from 'Julian and Gregorian Day Numbers' by Peter Meyer
153
154 @author Yaacov Zamir ( algorithm from Henry F. Fliegel and Thomas C. Van Flandern ,1968)
155
156 @param day Day of month 1..31
157 @param month Month 1..12
158 @param year Year in 4 digits e.g. 2001
159 @return The julian day number
160 */
161 int
162 hdate_gdate_to_jd (int day, int month, int year)
163 {
164 int jd;
165 jd = (1461 * (year + 4800 + (month - 14) / 12)) / 4 +
166 (367 * (month - 2 - 12 * ((month - 14) / 12))) / 12 -
167 (3 * ((year + 4900 + (month - 14) / 12) / 100)) / 4 + day -
168 32075;
169 return jd;
170 }
171
172 /**
173 @brief Compute Julian day from Hebrew day, month and year
174
175 @author Amos Shapir 1984 (rev. 1985, 1992) Yaacov Zamir 2003-2005
176
177 @param day Day of month 1..31
178 @param month Month 1..14 (13 - Adar 1, 14 - Adar 2)
179 @param year Hebrew year in 4 digits e.g. 5753
180 @return The julian day number
181 */
182 int
183 hdate_hdate_to_jd (int day, int month, int year, int *jd_tishrey1, int *jd_tishrey1_next_year)
184 {
185 int length_of_year;
186 int jd;
187 int days_from_3744;
188
189 /* Adjust for leap year */
190 if (month == 13)
191 {
192 month = 6;
193 }
194 if (month == 14)
195 {
196 month = 6;
197 day += 30;
198 }
199
200 /* Calculate days since 1,1,3744 */
201 days_from_3744 = hdate_days_from_3744 (year);
202 day = days_from_3744 + (59 * (month - 1) + 1) / 2 + day;
203
204 /* length of year */
205 length_of_year = hdate_days_from_3744 (year + 1) - days_from_3744;
206
207 /* Special cases for this year */
208 if (length_of_year % 10 > 4 && month > 2) /* long Heshvan */
209 day++;
210 if (length_of_year % 10 < 4 && month > 3) /* short Kislev */
211 day--;
212 if (length_of_year > 365 && month > 6) /* leap year */
213 day += 30;
214
215 /* adjust to julian */
216 jd = day + 1715118;
217
218 /* return the 1 of tishrey julians */
219 if (jd_tishrey1 && jd_tishrey1_next_year)
220 {
221 *jd_tishrey1 = days_from_3744 + 1715119;
222 *jd_tishrey1_next_year = *jd_tishrey1 + length_of_year;
223 }
224
225 return jd;
226 }
227
228 /**
229 @brief Converting from the Julian day to the Gregorian day
230 Algorithm from 'Julian and Gregorian Day Numbers' by Peter Meyer
231
232 @author Yaacov Zamir ( Algorithm, Henry F. Fliegel and Thomas C. Van Flandern ,1968)
233
234 @param jd Julian day
235 @param d Return Day of month 1..31
236 @param m Return Month 1..12
237 @param y Return Year in 4 digits e.g. 2001
238 */
239 void
240 hdate_jd_to_gdate (int jd, int *d, int *m, int *y)
241 {
242 int l, n, i, j;
243 l = jd + 68569;
244 n = (4 * l) / 146097;
245 l = l - (146097 * n + 3) / 4;
246 i = (4000 * (l + 1)) / 1461001; /* that's 1,461,001 */
247 l = l - (1461 * i) / 4 + 31;
248 j = (80 * l) / 2447;
249 *d = l - (2447 * j) / 80;
250 l = j / 11;
251 *m = j + 2 - (12 * l);
252 *y = 100 * (n - 49) + i + l; /* that's a lower-case L */
253
254 return;
255 }
256
257 /**
258 @brief Converting from the Julian day to the Hebrew day
259
260 @author Amos Shapir 1984 (rev. 1985, 1992) Yaacov Zamir 2003-2005
261
262 @param jd Julian day
263 @param day Return Day of month 1..31
264 @param month Return Month 1..14 (13 - Adar 1, 14 - Adar 2)
265 @param year Return Year in 4 digits e.g. 2001
266 */
267 void
268 hdate_jd_to_hdate (int jd, int *day, int *month, int *year, int *jd_tishrey1, int *jd_tishrey1_next_year)
269 {
270 int days;
271 int size_of_year;
272 int internal_jd_tishrey1, internal_jd_tishrey1_next_year;
273
274 /* calculate Gregorian date */
275 hdate_jd_to_gdate (jd, day, month, year);
276
277 /* Guess Hebrew year is Gregorian year + 3760 */
278 *year = *year + 3760;
279
280 internal_jd_tishrey1 = hdate_days_from_3744 (*year) + 1715119;
281 internal_jd_tishrey1_next_year = hdate_days_from_3744 (*year + 1) + 1715119;
282
283 /* Check if computed year was underestimated */
284 if (internal_jd_tishrey1_next_year <= jd)
285 {
286 *year = *year + 1;
287 internal_jd_tishrey1 = internal_jd_tishrey1_next_year;
288 internal_jd_tishrey1_next_year = hdate_days_from_3744 (*year + 1) + 1715119;
289 }
290
291 size_of_year = internal_jd_tishrey1_next_year - internal_jd_tishrey1;
292
293 /* days into this year, first month 0..29 */
294 days = jd - internal_jd_tishrey1;
295
296 /* last 8 months allways have 236 days */
297 if (days >= (size_of_year - 236)) /* in last 8 months */
298 {
299 days = days - (size_of_year - 236);
300 *month = days * 2 / 59;
301 *day = days - (*month * 59 + 1) / 2 + 1;
302
303 *month = *month + 4 + 1;
304
305 /* if leap */
306 if (size_of_year > 355 && *month <=6)
307 *month = *month + 8;
308 }
309 else /* in 4-5 first months */
310 {
311 /* Special cases for this year */
312 if (size_of_year % 10 > 4 && days > 58) /* long Heshvan */
313 {
314 *month = (days - 1) * 2 / 59;
315 *day = days - (*month * 59 + 1) / 2;
316 }
317 else if (size_of_year % 10 < 4 && days > 87) /* short kislev */
318 {
319 *month = (days + 1) * 2 / 59;
320 *day = days - (*month * 59 + 1) / 2 + 2;
321 }
322 else /* regular months */
323 {
324 *month = days * 2 / 59;
325 *day = days - (*month * 59 + 1) / 2 + 1;
326 }
327
328 *month = *month + 1;
329 }
330
331 /* return the 1 of tishrey julians */
332 if (jd_tishrey1 && jd_tishrey1_next_year)
333 {
334 *jd_tishrey1 = internal_jd_tishrey1;
335 *jd_tishrey1_next_year = internal_jd_tishrey1_next_year;
336 }
337
338 return;
339 }
340
341 /********************************************************************************/
342 /********************************************************************************/
343
344 /**
345 @brief compute date structure from the Gregorian date
346
347 @param d Day of month 1..31
348 @param m Month 1..12 , if m or d is 0 return current date.
349 @param y Year in 4 digits e.g. 2001
350 */
351 hdate_struct *
352 hdate_set_gdate (hdate_struct * h, int d, int m, int y)
353 {
354 int jd;
355 int jd_tishrey1, jd_tishrey1_next_year;
356
357 if (!h) return NULL;
358
359 /* check for null dates (kobi) */
360 if ((d == 0) || (m == 0))
361 {
362 struct tm *tm;
363 long t;
364 /* FIXME: day start at 6:00 or 12:00 like in Gregorian cal. ? */
365 t = time (0);
366 tm = localtime (&t);
367 d = tm->tm_mday;
368 m = tm->tm_mon + 1;
369 y = tm->tm_year + 1900;
370 }
371
372 h->gd_day = d;
373 h->gd_mon = m;
374 h->gd_year = y;
375
376 jd = hdate_gdate_to_jd (d, m, y);
377 hdate_jd_to_hdate (jd, &(h->hd_day), &(h->hd_mon), &(h->hd_year), &jd_tishrey1, &jd_tishrey1_next_year);
378
379 h->hd_dw = (jd + 1) % 7 + 1;
380 h->hd_size_of_year = jd_tishrey1_next_year - jd_tishrey1;
381 h->hd_new_year_dw = (jd_tishrey1 + 1) % 7 + 1;
382 h->hd_year_type = hdate_get_year_type (h->hd_size_of_year , h->hd_new_year_dw);
383 h->hd_jd = jd;
384 h->hd_days = jd - jd_tishrey1 + 1;
385 h->hd_weeks = ((h->hd_days - 1) + (h->hd_new_year_dw - 1)) / 7 + 1;
386
387 return (h);
388 }
389
390 /**
391 @brief compute date structure from the Hebrew date
392
393 @param d Day of month 1..31
394 @param m Month 1..14 , if m or d is 0 return current date.
395 @param y Year in 4 digits e.g. 5731
396 */
397 hdate_struct *
398 hdate_set_hdate (hdate_struct * h, int d, int m, int y)
399 {
400 int jd;
401 int jd_tishrey1, jd_tishrey1_next_year;
402
403 if (!h) return NULL;
404
405 h->hd_day = d;
406 h->hd_mon = m;
407 h->hd_year = y;
408
409 jd = hdate_hdate_to_jd (d, m, y, &jd_tishrey1, &jd_tishrey1_next_year);
410 hdate_jd_to_gdate (jd, &(h->gd_day), &(h->gd_mon), &(h->gd_year));
411
412 h->hd_dw = (jd + 1) % 7 + 1;
413 h->hd_size_of_year = jd_tishrey1_next_year - jd_tishrey1;
414 h->hd_new_year_dw = (jd_tishrey1 + 1) % 7 + 1;
415 h->hd_year_type = hdate_get_year_type (h->hd_size_of_year , h->hd_new_year_dw);
416 h->hd_jd = jd;
417 h->hd_days = jd - jd_tishrey1 + 1;
418 h->hd_weeks = ((h->hd_days - 1) + (h->hd_new_year_dw - 1)) / 7 + 1;
419
420 return (h);
421 }
422
423 /**
424 @brief compute date structure from julian day
425
426 @param jd the julian day number.
427 */
428 hdate_struct *
429 hdate_set_jd (hdate_struct * h, int jd)
430 {
431 int jd_tishrey1, jd_tishrey1_next_year;
432
433 if (!h) return NULL;
434
435 hdate_jd_to_gdate (jd, &(h->gd_day), &(h->gd_mon), &(h->gd_year));
436 hdate_jd_to_hdate (jd, &(h->hd_day), &(h->hd_mon), &(h->hd_year), &jd_tishrey1, &jd_tishrey1_next_year);
437
438 h->hd_dw = (jd + 1) % 7 + 1;
439 h->hd_size_of_year = jd_tishrey1_next_year - jd_tishrey1;
440 h->hd_new_year_dw = (jd_tishrey1 + 1) % 7 + 1;
441 h->hd_year_type = hdate_get_year_type (h->hd_size_of_year , h->hd_new_year_dw);
442 h->hd_jd = jd;
443 h->hd_days = jd - jd_tishrey1 + 1;
444 h->hd_weeks = ((h->hd_days - 1) + (h->hd_new_year_dw - 1)) / 7 + 1;
445
446 return (h);
447 }
448
449 /********************************************************************************/
450 /********************************************************************************/
451
452 /**
453 @brief get the Gregorian day of the month
454
455 @param h pointer this hdate struct.
456 @return the Gregorian day of the month, 1..31.
457 */
458 int
459 hdate_get_gday (hdate_struct const * h)
460 {
461 return h->gd_day;
462 }
463
464 /**
465 @brief get the Gregorian month
466
467 @param h pointer this hdate struct.
468 @return the Gregorian month, jan = 1.
469 */
470 int
471 hdate_get_gmonth (hdate_struct const * h)
472 {
473 return h->gd_mon;
474 }
475
476 /**
477 @brief get the Gregorian year
478
479 @param h pointer this hdate struct.
480 @return the Gregorian year.
481 */
482 int
483 hdate_get_gyear (hdate_struct const * h)
484 {
485 return h->gd_year;
486 }
487
488 /**
489 @brief get the Hebrew day of the month
490
491 @param h pointer this hdate struct.
492 @return the Hebrew day of the month, 1..30.
493 */
494 int
495 hdate_get_hday (hdate_struct const * h)
496 {
497 return h->hd_day;
498 }
499
500 /**
501 @brief get the Hebrew month
502
503 @param h pointer this hdate struct.
504 @return the Hebrew month, Tishery = 1 .. Adar I =13, Adar II = 14.
505 */
506 int
507 hdate_get_hmonth (hdate_struct const * h)
508 {
509 return h->hd_mon;
510 }
511
512 /**
513 @brief get the Hebrew year
514
515 @param h pointer this hdate struct.
516 @return the Hebrew year.
517 */
518 int
519 hdate_get_hyear (hdate_struct const * h)
520 {
521 return h->hd_year;
522 }
523
524 /**
525 @brief get the day of the week
526
527 @param h pointer this hdate struct.
528 @return the the day of the week.
529 */
530 int
531 hdate_get_day_of_the_week (hdate_struct const * h)
532 {
533 return h->hd_dw;
534 }
535
536 /**
537 @brief get the size of the hebrew year
538
539 @param h pointer this hdate struct.
540 @return the the size of the hebrew year.
541 */
542 int
543 hdate_get_size_of_year (hdate_struct const * h)
544 {
545 return h->hd_size_of_year;
546 }
547
548 /**
549 @brief get the new year day of the week
550
551 @param h pointer this hdate struct.
552 @return the the new year day of the week.
553 */
554 int
555 hdate_get_new_year_day_of_the_week (hdate_struct const * h)
556 {
557 return h->hd_new_year_dw;
558 }
559
560 /**
561 @brief get the Julian day number
562
563 @param h pointer this hdate struct.
564 @return the Julian day number.
565 */
566 int
567 hdate_get_julian (hdate_struct const * h)
568 {
569 return h->hd_jd;
570 }
571
572 /**
573 @brief get the number of days passed since 1 tishrey
574
575 @param h pointer this hdate struct.
576 @return the number of days passed since 1 tishrey.
577 */
578 int
579 hdate_get_days (hdate_struct const * h)
580 {
581 return h->hd_days;
582 }
583
584 /**
585 @brief get the number of weeks passed since 1 tishrey
586
587 @param h pointer this hdate struct.
588 @return the number of weeks passed since 1 tishrey.
589 */
590 int
591 hdate_get_weeks (hdate_struct const * h)
592 {
593 return h->hd_weeks;
594 }
595
596 /********************************************************************************/
597 /********************************************************************************/
598
599 /**
600 @brief creat a new hdate struct object, must be deleted using delete_hdate.
601
602 @return a new hdate object
603 */
604 hdate_struct *
605 new_hdate ()
606 {
607 /* allocate memory for a new hdate object */
608 hdate_struct *h = (hdate_struct *) malloc (sizeof (hdate_struct));
609
610 /* check for out of memory */
611 if (!h)
612 return NULL;
613
614 /* get todays date */
615 hdate_set_gdate (h, 0, 0, 0);
616
617 return h;
618 }
619
620 /**
621 @brief delete an hdate struct object.
622
623 @param h pointer this hdate struct.
624 */
625 hdate_struct *
626 delete_hdate (hdate_struct *h)
627 {
628 /* if h exist delete it */
629 if (h)
630 {
631 free (h);
632 h = NULL;
633 }
634
635 return h;
636 }
637
0 /* libhdate
1 * Copyright 2004-2005 Yaacov Zamir <kzamir@walla.co.il>
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Library General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16 */
17
18 #include "hdate.h"
19 #include "support.h"
20
21 /**
22 @brief Return number of hebrew parasha.
23
24 @author Yaacov Zamir 2003-2005, Reading tables by Zvi Har'El
25
26 @param hebdate The hdate_struct of the date to use.
27 @param diaspora if True give diaspora readings
28 @return the name of parasha 1. Bereshit etc..
29 (55 trow 61 are joined strings e.g. Vayakhel Pekudei)
30 */
31 int
32 hdate_get_parasha (hdate_struct const * h, int diaspora)
33 {
34 static int join_flags[2][14][7] =
35 {
36 {
37 {1, 1, 1, 1, 0, 1, 1}, /* 1 be erez israel */
38 {1, 1, 1, 1, 0, 1, 0}, /* 2 */
39 {1, 1, 1, 1, 0, 1, 1}, /* 3 */
40 {1, 1, 1, 0, 0, 1, 0}, /* 4 */
41 {1, 1, 1, 1, 0, 1, 1}, /* 5 */
42 {0, 1, 1, 1, 0, 1, 0}, /* 6 */
43 {1, 1, 1, 1, 0, 1, 1}, /* 7 */
44 {0, 0, 0, 0, 0, 1, 1}, /* 8 */
45 {0, 0, 0, 0, 0, 0, 0}, /* 9 */
46 {0, 0, 0, 0, 0, 1, 1}, /* 10 */
47 {0, 0, 0, 0, 0, 0, 0}, /* 11 */
48 {0, 0, 0, 0, 0, 0, 0}, /* 12 */
49 {0, 0, 0, 0, 0, 0, 1}, /* 13 */
50 {0, 0, 0, 0, 0, 1, 1} /* 14 */
51 },
52 {
53 {1, 1, 1, 1, 0, 1, 1}, /* 1 in diaspora */
54 {1, 1, 1, 1, 0, 1, 0}, /* 2 */
55 {1, 1, 1, 1, 1, 1, 1}, /* 3 */
56 {1, 1, 1, 1, 0, 1, 0}, /* 4 */
57 {1, 1, 1, 1, 1, 1, 1}, /* 5 */
58 {0, 1, 1, 1, 0, 1, 0}, /* 6 */
59 {1, 1, 1, 1, 0, 1, 1}, /* 7 */
60 {0, 0, 0, 0, 1, 1, 1}, /* 8 */
61 {0, 0, 0, 0, 0, 0, 0}, /* 9 */
62 {0, 0, 0, 0, 0, 1, 1}, /* 10 */
63 {0, 0, 0, 0, 0, 1, 0}, /* 11 */
64 {0, 0, 0, 0, 0, 1, 0}, /* 12 */
65 {0, 0, 0, 0, 0, 0, 1}, /* 13 */
66 {0, 0, 0, 0, 1, 1, 1} /* 14 */
67 }
68 };
69
70 int reading;
71
72
73 /* if simhat tora return vezot habracha */
74 if (h->hd_mon == 1 && h->hd_day == 22)
75 {
76 return 54;
77 }
78
79 /* if not shabat return none */
80 if (h->hd_dw != 7)
81 {
82 return 0;
83 }
84
85 /* check for diaspora readings */
86 diaspora = diaspora?1:0;
87
88 switch (h->hd_weeks)
89 {
90 case 1:
91 if (h->hd_new_year_dw == 7)
92 {
93 return 0;
94 }
95 else if ((h->hd_new_year_dw == 2) || (h->hd_new_year_dw == 3))
96 {
97 return 52;
98 }
99 else /* if (h->hd_new_year_dw == 5) */
100 {
101 return 53;
102 }
103 break;
104 case 2:
105 if (h->hd_new_year_dw == 5)
106 {
107 return 0;
108 }
109 else
110 {
111 return 53;
112 }
113 break;
114 case 3:
115 return 0;
116 break;
117 case 4:
118 if (h->hd_new_year_dw == 7)
119 {
120 return 54;
121 }
122 else
123 {
124 return 1;
125 }
126 break;
127 default:
128 /* simhat tora on week 4 bereshit too */
129 reading = h->hd_weeks - 3;
130
131 /* was simhat tora on shabat ? */
132 if (h->hd_new_year_dw == 7)
133 reading = reading - 1;
134
135 /* no joining */
136 if (reading < 22)
137 {
138 return reading;
139 }
140
141 /* pesach */
142 if ((h->hd_mon == 7) && (h->hd_day > 14) && (h->hd_day < 22))
143 {
144 return 0;
145 }
146 if (((h->hd_mon == 7) && (h->hd_day > 21)) || (h->hd_mon > 7 && h->hd_mon < 13))
147 {
148 reading--;
149 }
150 /* on diaspora, shavot may fall on shabat if next new year is on shabat */
151 if (diaspora &&
152 (h->hd_mon < 13) &&
153 ((h->hd_mon > 9) || (h->hd_mon == 9 && h->hd_day >= 7)) &&
154 ((h->hd_new_year_dw + h->hd_size_of_year) % 7) == 0)
155 {
156 if (h->hd_mon == 9 && h->hd_day == 7)
157 {
158 return 0;
159 }
160 else
161 {
162 reading--;
163 }
164 }
165
166 /* joining */
167 if (join_flags[diaspora][h->hd_year_type - 1][0] && (reading >= 22))
168 {
169 if (reading == 22)
170 {
171 return 55;
172 }
173 else
174 {
175 reading++;
176 }
177 }
178 if (join_flags[diaspora][h->hd_year_type - 1][1] && (reading >= 27))
179 {
180 if (reading == 27)
181 {
182 return 56;
183 }
184 else
185 {
186 reading++;
187 }
188 }
189 if (join_flags[diaspora][h->hd_year_type - 1][2] && (reading >= 29))
190 {
191 if (reading == 29)
192 {
193 return 57;
194 }
195 else
196 {
197 reading++;
198 }
199 }
200 if (join_flags[diaspora][h->hd_year_type - 1][3] && (reading >= 32))
201 {
202 if (reading == 32)
203 {
204 return 58;
205 }
206 else
207 {
208 reading++;
209 }
210 }
211
212 if (join_flags[diaspora][h->hd_year_type - 1][4] && (reading >= 39))
213 {
214 if (reading == 39)
215 {
216 return 59;
217 }
218 else
219 {
220 reading++;
221 }
222 }
223 if (join_flags[diaspora][h->hd_year_type - 1][5] && (reading >= 42))
224 {
225 if (reading == 42)
226 {
227 return 60;
228 }
229 else
230 {
231 reading++;
232 }
233 }
234 if (join_flags[diaspora][h->hd_year_type - 1][6] && (reading >= 51))
235 {
236 if (reading == 51)
237 {
238 return 61;
239 }
240 else
241 {
242 reading++;
243 }
244 }
245 break;
246 }
247
248 return reading;
249 }
0 /* libhdate
1 * Copyright 2004-2005 Yaacov Zamir <kzamir@walla.co.il>
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Library General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16 */
17
18 #include <stdio.h>
19 #include <stdlib.h>
20 #include <string.h>
21
22 #ifdef ENABLE_NLS
23 #include <locale.h>
24 #endif
25
26 #include "hdate.h"
27 #include "support.h"
28
29 /**
30 @brief convert an integer to hebrew string UTF-8 (logical)
31
32 @param n The int to convert
33
34 @attention ( 0 < n < 10000)
35 @warning uses a static string, so output should be copied away.
36 */
37 char *
38 hdate_get_int_string (int n)
39 {
40 int length;
41 static char h_number[100];
42 static char *digits[3][10] = {
43 {" ", "א", "ב", "ג", "ד", "ה", "ו", "ז", "ח", "ט"},
44 {"ט", "י", "כ", "ל", "מ", "נ", "ס", "ע", "פ", "צ"},
45 {" ", "ק", "ר", "ש", "ת"}
46 };
47
48 char *locale;
49 char *language;
50
51 /* Get the name of the current locale. */
52 #ifdef ENABLE_NLS
53 locale = setlocale (LC_MESSAGES, NULL);
54 language = getenv("LANGUAGE");
55 #else
56 locale = NULL;
57 language = NULL;
58 #endif
59
60 if (! ((locale && (locale[0] == 'h') && (locale[1] == 'e')) ||
61 (language && (language[0] == 'h') && (language[1] == 'e'))) )
62 {
63 /* not hebrew locale return the number in decimal form */
64 snprintf (h_number, 100, "%d", n);
65 return h_number;
66 }
67
68 /* sanity checks */
69 if (n < 1 || n > 10000)
70 {
71 return NULL;
72 }
73
74 strncpy (h_number, "", 100);
75
76 if (n >= 1000)
77 {
78 strncat (h_number, digits[0][n / 1000], 100);
79 n %= 1000;
80 }
81 while (n >= 400)
82 {
83 strncat (h_number, digits[2][4], 100);
84 n -= 400;
85 }
86 if (n >= 100)
87 {
88 strncat (h_number, digits[2][n / 100], 100);
89 n %= 100;
90 }
91 if (n >= 10)
92 {
93 if (n == 15 || n == 16)
94 n -= 9;
95 strncat (h_number, digits[1][n / 10], 100);
96 n %= 10;
97 }
98 if (n > 0)
99 strncat (h_number, digits[0][n], 16);
100
101 length = strlen (h_number);
102
103 /* add the ' and " to hebrew numbers */
104 if (length <= 2)
105 {
106 strncat (h_number, "'", 100);
107 }
108 else
109 {
110 h_number[length + 1] = h_number[length];
111 h_number[length] = h_number[length - 1];
112 h_number[length - 1] = h_number[length - 2];
113 h_number[length - 2] = '\"';
114 }
115
116 return h_number;
117 }
118
119 /**
120 @brief Return a static string, with name of wek day.
121
122 @param day The number of the day 0..6 (0 - sun).
123 @param s A short flag (true - returns a short string: sun, .., false returns: sunday, .. ).
124 */
125 char *
126 hdate_get_day_string (int day, int s)
127 {
128 /* create a static days array */
129 static char *days[2][7] = {
130 {N_("Sun"), N_("Mon"), N_("Tue"), N_("Wed"), N_("Thu"),
131 N_("Fri"), N_("Sat")},
132 {N_("Sunday"), N_("Monday"), N_("Tuesday"), N_("Wednesday"),
133 N_("Thursday"), N_("Friday"), N_("Saturday")}
134 };
135
136 #ifdef ENABLE_NLS
137 bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);
138 bind_textdomain_codeset (PACKAGE, "UTF-8");
139 #endif
140
141 /* make sure s is 0 or 1 */
142 s = s ? 0 : 1;
143
144 if (day >= 1 && day <= 7)
145 {
146 return _(days[s][day - 1]);
147 }
148
149 /* if not a valid day return NULL */
150 return NULL;
151 }
152
153 /**
154 @brief Return a static string, with name of month.
155
156 @param month The number of the month 1..12 (1 - jan).
157 @param s A short flag.
158 */
159 char *
160 hdate_get_month_string (int month, int s)
161 {
162
163 static char *months[2][12] = {
164 {N_("Jan"), N_("Feb"), N_("Mar"), N_("Apr"), N_("May"),
165 N_("Jun"), N_("Jul"), N_("Aug"), N_("Sep"), N_("Oct"),
166 N_("Nov"), N_("Dec")},
167 {N_("January"), N_("February"), N_("March"),
168 N_("April"), N_("May"), N_("June"),
169 N_("July"), N_("August"), N_("September"),
170 N_("October"), N_("November"), N_("December")}
171 };
172
173 #ifdef ENABLE_NLS
174 bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);
175 bind_textdomain_codeset (PACKAGE, "UTF-8");
176 #endif
177
178 /* make sure s is 0 or 1 */
179 s = s ? 0 : 1;
180
181 if (month >= 1 && month <= 12)
182 {
183 return _(months[s][month - 1]);
184 }
185
186 /* if not a valid month return NULL */
187 return NULL;
188 }
189
190 /**
191 @brief Return a static string, with name of hebrew month.
192
193 @param month The number of the month 1..14 (1 - tishre, 13 - adar 1, 14 - adar 2).
194 @param s A short flag.
195 */
196 char *
197 hdate_get_hebrew_month_string (int month, int s)
198 {
199 /* FIXME: abbrev of Hebrew months */
200 static char *months[2][14] = {
201 {N_("Tishrei"), N_("Cheshvan"), N_("Kislev"), N_("Tevet"),
202 N_("Sh'vat"), N_("Adar"), N_("Nisan"), N_("Iyyar"),
203 N_("Sivan"), N_("Tamuz"), N_("Av"), N_("Elul"), N_("Adar I"),
204 N_("Adar II")},
205 {N_("Tishrei"), N_("Cheshvan"), N_("Kislev"), N_("Tevet"),
206 N_("Sh'vat"), N_("Adar"), N_("Nisan"), N_("Iyyar"),
207 N_("Sivan"), N_("Tamuz"), N_("Av"), N_("Elul"), N_("Adar I"),
208 N_("Adar II")}
209 };
210
211 #ifdef ENABLE_NLS
212 bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);
213 bind_textdomain_codeset (PACKAGE, "UTF-8");
214 #endif
215
216 /* make sure s is 0 or 1 */
217 s = s ? 0 : 1;
218
219 if (month >= 1 && month <= 14)
220 {
221 return _(months[s][month - 1]);
222 }
223
224 /* if not a valid month return NULL */
225 return NULL;
226 }
227
228 /**
229 @brief Name of hebrew holyday.
230
231 @param holyday The holyday number.
232 @param s A short flag.
233 */
234 char *
235 hdate_get_holyday_string (int holyday, int s)
236 {
237 /* holyday strings */
238 static char *holydays[2][32] = {
239 {
240 N_("Rosh Hashana I"), /* 1 */
241 N_("Rosh Hashana II"),
242 N_("Tzom Gedaliah"),
243 N_("Yom Kippur"),
244 N_("Sukkot"),
245 N_("Hol hamoed Sukkot"),
246 N_("Hoshana raba"),
247 N_("Simchat Torah"),
248 N_("Chanukah"),
249 N_("Asara B'Tevet"), /* 10 */
250 N_("Tu B'Shvat"),
251 N_("Ta'anit Esther"),
252 N_("Purim"),
253 N_("Shushan Purim"),
254 N_("Pesach"),
255 N_("Hol hamoed Pesach"),
256 N_("Yom HaAtzma'ut"),
257 N_("Lag B'Omer"),
258 N_("Erev Shavuot"),
259 N_("Shavuot"), /* 20 */
260 N_("Tzom Tammuz"),
261 N_("Tish'a B'Av"),
262 N_("Tu B'Av"),
263 N_("Yom HaShoah"),
264 N_("Yom HaZikaron"), /* 25 */
265 N_("Yom Yerushalayim"),
266 N_("Shmini Atzeret"),
267 N_("Pesach VII"),
268 N_("Pesach VIII"),
269 N_("Shavuot II"),
270 N_("Sukkot II"),
271 N_("Pesach II")},
272 {
273 N_("Rosh Hashana I"),
274 N_("Rosh Hashana II"),
275 N_("Tzom Gedaliah"),
276 N_("Yom Kippur"),
277 N_("Sukkot"),
278 N_("Hol hamoed Sukkot"),
279 N_("Hoshana raba"),
280 N_("Simchat Torah"),
281 N_("Chanukah"),
282 N_("Asara B'Tevet"),
283 N_("Tu B'Shvat"),
284 N_("Ta'anit Esther"),
285 N_("Purim"),
286 N_("Shushan Purim"),
287 N_("Pesach"),
288 N_("Hol hamoed Pesach"),
289 N_("Yom HaAtzma'ut"),
290 N_("Lag B'Omer"),
291 N_("Erev Shavuot"),
292 N_("Shavuot"),
293 N_("Tzom Tammuz"),
294 N_("Tish'a B'Av"),
295 N_("Tu B'Av"),
296 N_("Yom HaShoah"),
297 N_("Yom HaZikaron"),
298 N_("Yom Yerushalayim"),
299 N_("Shmini Atzeret"),
300 N_("Pesach VII"),
301 N_("Pesach VIII"),
302 N_("Shavuot II"),
303 N_("Sukkot II"),
304 N_("Pesach II")}
305 };
306
307 #ifdef ENABLE_NLS
308 bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);
309 bind_textdomain_codeset (PACKAGE, "UTF-8");
310 #endif
311
312 /* make sure s is 0 or 1 */
313 s = s ? 0 : 1;
314
315 if (holyday >= 1 && holyday <= 32)
316 {
317 return _(holydays[s][holyday - 1]);
318 }
319
320 /* if not a valid holyday return NULL */
321 return NULL;
322 }
323
324 /**
325 @brief Name of Parasha
326
327 @param parasha The Number of Parasha 1-Bereshit
328 (55 trow 61 are joined strings e.g. Vayakhel Pekudei)
329 @param s A short flag.
330 */
331 char *
332 hdate_get_parasha_string (int parasha, int s)
333 {
334 /* FIXME: abbrev of parasha */
335 static char *parashaot[2][62] = {
336 {
337 N_("none"),
338 N_("Bereshit"), /* 1 */
339 N_("Noach"),
340 N_("Lech-Lecha"),
341 N_("Vayera"),
342 N_("Chayei Sara"),
343 N_("Toldot"),
344 N_("Vayetzei"),
345 N_("Vayishlach"),
346 N_("Vayeshev"),
347 N_("Miketz"), /* 10 */
348 N_("Vayigash"),
349 N_("Vayechi"),
350 N_("Shemot"),
351 N_("Vaera"),
352 N_("Bo"),
353 N_("Beshalach"),
354 N_("Yitro"),
355 N_("Mishpatim"),
356 N_("Terumah"),
357 N_("Tetzaveh"), /* 20 */
358 N_("Ki Tisa"),
359 N_("Vayakhel"),
360 N_("Pekudei"),
361 N_("Vayikra"),
362 N_("Tzav"),
363 N_("Shmini"),
364 N_("Tazria"),
365 N_("Metzora"),
366 N_("Achrei Mot"),
367 N_("Kedoshim"), /* 30 */
368 N_("Emor"),
369 N_("Behar"),
370 N_("Bechukotai"),
371 N_("Bamidbar"),
372 N_("Nasso"),
373 N_("Beha'alotcha"),
374 N_("Sh'lach"),
375 N_("Korach"),
376 N_("Chukat"),
377 N_("Balak"), /* 40 */
378 N_("Pinchas"),
379 N_("Matot"),
380 N_("Masei"),
381 N_("Devarim"),
382 N_("Vaetchanan"),
383 N_("Eikev"),
384 N_("Re'eh"),
385 N_("Shoftim"),
386 N_("Ki Teitzei"),
387 N_("Ki Tavo"), /* 50 */
388 N_("Nitzavim"),
389 N_("Vayeilech"),
390 N_("Ha'Azinu"),
391 N_("Vezot Habracha"), /* 54 */
392 N_("Vayakhel-Pekudei"),
393 N_("Tazria-Metzora"),
394 N_("Achrei Mot-Kedoshim"),
395 N_("Behar-Bechukotai"),
396 N_("Chukat-Balak"),
397 N_("Matot-Masei"),
398 N_("Nitzavim-Vayeilech")},
399 {
400 N_("none"),
401 N_("Bereshit"), /* 1 */
402 N_("Noach"),
403 N_("Lech-Lecha"),
404 N_("Vayera"),
405 N_("Chayei Sara"),
406 N_("Toldot"),
407 N_("Vayetzei"),
408 N_("Vayishlach"),
409 N_("Vayeshev"),
410 N_("Miketz"), /* 10 */
411 N_("Vayigash"),
412 N_("Vayechi"),
413 N_("Shemot"),
414 N_("Vaera"),
415 N_("Bo"),
416 N_("Beshalach"),
417 N_("Yitro"),
418 N_("Mishpatim"),
419 N_("Terumah"),
420 N_("Tetzaveh"), /* 20 */
421 N_("Ki Tisa"),
422 N_("Vayakhel"),
423 N_("Pekudei"),
424 N_("Vayikra"),
425 N_("Tzav"),
426 N_("Shmini"),
427 N_("Tazria"),
428 N_("Metzora"),
429 N_("Achrei Mot"),
430 N_("Kedoshim"), /* 30 */
431 N_("Emor"),
432 N_("Behar"),
433 N_("Bechukotai"),
434 N_("Bamidbar"),
435 N_("Nasso"),
436 N_("Beha'alotcha"),
437 N_("Sh'lach"),
438 N_("Korach"),
439 N_("Chukat"),
440 N_("Balak"), /* 40 */
441 N_("Pinchas"),
442 N_("Matot"),
443 N_("Masei"),
444 N_("Devarim"),
445 N_("Vaetchanan"),
446 N_("Eikev"),
447 N_("Re'eh"),
448 N_("Shoftim"),
449 N_("Ki Teitzei"),
450 N_("Ki Tavo"), /* 50 */
451 N_("Nitzavim"),
452 N_("Vayeilech"),
453 N_("Ha'Azinu"),
454 N_("Vezot Habracha"), /* 54 */
455 N_("Vayakhel-Pekudei"),
456 N_("Tazria-Metzora"),
457 N_("Achrei Mot-Kedoshim"),
458 N_("Behar-Bechukotai"),
459 N_("Chukat-Balak"),
460 N_("Matot-Masei"),
461 N_("Nitzavim-Vayeilech")}
462 };
463
464 #ifdef ENABLE_NLS
465 bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);
466 bind_textdomain_codeset (PACKAGE, "UTF-8");
467 #endif
468
469 /* make sure s is 0 or 1 */
470 s = s ? 0 : 1;
471
472 if (parasha >= 0 && parasha <= 61)
473 {
474 return _(parashaot[s][parasha]);
475 }
476
477 /* if not a valid parasha return NULL */
478 return NULL;
479 }
480
481 /**
482 @brief Return a static string, with the hebrew date.
483
484 return the short ( e.g. "1 Tishrey" ) or
485 long (e.g. "Tuesday 18 Tishrey 5763 Hol hamoed Sukot" ) formated date.
486
487 @param h The hdate_struct of the date to print.
488 @param diaspora if true give diaspora holydays
489 @param s A short flag (true - returns a short string, false returns a long string. ).
490 */
491 char *
492 hdate_get_format_date (hdate_struct const * h, int diaspora, int s)
493 {
494 static char format_date[500];
495 static char temp[500];
496 int holyday;
497
498 if (h)
499 {
500 if (s)
501 { /* short format */
502 snprintf (format_date, 500, "%s %s",
503 hdate_get_int_string (h->hd_day),
504 hdate_get_hebrew_month_string (h->hd_mon, s));
505 return (format_date);
506 }
507 else
508 {
509 snprintf (temp, 500, "%s, %s %s",
510 hdate_get_day_string (h->hd_dw, s),
511 hdate_get_int_string (h->hd_day),
512 hdate_get_hebrew_month_string (h->hd_mon, s));
513 snprintf (format_date, 500, "%s %s",
514 temp,
515 hdate_get_int_string (h->hd_year));
516
517 /* if holyday print it */
518 holyday = hdate_get_holyday (h, diaspora);
519
520 if (holyday != 0)
521 {
522 snprintf (temp, 500, "%s, %s",
523 format_date,
524 hdate_get_holyday_string (holyday, 0));
525
526 return (temp);
527 }
528 else
529 return (format_date);
530 }
531 }
532
533 return NULL;
534 }
535
536 /**
537 @brief Return a static string, with the package name and version
538
539 @return a a static string, with the package name and version
540 */
541 char *
542 hdate_get_version_string ()
543 {
544 static char version[500];
545
546 /* make a "packge version" string */
547 snprintf (version, 500, "%s %s",
548 PACKAGE,
549 VERSION);
550
551 return (version);
552 }
553
554 /**
555 @brief Return a static string, with the name of translator
556
557 @return a a static string, with the name of translator
558 */
559 char *
560 hdate_get_translator_string ()
561 {
562 /* if untranslated return null */
563 if (strcmp (_("translator"), "translator") == 0)
564 return NULL;
565
566 /* return the translator name */
567 return _("translator");
568 }
0 .TH "hdate_struct" 3 "11 Nov 2005" "Version 1.4" "libhdate C language" \" -*- nroff -*-
1 .ad l
2 .nh
3 .SH NAME
4 hdate_struct \-
5 .SH SYNOPSIS
6 .br
7 .PP
8 \fC#include <hdate.h>\fP
9 .PP
10 .SS "Data Fields"
11
12 .in +1c
13 .ti -1c
14 .RI "int \fBhd_day\fP"
15 .br
16 .ti -1c
17 .RI "int \fBhd_mon\fP"
18 .br
19 .ti -1c
20 .RI "int \fBhd_year\fP"
21 .br
22 .ti -1c
23 .RI "int \fBgd_day\fP"
24 .br
25 .ti -1c
26 .RI "int \fBgd_mon\fP"
27 .br
28 .ti -1c
29 .RI "int \fBgd_year\fP"
30 .br
31 .ti -1c
32 .RI "int \fBhd_dw\fP"
33 .br
34 .ti -1c
35 .RI "int \fBhd_size_of_year\fP"
36 .br
37 .ti -1c
38 .RI "int \fBhd_new_year_dw\fP"
39 .br
40 .ti -1c
41 .RI "int \fBhd_year_type\fP"
42 .br
43 .ti -1c
44 .RI "int \fBhd_jd\fP"
45 .br
46 .ti -1c
47 .RI "int \fBhd_days\fP"
48 .br
49 .ti -1c
50 .RI "int \fBhd_weeks\fP"
51 .br
52 .in -1c
53 .SH "Detailed Description"
54 .PP
55 Base structore for hebrew dates
56 .PP
57 .SH "Field Documentation"
58 .PP
59 .SS "int \fBhdate_struct::hd_day\fP"
60 .PP
61 The number of day in the hebrew month (1..31).
62 .SS "int \fBhdate_struct::hd_mon\fP"
63 .PP
64 The number of the hebrew month 1..14 (1 - tishre, 13 - adar 1, 14 - adar 2).
65 .SS "int \fBhdate_struct::hd_year\fP"
66 .PP
67 The number of the hebrew year.
68 .SS "int \fBhdate_struct::gd_day\fP"
69 .PP
70 The number of the day in the month. (1..31)
71 .SS "int \fBhdate_struct::gd_mon\fP"
72 .PP
73 The number of the month 1..12 (1 - jan).
74 .SS "int \fBhdate_struct::gd_year\fP"
75 .PP
76 The number of the year.
77 .SS "int \fBhdate_struct::hd_dw\fP"
78 .PP
79 The day of the week 1..7 (1 - sunday).
80 .SS "int \fBhdate_struct::hd_size_of_year\fP"
81 .PP
82 The length of the year in days.
83 .SS "int \fBhdate_struct::hd_new_year_dw\fP"
84 .PP
85 The week day of Hebrew new year.
86 .SS "int \fBhdate_struct::hd_year_type\fP"
87 .PP
88 The number type of year.
89 .SS "int \fBhdate_struct::hd_jd\fP"
90 .PP
91 The Julian day number
92 .SS "int \fBhdate_struct::hd_days\fP"
93 .PP
94 The number of days passed since 1 tishrey
95 .SS "int \fBhdate_struct::hd_weeks\fP"
96 .PP
97 The number of weeks passed since 1 tishrey
98
99 .SH "Author"
100 .PP
101 Generated automatically by Doxygen for libhdate C language from the source code.
0 /* libhdate
1 * Copyright 2004-2005 Yaacov Zamir <kzamir@walla.co.il>
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Library General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16 */
17
18 /*
19 * Algorithm from http://www.srrb.noaa.gov/highlights/sunrise/calcdetails.html
20 * The low accuracy solar position equations are used.
21 * These routines are based on Jean Meeus's book Astronomical Algorithms.
22 */
23
24 #include <time.h>
25 #include <stdio.h>
26 #include <math.h>
27
28 #include "hdate.h"
29 #include "support.h"
30
31 /**
32 @brief days from 1 january
33
34 @parm day this day of month
35 @parm month this month
36 @parm year this year
37 @return the days from 1 jan
38 */
39 int
40 hdate_get_day_of_year (int day, int month, int year)
41 {
42 int jd;
43
44 /* get todays julian day number */
45 jd = (1461 * (year + 4800 + (month - 14) / 12)) / 4 +
46 (367 * (month - 2 - 12 * ((month - 14) / 12))) / 12 -
47 (3 * ((year + 4900 + (month - 14) / 12) / 100)) / 4 + day;
48
49 /* substruct the julian day of 1/1/year and add one */
50 jd = jd - ((1461 * (year + 4799)) / 4 +
51 367 * 11 / 12 - (3 * ((year + 4899) / 100)) / 4);
52
53 return jd;
54 }
55
56 /**
57 @brief utc sun times for altitude at a gregorian date
58
59 @parm day this day of month
60 @parm month this month
61 @parm year this year
62 @parm longitude longitude to use in calculations
63 @parm latitude latitude to use in calculations
64 @parm deg degrees of sun's altitude (0 - Zenith .. 90 - Horizon)
65 @parm sunrise return the utc sunrise in minutes
66 @parm sunset return the utc sunset in minutes
67 */
68 void
69 hdate_get_utc_sun_time_deg (int day, int month, int year, double latitude, double longitude, double deg, int *sunrise, int *sunset)
70 {
71 double gama; /* location of sun in yearly cycle in radians */
72 double eqtime; /* diffference betwen sun noon and clock noon */
73 double decl; /* sun declanation */
74 double ha; /* solar hour engle */
75 double sunrise_angle = M_PI * deg / 180.0; /* sun angle at sunrise/set */
76
77 int day_of_year;
78
79 /* get the day of year */
80 day_of_year = hdate_get_day_of_year (day, month, year);
81
82 /* get radians of sun orbit around erth =) */
83 gama = 2.0 * M_PI * ((double)(day_of_year - 1) / 365.0);
84
85 /* get the diff betwen suns clock and wall clock in minutes */
86 eqtime = 229.18 * (0.000075 + 0.001868 * cos (gama)
87 - 0.032077 * sin (gama) - 0.014615 * cos (2.0 * gama)
88 - 0.040849 * sin (2.0 * gama));
89
90 /* calculate suns declanation at the equater in radians */
91 decl = 0.006918 - 0.399912 * cos (gama) + 0.070257 * sin (gama)
92 - 0.006758 * cos (2.0 * gama) + 0.000907 * sin (2.0 * gama)
93 - 0.002697 * cos (3.0 * gama) + 0.00148 * sin (3.0 * gama);
94
95 /* we use radians, ratio is 2pi/360 */
96 latitude = M_PI * latitude / 180.0;
97
98 /* the sun real time diff from noon at sunset/rise in radians */
99 ha = acos (cos (sunrise_angle) / (cos (latitude) * cos (decl)) - tan (latitude) * tan (decl));
100
101 /* we use minutes, ratio is 1440min/2pi */
102 ha = 720.0 * ha / M_PI;
103
104 /* get sunset/rise times in utc wall clock in minutes from 00:00 time */
105 *sunrise = (int)(720.0 + 4.0 * longitude - ha - eqtime);
106 *sunset = (int)(720.0 + 4.0 * longitude + ha - eqtime);
107
108 return;
109 }
110
111 /**
112 @brief utc sunrise/set time for a gregorian date
113
114 @parm day this day of month
115 @parm month this month
116 @parm year this year
117 @parm longitude longitude to use in calculations
118 @parm latitude latitude to use in calculations
119 @parm sunrise return the utc sunrise in minutes
120 @parm sunset return the utc sunset in minutes
121 */
122 void
123 hdate_get_utc_sun_time (int day, int month, int year, double latitude, double longitude, int *sunrise, int *sunset)
124 {
125 hdate_get_utc_sun_time_deg (day, month, year, latitude, longitude, 90.833, sunrise, sunset);
126
127 return;
128 }
129
130 /**
131 @brief utc sunrise/set time for a gregorian date
132
133 @parm day this day of month
134 @parm month this month
135 @parm year this year
136 @parm longitude longitude to use in calculations
137 @parm latitude latitude to use in calculations
138 @parm sun_hour return the length of shaa zaminit in minutes
139 @parm first_light return the utc alut ha-shachar in minutes
140 @parm talit return the utc tphilin and talit in minutes
141 @parm sunrise return the utc sunrise in minutes
142 @parm midday return the utc midday in minutes
143 @parm sunset return the utc sunset in minutes
144 @parm first_stars return the utc tzeit hacochavim in minutes
145 @parm three_stars return the utc shlosha cochavim in minutes
146 */
147 void
148 hdate_get_utc_sun_time_full (int day, int month, int year, double latitude, double longitude,
149 int *sun_hour, int *first_light, int *talit, int *sunrise,
150 int *midday, int *sunset, int *first_stars, int *three_stars)
151 {
152 int place_holder;
153
154 /* sunset and rise time */
155 hdate_get_utc_sun_time_deg (day, month, year, latitude, longitude, 90.833, sunrise, sunset);
156
157 /* shaa zmanit by gara, 1/12 of light time */
158 *sun_hour = (*sunset - *sunrise) / 12;
159 *midday = (*sunset + *sunrise) / 2;
160
161 /* get times of the different sun angles */
162 hdate_get_utc_sun_time_deg (day, month, year, latitude, longitude, 106.01, first_light, &place_holder);
163 hdate_get_utc_sun_time_deg (day, month, year, latitude, longitude, 101.0, talit, &place_holder);
164 hdate_get_utc_sun_time_deg (day, month, year, latitude, longitude, 96.0, &place_holder, first_stars);
165 hdate_get_utc_sun_time_deg (day, month, year, latitude, longitude, 98.5, &place_holder, three_stars);
166
167 return;
168 }
0 /* libhdate
1 * Copyright 2004-2005 Yaacov Zamir <kzamir@walla.co.il>
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Library General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16 */
17
18 /*
19 * See Amos Shapir hdate_README file attached for
20 * Copyright notice for functions based on Amos's code
21 */
22
23 #ifndef __HDATE_PP_H__
24 #define __HDATE_PP_H__
25
26 #include <hdate.h>
27
28 /**
29 @brief the libhdate namespace.
30 */
31 namespace hdate
32 {
33 /**
34 @brief Hdate class.
35
36 class for Hebrew/Gregorian date conversions
37 */
38 class Hdate;
39
40 /**
41 @brief Hdate class.
42
43 class for Hebrew/Gregorian date conversions
44 */
45 class Hdate
46 {
47
48 public:
49 ////////////////////////////////////////
50 ////////////////////////////////////////
51
52 /**
53 @brief Hdate constructor.
54 */
55 Hdate()
56 {
57 /* default is this day */
58 h = new_hdate();
59
60 /* default is in israel */
61 diaspora = HDATA_ISRAEL_FLAG;
62
63 /* default localeconv is Tel-Aviv winter time */
64 latitude = 32.0;
65 longitude = -34.0;
66 tz = 2;
67 }
68
69 /**
70 @brief Hdate destructor.
71 */
72 ~Hdate()
73 {
74 delete_hdate(h);
75 }
76
77 ////////////////////////////////////////
78 ////////////////////////////////////////
79
80 /**
81 @brief compute date structure from the Gregorian date
82
83 @param d Day of month 1..31
84 @param m Month 1..12 , if m or d is 0 return current date.
85 @param y Year in 4 digits e.g. 2001
86 */
87 void
88 set_gdate (int d, int m, int y)
89 {
90 hdate_set_gdate (h, d, m, y);
91 }
92
93 /**
94 @brief compute date structure from the Hebrew date
95
96 @param d Day of month 1..31
97 @param m Month 1..14 , if m or d is 0 return current date.
98 @param y Year in 4 digits e.g. 5731
99 */
100 void
101 set_hdate (int d, int m, int y)
102 {
103 hdate_set_hdate (h, d, m, y);
104 }
105
106 /**
107 @brief compute date structure from the Julian day
108
109 @param jd the julian day number.
110 */
111 void
112 set_jd (int jd)
113 {
114 hdate_set_jd (h, jd);
115 }
116
117 ////////////////////////////////////////
118 ////////////////////////////////////////
119
120 /**
121 @brief get formated hebrew date.
122
123 return the short ( e.g. "1 Tishrey" ) or
124 long (e.g. "Tuesday 18 Tishrey 5763 Hol hamoed Sukot" ) formated date.
125
126 @param s short flag.
127 @return a static string of foramted date
128 */
129 char *
130 get_format_date (int s)
131 {
132 return hdate_get_format_date (h, diaspora, s);
133 }
134
135 /**
136 @brief get name of week day.
137
138 @param s short flag
139 true - returns a short string: sun, false returns: sunday.
140 @return a static string of the day of the week
141 */
142 char *
143 get_day_of_week_string (int s)
144 {
145 return hdate_get_day_string (h->hd_dw, s);
146 }
147
148 /**
149 @brief get name month.
150
151 @param s short flag
152 true - returns a short string: Mar, false returns: March.
153 @return a static string of month name
154 */
155 char *
156 get_month_string (int s)
157 {
158 return hdate_get_month_string (h->gd_mon, s);
159 }
160
161 /**
162 @brief get name hebrew month.
163
164 @param s short flag
165 true - returns a short string.
166 @return a static string of hebrew month name
167 */
168 char *
169 get_hebrew_month_string (int s)
170 {
171 return hdate_get_hebrew_month_string (h->hd_mon, s);
172 }
173
174 /**
175 @brief get name hebrew holiday.
176
177 @param s short flag
178 true - returns a short string.
179 @return a static string of hebrew holiday name
180 */
181 char *
182 get_holyday_string (int s)
183 {
184 int holyday;
185
186 holyday = hdate_get_holyday (h, diaspora);
187 return hdate_get_holyday_string (holyday, s);
188 }
189
190 /**
191 @brief get the hebrew holiday type.
192
193 @return the holiday type
194 (1- regular holyday, 2- three regels, 3- tzom, 0- no holiday)
195 */
196 int
197 get_holyday_type ()
198 {
199 int holyday;
200
201 holyday = hdate_get_holyday (h, diaspora);
202 return hdate_get_holyday_type (holyday);
203 }
204
205 /**
206 @brief get name hebrew parasha.
207
208 @param s short flag
209 true - returns a short string.
210 @return a static string of hebrew parash name
211 */
212 char *
213 get_parasha_string (int s)
214 {
215 int parasha;
216
217 parasha = hdate_get_parasha (h, diaspora);
218 return hdate_get_parasha_string (parasha, s);
219 }
220
221 /**
222 @brief get name hebrew year.
223
224 @return a static string of hebrew year
225 */
226 char *
227 get_hebrew_year_string ()
228 {
229 return hdate_get_int_string (h->hd_year);
230 }
231
232 /**
233 @brief get name hebrew hebrew day of the month
234
235 @return a static string of hebrew day of the month
236 */
237 char *
238 get_hebrew_day_string ()
239 {
240 return hdate_get_int_string (h->hd_day);
241 }
242
243 ////////////////////////////////////////
244 ////////////////////////////////////////
245
246 /**
247 @brief get parash number
248
249 @return the hebrew parasha number
250 */
251 int
252 get_parasha ()
253 {
254 return hdate_get_parasha (h, diaspora);
255 }
256
257 /**
258 @brief get holiday number
259 @return the hebrew holiday number
260 */
261 int
262 get_holyday ()
263 {
264 return hdate_get_holyday (h, diaspora);
265 }
266
267 /**
268 @brief get Gregorian day of the month
269
270 @return the Gregorian day of the month
271 */
272 int
273 get_gday ()
274 {
275 return hdate_get_gday (h);
276 }
277
278 /**
279 @brief get Gregorian month
280
281 @return the Gregorian month
282 */
283 int
284 get_gmonth ()
285 {
286 return hdate_get_gmonth (h);
287 }
288
289 /**
290 @brief get Gregorian year
291
292 @return the Gregorian year
293 */
294 int
295 get_gyear ()
296 {
297 return hdate_get_gyear (h);
298 }
299
300 /**
301 @brief get Hebrew day of the month
302
303 @return the Hebrew day of the month
304 */
305 int
306 get_hday ()
307 {
308 return hdate_get_hday (h);
309 }
310
311 /**
312 @brief get Hebrew month
313
314 @return the Hebrew month
315 */
316 int
317 get_hmonth ()
318 {
319 return hdate_get_hmonth (h);
320 }
321
322 /**
323 @brief get Hebrew year
324
325 @return the Hebrew year
326 */
327 int
328 get_hyear ()
329 {
330 return hdate_get_hyear (h);
331 }
332
333 /**
334 @brief get the day of the week
335
336 @return the day of the week
337 */
338 int
339 get_day_of_the_week ()
340 {
341 return hdate_get_day_of_the_week (h);
342 }
343
344 /**
345 @brief get the size of the Hebrew year in days
346
347 @return the size of the Hebrew year in days
348 */
349 int
350 get_size_of_year ()
351 {
352 return hdate_get_size_of_year (h);
353 }
354
355 /**
356 @brief get the day of the week of hebrew new years
357
358 @return the day of the week of hebrew new years
359 */
360 int
361 get_new_year_day_of_the_week ()
362 {
363 return hdate_get_new_year_day_of_the_week (h);
364 }
365
366 /**
367 @brief get the Julian day number
368
369 @return the Julian day number
370 */
371 int
372 get_julian ()
373 {
374 return hdate_get_julian (h);
375 }
376
377 /**
378 @brief get the number of days sice Tishrey I
379
380 @return the the number of days sice Tishrey I
381 */
382 int
383 get_days ()
384 {
385 return hdate_get_days (h);
386 }
387
388 /**
389 @brief get the number of weeks sice Tishrey I
390
391 @return the the number of weeks sice Tishrey I
392 */
393 int
394 get_weeks ()
395 {
396 return hdate_get_weeks (h);
397 }
398
399 ////////////////////////////////////////
400 ////////////////////////////////////////
401
402 /**
403 @brief set location
404
405 @param in_longitude longitude to use in calculations
406 degrees, negative values are east
407 @param in_latitude latitude to use in calculations
408 degrees, negative values are south
409 @param in_tz time zone
410 */
411 void
412 set_location (double in_latitude, double in_longitude, int in_tz)
413 {
414 latitude = in_latitude;
415 longitude = in_longitude;
416 tz = in_tz;
417 }
418
419 /**
420 @brief sunrise time
421
422 @return sunrise in minutes after midnight (00:00)
423 */
424 int
425 get_sunrise ()
426 {
427 int sunrise;
428 int sunset;
429
430 hdate_get_utc_sun_time (h->gd_day, h->gd_mon, h->gd_year,
431 latitude, longitude,
432 &sunrise, &sunset);
433
434 return sunrise + tz * 60;
435 }
436
437 /**
438 @brief sunset time
439
440 @return sunset in minutes after midnight (00:00)
441 */
442 int
443 get_sunset ()
444 {
445 int sunrise;
446 int sunset;
447
448 hdate_get_utc_sun_time (h->gd_day, h->gd_mon, h->gd_year,
449 latitude, longitude,
450 &sunrise, &sunset);
451
452 return sunset + tz * 60;
453 }
454
455 /**
456 @brief first light time
457
458 @return first light in minutes after midnight (00:00)
459 */
460 int
461 get_first_light ()
462 {
463 int sunrise;
464 int sunset;
465
466 hdate_get_utc_sun_time_deg (h->gd_day, h->gd_mon, h->gd_year,
467 latitude, longitude, 106.01,
468 &sunrise, &sunset);
469
470 return sunrise + tz * 60;
471 }
472
473 /**
474 @brief talit time
475
476 @return talit time in minutes after midnight (00:00)
477 */
478 int
479 get_talit ()
480 {
481 int sunrise;
482 int sunset;
483
484 hdate_get_utc_sun_time_deg (h->gd_day, h->gd_mon, h->gd_year,
485 latitude, longitude, 101.0,
486 &sunrise, &sunset);
487
488 return sunrise + tz * 60;
489 }
490
491 /**
492 @brief first stars time
493
494 @return first stars in minutes after midnight (00:00)
495 */
496 int
497 get_first_stars ()
498 {
499 int sunrise;
500 int sunset;
501
502 hdate_get_utc_sun_time_deg (h->gd_day, h->gd_mon, h->gd_year,
503 latitude, longitude, 96.0,
504 &sunrise, &sunset);
505
506 return sunset + tz * 60;
507 }
508
509 /**
510 @brief three stars time
511
512 @return three stars in minutes after midnight (00:00)
513 */
514 int
515 get_three_stars ()
516 {
517 int sunrise;
518 int sunset;
519
520 hdate_get_utc_sun_time_deg (h->gd_day, h->gd_mon, h->gd_year,
521 latitude, longitude, 98.5,
522 &sunrise, &sunset);
523
524 return sunset + tz * 60;
525 }
526
527 /**
528 @brief sun light hour time
529
530 @return sun light hour in minutes
531 */
532 int
533 get_sun_hour ()
534 {
535 int sunrise;
536 int sunset;
537
538 hdate_get_utc_sun_time (h->gd_day, h->gd_mon, h->gd_year,
539 latitude, longitude,
540 &sunrise, &sunset);
541
542 return (sunset - sunrise) / 12;
543 }
544
545 /**
546 @brief midday hour time
547
548 @return midday hour in minutes
549 */
550 int
551 get_midday ()
552 {
553 int sunrise;
554 int sunset;
555
556 hdate_get_utc_sun_time (h->gd_day, h->gd_mon, h->gd_year,
557 latitude, longitude,
558 &sunrise, &sunset);
559
560 return (sunset + sunrise) / 2;
561 }
562
563 ////////////////////////////////////////
564 ////////////////////////////////////////
565
566 /**
567 @brief name of translator
568
569 @return a static string with name of translator, or NULL if none
570 */
571 char *
572 get_translator_string ()
573 {
574 return hdate_get_translator_string ();
575 }
576
577 /**
578 @brief set this hdate object to use diaspora holidays and dates
579 */
580 void
581 set_diaspora ()
582 {
583 diaspora = HDATA_DIASPORA_FLAG;
584 }
585
586 /**
587 @brief set this hdate object to use israel holidays and dates
588 */
589 void
590 set_israel ()
591 {
592 diaspora = HDATA_ISRAEL_FLAG;
593 }
594
595 private:
596
597 int diaspora;
598 double latitude;
599 double longitude;
600 int tz;
601 hdate_struct *h;
602
603 };
604
605 } // name space
606
607 #endif
0 /* libhdate
1 * Copyright 2004-2005 Yaacov Zamir <kzamir@walla.co.il>
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Library General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16 */
17
18 /*
19 * macros.
20 */
21
22 /*
23 * define TRUE/FLASE if not defined
24 */
25 #ifndef FALSE
26 #define FALSE 0
27 #endif
28
29 #ifndef TRUE
30 #define TRUE -1
31 #endif
32
33 /*
34 * Standard gettext macros.
35 */
36 #ifdef ENABLE_NLS
37 # include <libintl.h>
38 # undef _
39 # define _(String) dgettext (PACKAGE, String)
40 # ifdef gettext_noop
41 # define N_(String) gettext_noop (String)
42 # else
43 # define N_(String) (String)
44 # endif
45 #else
46 # define textdomain(String) (String)
47 # define gettext(String) (String)
48 # define dgettext(Domain,Message) (Message)
49 # define dcgettext(Domain,Message,Type) (Message)
50 # define bindtextdomain(Domain,Directory) (Domain)
51 # define _(String) (String)
52 # define N_(String) (String)
53 #endif