Codebase list libhdate / f4620b2
Copy /branches/upstream/current to /branches/upstream/1.4.2, so svn-upgrade could do it job in the future Lior Kaplan 18 years ago
119 changed file(s) with 71377 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.2)
1
2 * Ido Kanner <idokan@gmail.com> - Update free pascal bindings.
3 * Update address of Free Software Foundatio in COPYING file.
4 * make the spec.in file more configurable.
5
6 -- Yaacov Zamir <kzamir@wall.co.il> Fri, 25 Nov 2005 12:13
7
8 libhdate (1.4.0)
9
10 * Michael Kaminsky - libhdate now reports the 2nd day of yom
11 tov on Sukkot and Peseach as Yom Tov and not Chol Hamoed.
12 * Cange C++ API - insert the location and diaspora flag as
13 part of the hdate object.
14 * Docomentation - separate the c and the cpp docs, more readable.
15 * hdate example can now export iCal formated output.
16
17 -- Yaacov Zamir <kzamir@wall.co.il> Mon, 8 Aug 2005 22:13
18
19 libhdate (1.3.1)
20
21 * Add "const correctness" patch from Markus Elfring (elfring).
22 * Manual page seems to contain a hyphen where a minus sign was
23 intended, patch by Lior Kaplan.
24 * Remove the debian directory from the ziped package.
25
26 -- Yaacov Zamir <kzamir@wall.co.il> Sat, 30 Jul 2005 22:13
27
28 libhdate (1.3.0)
29
30 * Add examples to the doc directory
31 * doc directory is now /usr/doc/libhdate0 and no /usr/doc/hdate
32 * make int_to_string aware of LANGUAGE system variable, make it more gettext compatible
33
34 -- Yaacov Zamir <kzamir@wall.co.il> Wed, 27 Jul 2005 18:13
35
36 libhdate (1.0.1)
37
38 * first major reales number.
39 * start to number the shared library.
40 * stable api.
41 * updated utility programs hdate/hcal.
42 * added man files for library and utility programs.
43 * python and perl bindings.
44 * free pascal binding by Ido Kanner <idokan@gmail.com>
45 * ru, fr, he, es translations, thanks to Peled Esti and Boris Peterberg.
46 * added debian dir and RH spec file for easy packing, thanks to Oron Peled.
47
48 -- Yaacov Zamir <kzamir@wall.co.il> Tue, 08 March 2005 18:13
49
50 libhdate (0.30.0)
51
52 * add es_MX translation by Peled Esti <esti@actcom.co.il>
53 * initial russian translation by Boris Peterberg
54
55 -- Yaacov Zamir <kzamir@wall.co.il> Tue, 08 March 2005 18:13
56
57 libhdate (0.30.0)
58
59 * cpp, python and perl bindings
60 * examples for the new libhdate bindings
61
62 -- Yaacov Zamir <kzamir@wall.co.il> Fri, 04 March 2005 15:19:29
63
64 libhdate (0.22.0)
65
66 * Michael Kaminsky's patch to Shavot II on diaspora reading.
67
68 -- Yaacov Zamir <kzamir@wall.co.il> Mon, 28 Feb 2005 08:12:31
69
70 libhdate (0.22.0)
71
72 * New hebcal examples
73
74 -- Yaacov Zamir <kzamir@wall.co.il> Fri, 25 Feb 2005 11:15:18
75
76 libhdate (0.21.0)
77
78 * New spec file by Oron Peled
79 * Diaspora holydays/readings
80 * New sunrise sunset functions
81 * New html examples
82 * New configure options to build / not build the examples
83
84 -- Yaacov Zamir <kzamir@wall.co.il> Fri, 25 Feb 2005 11:15:18
85
86 libhdate (0.17.0)
87
88 * API chages.
89 * base struct change.
90
91 -- Yaacov Zamir <kzamir@wall.co.il> Mon, 22 Feb 2005 19:34:22
92
93 libhdate (0.16.3)
94
95 * Try to fix date conversion bug, thanks Michael Kaminsky.
96
97 -- Yaacov Zamir <kzamir@wall.co.il> Mon, 21 Feb 2005 09:03:12
98
99 libhdate (0.16.2)
100
101 * Syntax error, and weeks calculation bug fixed by Michael Kaminsky.
102
103 -- Yaacov Zamir <kzamir@wall.co.il> Sun, 20 Feb 2005 06:53:12
104
105 libhdate (0.16.1)
106
107 * Fix locale bug in int_to_string.
108 * Add examples directory.
109 * Minor bug fixes.
110
111 -- 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 47 Debian 1.5.20-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 "$DLLTOOL" && DLLTOOL=dlltool
1164 test -z "$LD" && LD=ld
1165 test -z "$LN_S" && LN_S="ln -s"
1166 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1167 test -z "$NM" && NM=nm
1168 test -z "$SED" && SED=sed
1169 test -z "$OBJDUMP" && OBJDUMP=objdump
1170 test -z "$RANLIB" && RANLIB=:
1171 test -z "$STRIP" && STRIP=:
1172 test -z "$ac_objext" && ac_objext=o
1173
1174 # Determine commands to create old-style static archives.
1175 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1176 old_postinstall_cmds='chmod 644 $oldlib'
1177 old_postuninstall_cmds=
1178
1179 if test -n "$RANLIB"; then
1180 case $host_os in
1181 openbsd*)
1182 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1183 ;;
1184 *)
1185 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1186 ;;
1187 esac
1188 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1189 fi
1190
1191 _LT_CC_BASENAME([$compiler])
1192
1193 # Only perform the check for file, if the check method requires it
1194 case $deplibs_check_method in
1195 file_magic*)
1196 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1197 AC_PATH_MAGIC
1198 fi
1199 ;;
1200 esac
1201
1202 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1203 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1204 enable_win32_dll=yes, enable_win32_dll=no)
1205
1206 AC_ARG_ENABLE([libtool-lock],
1207 [AC_HELP_STRING([--disable-libtool-lock],
1208 [avoid locking (might break parallel builds)])])
1209 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1210
1211 AC_ARG_WITH([pic],
1212 [AC_HELP_STRING([--with-pic],
1213 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1214 [pic_mode="$withval"],
1215 [pic_mode=default])
1216 test -z "$pic_mode" && pic_mode=default
1217
1218 # Use C for the default configuration in the libtool script
1219 tagname=
1220 AC_LIBTOOL_LANG_C_CONFIG
1221 _LT_AC_TAGCONFIG
1222 ])# AC_LIBTOOL_SETUP
1223
1224
1225 # _LT_AC_SYS_COMPILER
1226 # -------------------
1227 AC_DEFUN([_LT_AC_SYS_COMPILER],
1228 [AC_REQUIRE([AC_PROG_CC])dnl
1229
1230 # If no C compiler was specified, use CC.
1231 LTCC=${LTCC-"$CC"}
1232
1233 # Allow CC to be a program name with arguments.
1234 compiler=$CC
1235 ])# _LT_AC_SYS_COMPILER
1236
1237
1238 # _LT_CC_BASENAME(CC)
1239 # -------------------
1240 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1241 AC_DEFUN([_LT_CC_BASENAME],
1242 [for cc_temp in $1""; do
1243 case $cc_temp in
1244 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1245 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1246 \-*) ;;
1247 *) break;;
1248 esac
1249 done
1250 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1251 ])
1252
1253
1254 # _LT_COMPILER_BOILERPLATE
1255 # ------------------------
1256 # Check for compiler boilerplate output or warnings with
1257 # the simple compiler test code.
1258 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1259 [ac_outfile=conftest.$ac_objext
1260 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
1261 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
1262 _lt_compiler_boilerplate=`cat conftest.err`
1263 $rm conftest*
1264 ])# _LT_COMPILER_BOILERPLATE
1265
1266
1267 # _LT_LINKER_BOILERPLATE
1268 # ----------------------
1269 # Check for linker boilerplate output or warnings with
1270 # the simple link test code.
1271 AC_DEFUN([_LT_LINKER_BOILERPLATE],
1272 [ac_outfile=conftest.$ac_objext
1273 printf "$lt_simple_link_test_code" >conftest.$ac_ext
1274 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
1275 _lt_linker_boilerplate=`cat conftest.err`
1276 $rm conftest*
1277 ])# _LT_LINKER_BOILERPLATE
1278
1279
1280 # _LT_AC_SYS_LIBPATH_AIX
1281 # ----------------------
1282 # Links a minimal program and checks the executable
1283 # for the system default hardcoded library path. In most cases,
1284 # this is /usr/lib:/lib, but when the MPI compilers are used
1285 # the location of the communication and MPI libs are included too.
1286 # If we don't find anything, use the default library path according
1287 # to the aix ld manual.
1288 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1289 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1290 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1291 }'`
1292 # Check for a 64-bit object if we didn't find anything.
1293 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; }
1294 }'`; fi],[])
1295 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1296 ])# _LT_AC_SYS_LIBPATH_AIX
1297
1298
1299 # _LT_AC_SHELL_INIT(ARG)
1300 # ----------------------
1301 AC_DEFUN([_LT_AC_SHELL_INIT],
1302 [ifdef([AC_DIVERSION_NOTICE],
1303 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1304 [AC_DIVERT_PUSH(NOTICE)])
1305 $1
1306 AC_DIVERT_POP
1307 ])# _LT_AC_SHELL_INIT
1308
1309
1310 # _LT_AC_PROG_ECHO_BACKSLASH
1311 # --------------------------
1312 # Add some code to the start of the generated configure script which
1313 # will find an echo command which doesn't interpret backslashes.
1314 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1315 [_LT_AC_SHELL_INIT([
1316 # Check that we are running under the correct shell.
1317 SHELL=${CONFIG_SHELL-/bin/sh}
1318
1319 case X$ECHO in
1320 X*--fallback-echo)
1321 # Remove one level of quotation (which was required for Make).
1322 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1323 ;;
1324 esac
1325
1326 echo=${ECHO-echo}
1327 if test "X[$]1" = X--no-reexec; then
1328 # Discard the --no-reexec flag, and continue.
1329 shift
1330 elif test "X[$]1" = X--fallback-echo; then
1331 # Avoid inline document here, it may be left over
1332 :
1333 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1334 # Yippee, $echo works!
1335 :
1336 else
1337 # Restart under the correct shell.
1338 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1339 fi
1340
1341 if test "X[$]1" = X--fallback-echo; then
1342 # used as fallback echo
1343 shift
1344 cat <<EOF
1345 [$]*
1346 EOF
1347 exit 0
1348 fi
1349
1350 # The HP-UX ksh and POSIX shell print the target directory to stdout
1351 # if CDPATH is set.
1352 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1353
1354 if test -z "$ECHO"; then
1355 if test "X${echo_test_string+set}" != Xset; then
1356 # find a string as large as possible, as long as the shell can cope with it
1357 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1358 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1359 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1360 echo_test_string=`eval $cmd` &&
1361 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1362 then
1363 break
1364 fi
1365 done
1366 fi
1367
1368 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1369 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1370 test "X$echo_testing_string" = "X$echo_test_string"; then
1371 :
1372 else
1373 # The Solaris, AIX, and Digital Unix default echo programs unquote
1374 # backslashes. This makes it impossible to quote backslashes using
1375 # echo "$something" | sed 's/\\/\\\\/g'
1376 #
1377 # So, first we look for a working echo in the user's PATH.
1378
1379 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1380 for dir in $PATH /usr/ucb; do
1381 IFS="$lt_save_ifs"
1382 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1383 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1384 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1385 test "X$echo_testing_string" = "X$echo_test_string"; then
1386 echo="$dir/echo"
1387 break
1388 fi
1389 done
1390 IFS="$lt_save_ifs"
1391
1392 if test "X$echo" = Xecho; then
1393 # We didn't find a better echo, so look for alternatives.
1394 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1395 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1396 test "X$echo_testing_string" = "X$echo_test_string"; then
1397 # This shell has a builtin print -r that does the trick.
1398 echo='print -r'
1399 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1400 test "X$CONFIG_SHELL" != X/bin/ksh; then
1401 # If we have ksh, try running configure again with it.
1402 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1403 export ORIGINAL_CONFIG_SHELL
1404 CONFIG_SHELL=/bin/ksh
1405 export CONFIG_SHELL
1406 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1407 else
1408 # Try using printf.
1409 echo='printf %s\n'
1410 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1411 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1412 test "X$echo_testing_string" = "X$echo_test_string"; then
1413 # Cool, printf works
1414 :
1415 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1416 test "X$echo_testing_string" = 'X\t' &&
1417 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1418 test "X$echo_testing_string" = "X$echo_test_string"; then
1419 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1420 export CONFIG_SHELL
1421 SHELL="$CONFIG_SHELL"
1422 export SHELL
1423 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1424 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1425 test "X$echo_testing_string" = 'X\t' &&
1426 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1427 test "X$echo_testing_string" = "X$echo_test_string"; then
1428 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1429 else
1430 # maybe with a smaller string...
1431 prev=:
1432
1433 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1434 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1435 then
1436 break
1437 fi
1438 prev="$cmd"
1439 done
1440
1441 if test "$prev" != 'sed 50q "[$]0"'; then
1442 echo_test_string=`eval $prev`
1443 export echo_test_string
1444 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1445 else
1446 # Oops. We lost completely, so just stick with echo.
1447 echo=echo
1448 fi
1449 fi
1450 fi
1451 fi
1452 fi
1453 fi
1454
1455 # Copy echo and quote the copy suitably for passing to libtool from
1456 # the Makefile, instead of quoting the original, which is used later.
1457 ECHO=$echo
1458 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1459 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1460 fi
1461
1462 AC_SUBST(ECHO)
1463 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1464
1465
1466 # _LT_AC_LOCK
1467 # -----------
1468 AC_DEFUN([_LT_AC_LOCK],
1469 [AC_ARG_ENABLE([libtool-lock],
1470 [AC_HELP_STRING([--disable-libtool-lock],
1471 [avoid locking (might break parallel builds)])])
1472 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1473
1474 # Some flags need to be propagated to the compiler or linker for good
1475 # libtool support.
1476 case $host in
1477 ia64-*-hpux*)
1478 # Find out which ABI we are using.
1479 echo 'int i;' > conftest.$ac_ext
1480 if AC_TRY_EVAL(ac_compile); then
1481 case `/usr/bin/file conftest.$ac_objext` in
1482 *ELF-32*)
1483 HPUX_IA64_MODE="32"
1484 ;;
1485 *ELF-64*)
1486 HPUX_IA64_MODE="64"
1487 ;;
1488 esac
1489 fi
1490 rm -rf conftest*
1491 ;;
1492 *-*-irix6*)
1493 # Find out which ABI we are using.
1494 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1495 if AC_TRY_EVAL(ac_compile); then
1496 if test "$lt_cv_prog_gnu_ld" = yes; then
1497 case `/usr/bin/file conftest.$ac_objext` in
1498 *32-bit*)
1499 LD="${LD-ld} -melf32bsmip"
1500 ;;
1501 *N32*)
1502 LD="${LD-ld} -melf32bmipn32"
1503 ;;
1504 *64-bit*)
1505 LD="${LD-ld} -melf64bmip"
1506 ;;
1507 esac
1508 else
1509 case `/usr/bin/file conftest.$ac_objext` in
1510 *32-bit*)
1511 LD="${LD-ld} -32"
1512 ;;
1513 *N32*)
1514 LD="${LD-ld} -n32"
1515 ;;
1516 *64-bit*)
1517 LD="${LD-ld} -64"
1518 ;;
1519 esac
1520 fi
1521 fi
1522 rm -rf conftest*
1523 ;;
1524
1525 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1526 # Find out which ABI we are using.
1527 echo 'int i;' > conftest.$ac_ext
1528 if AC_TRY_EVAL(ac_compile); then
1529 case `/usr/bin/file conftest.o` in
1530 *32-bit*)
1531 case $host in
1532 x86_64-*linux*)
1533 LD="${LD-ld} -m elf_i386"
1534 ;;
1535 ppc64-*linux*|powerpc64-*linux*)
1536 LD="${LD-ld} -m elf32ppclinux"
1537 ;;
1538 s390x-*linux*)
1539 LD="${LD-ld} -m elf_s390"
1540 ;;
1541 sparc64-*linux*)
1542 LD="${LD-ld} -m elf32_sparc"
1543 ;;
1544 esac
1545 ;;
1546 *64-bit*)
1547 case $host in
1548 x86_64-*linux*)
1549 LD="${LD-ld} -m elf_x86_64"
1550 ;;
1551 ppc*-*linux*|powerpc*-*linux*)
1552 LD="${LD-ld} -m elf64ppc"
1553 ;;
1554 s390*-*linux*)
1555 LD="${LD-ld} -m elf64_s390"
1556 ;;
1557 sparc*-*linux*)
1558 LD="${LD-ld} -m elf64_sparc"
1559 ;;
1560 esac
1561 ;;
1562 esac
1563 fi
1564 rm -rf conftest*
1565 ;;
1566
1567 *-*-sco3.2v5*)
1568 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1569 SAVE_CFLAGS="$CFLAGS"
1570 CFLAGS="$CFLAGS -belf"
1571 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1572 [AC_LANG_PUSH(C)
1573 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1574 AC_LANG_POP])
1575 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1576 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1577 CFLAGS="$SAVE_CFLAGS"
1578 fi
1579 ;;
1580 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1581 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1582 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1583 AC_CHECK_TOOL(AS, as, false)
1584 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1585 ;;
1586 ])
1587 esac
1588
1589 need_locks="$enable_libtool_lock"
1590
1591 ])# _LT_AC_LOCK
1592
1593
1594 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1595 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1596 # ----------------------------------------------------------------
1597 # Check whether the given compiler option works
1598 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1599 [AC_REQUIRE([LT_AC_PROG_SED])
1600 AC_CACHE_CHECK([$1], [$2],
1601 [$2=no
1602 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1603 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1604 lt_compiler_flag="$3"
1605 # Insert the option either (1) after the last *FLAGS variable, or
1606 # (2) before a word containing "conftest.", or (3) at the end.
1607 # Note that $ac_compile itself does not contain backslashes and begins
1608 # with a dollar sign (not a hyphen), so the echo should work correctly.
1609 # The option is referenced via a variable to avoid confusing sed.
1610 lt_compile=`echo "$ac_compile" | $SED \
1611 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1612 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1613 -e 's:$: $lt_compiler_flag:'`
1614 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1615 (eval "$lt_compile" 2>conftest.err)
1616 ac_status=$?
1617 cat conftest.err >&AS_MESSAGE_LOG_FD
1618 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1619 if (exit $ac_status) && test -s "$ac_outfile"; then
1620 # The compiler can only warn and ignore the option if not recognized
1621 # So say no if there are warnings other than the usual output.
1622 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
1623 $SED '/^$/d' conftest.err >conftest.er2
1624 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
1625 $2=yes
1626 fi
1627 fi
1628 $rm conftest*
1629 ])
1630
1631 if test x"[$]$2" = xyes; then
1632 ifelse([$5], , :, [$5])
1633 else
1634 ifelse([$6], , :, [$6])
1635 fi
1636 ])# AC_LIBTOOL_COMPILER_OPTION
1637
1638
1639 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1640 # [ACTION-SUCCESS], [ACTION-FAILURE])
1641 # ------------------------------------------------------------
1642 # Check whether the given compiler option works
1643 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1644 [AC_CACHE_CHECK([$1], [$2],
1645 [$2=no
1646 save_LDFLAGS="$LDFLAGS"
1647 LDFLAGS="$LDFLAGS $3"
1648 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1649 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1650 # The linker can only warn and ignore the option if not recognized
1651 # So say no if there are warnings
1652 if test -s conftest.err; then
1653 # Append any errors to the config.log.
1654 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1655 $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
1656 $SED '/^$/d' conftest.err >conftest.er2
1657 if diff conftest.exp conftest.er2 >/dev/null; then
1658 $2=yes
1659 fi
1660 else
1661 $2=yes
1662 fi
1663 fi
1664 $rm conftest*
1665 LDFLAGS="$save_LDFLAGS"
1666 ])
1667
1668 if test x"[$]$2" = xyes; then
1669 ifelse([$4], , :, [$4])
1670 else
1671 ifelse([$5], , :, [$5])
1672 fi
1673 ])# AC_LIBTOOL_LINKER_OPTION
1674
1675
1676 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1677 # --------------------------
1678 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1679 [# find the maximum length of command line arguments
1680 AC_MSG_CHECKING([the maximum length of command line arguments])
1681 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1682 i=0
1683 teststring="ABCD"
1684
1685 case $build_os in
1686 msdosdjgpp*)
1687 # On DJGPP, this test can blow up pretty badly due to problems in libc
1688 # (any single argument exceeding 2000 bytes causes a buffer overrun
1689 # during glob expansion). Even if it were fixed, the result of this
1690 # check would be larger than it should be.
1691 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1692 ;;
1693
1694 gnu*)
1695 # Under GNU Hurd, this test is not required because there is
1696 # no limit to the length of command line arguments.
1697 # Libtool will interpret -1 as no limit whatsoever
1698 lt_cv_sys_max_cmd_len=-1;
1699 ;;
1700
1701 cygwin* | mingw*)
1702 # On Win9x/ME, this test blows up -- it succeeds, but takes
1703 # about 5 minutes as the teststring grows exponentially.
1704 # Worse, since 9x/ME are not pre-emptively multitasking,
1705 # you end up with a "frozen" computer, even though with patience
1706 # the test eventually succeeds (with a max line length of 256k).
1707 # Instead, let's just punt: use the minimum linelength reported by
1708 # all of the supported platforms: 8192 (on NT/2K/XP).
1709 lt_cv_sys_max_cmd_len=8192;
1710 ;;
1711
1712 amigaos*)
1713 # On AmigaOS with pdksh, this test takes hours, literally.
1714 # So we just punt and use a minimum line length of 8192.
1715 lt_cv_sys_max_cmd_len=8192;
1716 ;;
1717
1718 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1719 # This has been around since 386BSD, at least. Likely further.
1720 if test -x /sbin/sysctl; then
1721 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1722 elif test -x /usr/sbin/sysctl; then
1723 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1724 else
1725 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1726 fi
1727 # And add a safety zone
1728 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1729 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1730 ;;
1731 osf*)
1732 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1733 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1734 # nice to cause kernel panics so lets avoid the loop below.
1735 # First set a reasonable default.
1736 lt_cv_sys_max_cmd_len=16384
1737 #
1738 if test -x /sbin/sysconfig; then
1739 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1740 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1741 esac
1742 fi
1743 ;;
1744 *)
1745 # If test is not a shell built-in, we'll probably end up computing a
1746 # maximum length that is only half of the actual maximum length, but
1747 # we can't tell.
1748 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1749 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1750 = "XX$teststring") >/dev/null 2>&1 &&
1751 new_result=`expr "X$teststring" : ".*" 2>&1` &&
1752 lt_cv_sys_max_cmd_len=$new_result &&
1753 test $i != 17 # 1/2 MB should be enough
1754 do
1755 i=`expr $i + 1`
1756 teststring=$teststring$teststring
1757 done
1758 teststring=
1759 # Add a significant safety factor because C++ compilers can tack on massive
1760 # amounts of additional arguments before passing them to the linker.
1761 # It appears as though 1/2 is a usable value.
1762 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1763 ;;
1764 esac
1765 ])
1766 if test -n $lt_cv_sys_max_cmd_len ; then
1767 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1768 else
1769 AC_MSG_RESULT(none)
1770 fi
1771 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1772
1773
1774 # _LT_AC_CHECK_DLFCN
1775 # --------------------
1776 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1777 [AC_CHECK_HEADERS(dlfcn.h)dnl
1778 ])# _LT_AC_CHECK_DLFCN
1779
1780
1781 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1782 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1783 # ------------------------------------------------------------------
1784 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1785 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1786 if test "$cross_compiling" = yes; then :
1787 [$4]
1788 else
1789 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1790 lt_status=$lt_dlunknown
1791 cat > conftest.$ac_ext <<EOF
1792 [#line __oline__ "configure"
1793 #include "confdefs.h"
1794
1795 #if HAVE_DLFCN_H
1796 #include <dlfcn.h>
1797 #endif
1798
1799 #include <stdio.h>
1800
1801 #ifdef RTLD_GLOBAL
1802 # define LT_DLGLOBAL RTLD_GLOBAL
1803 #else
1804 # ifdef DL_GLOBAL
1805 # define LT_DLGLOBAL DL_GLOBAL
1806 # else
1807 # define LT_DLGLOBAL 0
1808 # endif
1809 #endif
1810
1811 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1812 find out it does not work in some platform. */
1813 #ifndef LT_DLLAZY_OR_NOW
1814 # ifdef RTLD_LAZY
1815 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1816 # else
1817 # ifdef DL_LAZY
1818 # define LT_DLLAZY_OR_NOW DL_LAZY
1819 # else
1820 # ifdef RTLD_NOW
1821 # define LT_DLLAZY_OR_NOW RTLD_NOW
1822 # else
1823 # ifdef DL_NOW
1824 # define LT_DLLAZY_OR_NOW DL_NOW
1825 # else
1826 # define LT_DLLAZY_OR_NOW 0
1827 # endif
1828 # endif
1829 # endif
1830 # endif
1831 #endif
1832
1833 #ifdef __cplusplus
1834 extern "C" void exit (int);
1835 #endif
1836
1837 void fnord() { int i=42;}
1838 int main ()
1839 {
1840 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1841 int status = $lt_dlunknown;
1842
1843 if (self)
1844 {
1845 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1846 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1847 /* dlclose (self); */
1848 }
1849
1850 exit (status);
1851 }]
1852 EOF
1853 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1854 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1855 lt_status=$?
1856 case x$lt_status in
1857 x$lt_dlno_uscore) $1 ;;
1858 x$lt_dlneed_uscore) $2 ;;
1859 x$lt_unknown|x*) $3 ;;
1860 esac
1861 else :
1862 # compilation failed
1863 $3
1864 fi
1865 fi
1866 rm -fr conftest*
1867 ])# _LT_AC_TRY_DLOPEN_SELF
1868
1869
1870 # AC_LIBTOOL_DLOPEN_SELF
1871 # -------------------
1872 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1873 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1874 if test "x$enable_dlopen" != xyes; then
1875 enable_dlopen=unknown
1876 enable_dlopen_self=unknown
1877 enable_dlopen_self_static=unknown
1878 else
1879 lt_cv_dlopen=no
1880 lt_cv_dlopen_libs=
1881
1882 case $host_os in
1883 beos*)
1884 lt_cv_dlopen="load_add_on"
1885 lt_cv_dlopen_libs=
1886 lt_cv_dlopen_self=yes
1887 ;;
1888
1889 mingw* | pw32*)
1890 lt_cv_dlopen="LoadLibrary"
1891 lt_cv_dlopen_libs=
1892 ;;
1893
1894 cygwin*)
1895 lt_cv_dlopen="dlopen"
1896 lt_cv_dlopen_libs=
1897 ;;
1898
1899 darwin*)
1900 # if libdl is installed we need to link against it
1901 AC_CHECK_LIB([dl], [dlopen],
1902 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1903 lt_cv_dlopen="dyld"
1904 lt_cv_dlopen_libs=
1905 lt_cv_dlopen_self=yes
1906 ])
1907 ;;
1908
1909 *)
1910 AC_CHECK_FUNC([shl_load],
1911 [lt_cv_dlopen="shl_load"],
1912 [AC_CHECK_LIB([dld], [shl_load],
1913 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1914 [AC_CHECK_FUNC([dlopen],
1915 [lt_cv_dlopen="dlopen"],
1916 [AC_CHECK_LIB([dl], [dlopen],
1917 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1918 [AC_CHECK_LIB([svld], [dlopen],
1919 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1920 [AC_CHECK_LIB([dld], [dld_link],
1921 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1922 ])
1923 ])
1924 ])
1925 ])
1926 ])
1927 ;;
1928 esac
1929
1930 if test "x$lt_cv_dlopen" != xno; then
1931 enable_dlopen=yes
1932 else
1933 enable_dlopen=no
1934 fi
1935
1936 case $lt_cv_dlopen in
1937 dlopen)
1938 save_CPPFLAGS="$CPPFLAGS"
1939 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1940
1941 save_LDFLAGS="$LDFLAGS"
1942 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1943
1944 save_LIBS="$LIBS"
1945 LIBS="$lt_cv_dlopen_libs $LIBS"
1946
1947 AC_CACHE_CHECK([whether a program can dlopen itself],
1948 lt_cv_dlopen_self, [dnl
1949 _LT_AC_TRY_DLOPEN_SELF(
1950 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1951 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1952 ])
1953
1954 if test "x$lt_cv_dlopen_self" = xyes; then
1955 LDFLAGS="$LDFLAGS $link_static_flag"
1956 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1957 lt_cv_dlopen_self_static, [dnl
1958 _LT_AC_TRY_DLOPEN_SELF(
1959 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1960 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1961 ])
1962 fi
1963
1964 CPPFLAGS="$save_CPPFLAGS"
1965 LDFLAGS="$save_LDFLAGS"
1966 LIBS="$save_LIBS"
1967 ;;
1968 esac
1969
1970 case $lt_cv_dlopen_self in
1971 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1972 *) enable_dlopen_self=unknown ;;
1973 esac
1974
1975 case $lt_cv_dlopen_self_static in
1976 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1977 *) enable_dlopen_self_static=unknown ;;
1978 esac
1979 fi
1980 ])# AC_LIBTOOL_DLOPEN_SELF
1981
1982
1983 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1984 # ---------------------------------
1985 # Check to see if options -c and -o are simultaneously supported by compiler
1986 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1987 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1988 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1989 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1990 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1991 $rm -r conftest 2>/dev/null
1992 mkdir conftest
1993 cd conftest
1994 mkdir out
1995 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1996
1997 lt_compiler_flag="-o out/conftest2.$ac_objext"
1998 # Insert the option either (1) after the last *FLAGS variable, or
1999 # (2) before a word containing "conftest.", or (3) at the end.
2000 # Note that $ac_compile itself does not contain backslashes and begins
2001 # with a dollar sign (not a hyphen), so the echo should work correctly.
2002 lt_compile=`echo "$ac_compile" | $SED \
2003 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2004 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2005 -e 's:$: $lt_compiler_flag:'`
2006 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2007 (eval "$lt_compile" 2>out/conftest.err)
2008 ac_status=$?
2009 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2010 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2011 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2012 then
2013 # The compiler can only warn and ignore the option if not recognized
2014 # So say no if there are warnings
2015 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
2016 $SED '/^$/d' out/conftest.err >out/conftest.er2
2017 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2018 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2019 fi
2020 fi
2021 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2022 $rm conftest*
2023 # SGI C++ compiler will create directory out/ii_files/ for
2024 # template instantiation
2025 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2026 $rm out/* && rmdir out
2027 cd ..
2028 rmdir conftest
2029 $rm conftest*
2030 ])
2031 ])# AC_LIBTOOL_PROG_CC_C_O
2032
2033
2034 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2035 # -----------------------------------------
2036 # Check to see if we can do hard links to lock some files if needed
2037 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2038 [AC_REQUIRE([_LT_AC_LOCK])dnl
2039
2040 hard_links="nottested"
2041 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2042 # do not overwrite the value of need_locks provided by the user
2043 AC_MSG_CHECKING([if we can lock with hard links])
2044 hard_links=yes
2045 $rm conftest*
2046 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2047 touch conftest.a
2048 ln conftest.a conftest.b 2>&5 || hard_links=no
2049 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2050 AC_MSG_RESULT([$hard_links])
2051 if test "$hard_links" = no; then
2052 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2053 need_locks=warn
2054 fi
2055 else
2056 need_locks=no
2057 fi
2058 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2059
2060
2061 # AC_LIBTOOL_OBJDIR
2062 # -----------------
2063 AC_DEFUN([AC_LIBTOOL_OBJDIR],
2064 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2065 [rm -f .libs 2>/dev/null
2066 mkdir .libs 2>/dev/null
2067 if test -d .libs; then
2068 lt_cv_objdir=.libs
2069 else
2070 # MS-DOS does not allow filenames that begin with a dot.
2071 lt_cv_objdir=_libs
2072 fi
2073 rmdir .libs 2>/dev/null])
2074 objdir=$lt_cv_objdir
2075 ])# AC_LIBTOOL_OBJDIR
2076
2077
2078 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2079 # ----------------------------------------------
2080 # Check hardcoding attributes.
2081 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2082 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2083 _LT_AC_TAGVAR(hardcode_action, $1)=
2084 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2085 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2086 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2087
2088 # We can hardcode non-existant directories.
2089 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2090 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2091 # have to relink, otherwise we might link with an installed library
2092 # when we should be linking with a yet-to-be-installed one
2093 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2094 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2095 # Linking always hardcodes the temporary library directory.
2096 _LT_AC_TAGVAR(hardcode_action, $1)=relink
2097 else
2098 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2099 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2100 fi
2101 else
2102 # We cannot hardcode anything, or else we can only hardcode existing
2103 # directories.
2104 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2105 fi
2106 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2107
2108 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2109 # Fast installation is not supported
2110 enable_fast_install=no
2111 elif test "$shlibpath_overrides_runpath" = yes ||
2112 test "$enable_shared" = no; then
2113 # Fast installation is not necessary
2114 enable_fast_install=needless
2115 fi
2116 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2117
2118
2119 # AC_LIBTOOL_SYS_LIB_STRIP
2120 # ------------------------
2121 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2122 [striplib=
2123 old_striplib=
2124 AC_MSG_CHECKING([whether stripping libraries is possible])
2125 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2126 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2127 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2128 AC_MSG_RESULT([yes])
2129 else
2130 # FIXME - insert some real tests, host_os isn't really good enough
2131 case $host_os in
2132 darwin*)
2133 if test -n "$STRIP" ; then
2134 striplib="$STRIP -x"
2135 AC_MSG_RESULT([yes])
2136 else
2137 AC_MSG_RESULT([no])
2138 fi
2139 ;;
2140 *)
2141 AC_MSG_RESULT([no])
2142 ;;
2143 esac
2144 fi
2145 ])# AC_LIBTOOL_SYS_LIB_STRIP
2146
2147
2148 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2149 # -----------------------------
2150 # PORTME Fill in your ld.so characteristics
2151 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2152 [AC_MSG_CHECKING([dynamic linker characteristics])
2153 library_names_spec=
2154 libname_spec='lib$name'
2155 soname_spec=
2156 shrext_cmds=".so"
2157 postinstall_cmds=
2158 postuninstall_cmds=
2159 finish_cmds=
2160 finish_eval=
2161 shlibpath_var=
2162 shlibpath_overrides_runpath=unknown
2163 version_type=none
2164 dynamic_linker="$host_os ld.so"
2165 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2166 if test "$GCC" = yes; then
2167 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2168 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2169 # if the path contains ";" then we assume it to be the separator
2170 # otherwise default to the standard path separator (i.e. ":") - it is
2171 # assumed that no part of a normal pathname contains ";" but that should
2172 # okay in the real world where ";" in dirpaths is itself problematic.
2173 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2174 else
2175 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2176 fi
2177 else
2178 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2179 fi
2180 need_lib_prefix=unknown
2181 hardcode_into_libs=no
2182
2183 # when you set need_version to no, make sure it does not cause -set_version
2184 # flags to be left without arguments
2185 need_version=unknown
2186
2187 case $host_os in
2188 aix3*)
2189 version_type=linux
2190 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2191 shlibpath_var=LIBPATH
2192
2193 # AIX 3 has no versioning support, so we append a major version to the name.
2194 soname_spec='${libname}${release}${shared_ext}$major'
2195 ;;
2196
2197 aix4* | aix5*)
2198 version_type=linux
2199 need_lib_prefix=no
2200 need_version=no
2201 hardcode_into_libs=yes
2202 if test "$host_cpu" = ia64; then
2203 # AIX 5 supports IA64
2204 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2205 shlibpath_var=LD_LIBRARY_PATH
2206 else
2207 # With GCC up to 2.95.x, collect2 would create an import file
2208 # for dependence libraries. The import file would start with
2209 # the line `#! .'. This would cause the generated library to
2210 # depend on `.', always an invalid library. This was fixed in
2211 # development snapshots of GCC prior to 3.0.
2212 case $host_os in
2213 aix4 | aix4.[[01]] | aix4.[[01]].*)
2214 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2215 echo ' yes '
2216 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2217 :
2218 else
2219 can_build_shared=no
2220 fi
2221 ;;
2222 esac
2223 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2224 # soname into executable. Probably we can add versioning support to
2225 # collect2, so additional links can be useful in future.
2226 if test "$aix_use_runtimelinking" = yes; then
2227 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2228 # instead of lib<name>.a to let people know that these are not
2229 # typical AIX shared libraries.
2230 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2231 else
2232 # We preserve .a as extension for shared libraries through AIX4.2
2233 # and later when we are not doing run time linking.
2234 library_names_spec='${libname}${release}.a $libname.a'
2235 soname_spec='${libname}${release}${shared_ext}$major'
2236 fi
2237 shlibpath_var=LIBPATH
2238 fi
2239 ;;
2240
2241 amigaos*)
2242 library_names_spec='$libname.ixlibrary $libname.a'
2243 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2244 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'
2245 ;;
2246
2247 beos*)
2248 library_names_spec='${libname}${shared_ext}'
2249 dynamic_linker="$host_os ld.so"
2250 shlibpath_var=LIBRARY_PATH
2251 ;;
2252
2253 bsdi[[45]]*)
2254 version_type=linux
2255 need_version=no
2256 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2257 soname_spec='${libname}${release}${shared_ext}$major'
2258 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2259 shlibpath_var=LD_LIBRARY_PATH
2260 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2261 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2262 # the default ld.so.conf also contains /usr/contrib/lib and
2263 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2264 # libtool to hard-code these into programs
2265 ;;
2266
2267 cygwin* | mingw* | pw32*)
2268 version_type=windows
2269 shrext_cmds=".dll"
2270 need_version=no
2271 need_lib_prefix=no
2272
2273 case $GCC,$host_os in
2274 yes,cygwin* | yes,mingw* | yes,pw32*)
2275 library_names_spec='$libname.dll.a'
2276 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2277 postinstall_cmds='base_file=`basename \${file}`~
2278 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2279 dldir=$destdir/`dirname \$dlpath`~
2280 test -d \$dldir || mkdir -p \$dldir~
2281 $install_prog $dir/$dlname \$dldir/$dlname~
2282 chmod a+x \$dldir/$dlname'
2283 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2284 dlpath=$dir/\$dldll~
2285 $rm \$dlpath'
2286 shlibpath_overrides_runpath=yes
2287
2288 case $host_os in
2289 cygwin*)
2290 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2291 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2292 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2293 ;;
2294 mingw*)
2295 # MinGW DLLs use traditional 'lib' prefix
2296 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2297 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2298 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2299 # It is most probably a Windows format PATH printed by
2300 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2301 # path with ; separators, and with drive letters. We can handle the
2302 # drive letters (cygwin fileutils understands them), so leave them,
2303 # especially as we might pass files found there to a mingw objdump,
2304 # which wouldn't understand a cygwinified path. Ahh.
2305 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2306 else
2307 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2308 fi
2309 ;;
2310 pw32*)
2311 # pw32 DLLs use 'pw' prefix rather than 'lib'
2312 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2313 ;;
2314 esac
2315 ;;
2316
2317 *)
2318 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2319 ;;
2320 esac
2321 dynamic_linker='Win32 ld.exe'
2322 # FIXME: first we should search . and the directory the executable is in
2323 shlibpath_var=PATH
2324 ;;
2325
2326 darwin* | rhapsody*)
2327 dynamic_linker="$host_os dyld"
2328 version_type=darwin
2329 need_lib_prefix=no
2330 need_version=no
2331 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2332 soname_spec='${libname}${release}${major}$shared_ext'
2333 shlibpath_overrides_runpath=yes
2334 shlibpath_var=DYLD_LIBRARY_PATH
2335 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2336 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2337 if test "$GCC" = yes; then
2338 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"`
2339 else
2340 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2341 fi
2342 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2343 ;;
2344
2345 dgux*)
2346 version_type=linux
2347 need_lib_prefix=no
2348 need_version=no
2349 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2350 soname_spec='${libname}${release}${shared_ext}$major'
2351 shlibpath_var=LD_LIBRARY_PATH
2352 ;;
2353
2354 freebsd1*)
2355 dynamic_linker=no
2356 ;;
2357
2358 kfreebsd*-gnu)
2359 version_type=linux
2360 need_lib_prefix=no
2361 need_version=no
2362 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2363 soname_spec='${libname}${release}${shared_ext}$major'
2364 shlibpath_var=LD_LIBRARY_PATH
2365 shlibpath_overrides_runpath=no
2366 hardcode_into_libs=yes
2367 dynamic_linker='GNU ld.so'
2368 ;;
2369
2370 freebsd* | dragonfly*)
2371 # DragonFly does not have aout. When/if they implement a new
2372 # versioning mechanism, adjust this.
2373 if test -x /usr/bin/objformat; then
2374 objformat=`/usr/bin/objformat`
2375 else
2376 case $host_os in
2377 freebsd[[123]]*) objformat=aout ;;
2378 *) objformat=elf ;;
2379 esac
2380 fi
2381 version_type=freebsd-$objformat
2382 case $version_type in
2383 freebsd-elf*)
2384 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2385 need_version=no
2386 need_lib_prefix=no
2387 ;;
2388 freebsd-*)
2389 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2390 need_version=yes
2391 ;;
2392 esac
2393 shlibpath_var=LD_LIBRARY_PATH
2394 case $host_os in
2395 freebsd2*)
2396 shlibpath_overrides_runpath=yes
2397 ;;
2398 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2399 shlibpath_overrides_runpath=yes
2400 hardcode_into_libs=yes
2401 ;;
2402 *) # from 3.2 on
2403 shlibpath_overrides_runpath=no
2404 hardcode_into_libs=yes
2405 ;;
2406 esac
2407 ;;
2408
2409 gnu*)
2410 version_type=linux
2411 need_lib_prefix=no
2412 need_version=no
2413 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2414 soname_spec='${libname}${release}${shared_ext}$major'
2415 shlibpath_var=LD_LIBRARY_PATH
2416 hardcode_into_libs=yes
2417 ;;
2418
2419 hpux9* | hpux10* | hpux11*)
2420 # Give a soname corresponding to the major version so that dld.sl refuses to
2421 # link against other versions.
2422 version_type=sunos
2423 need_lib_prefix=no
2424 need_version=no
2425 case $host_cpu in
2426 ia64*)
2427 shrext_cmds='.so'
2428 hardcode_into_libs=yes
2429 dynamic_linker="$host_os dld.so"
2430 shlibpath_var=LD_LIBRARY_PATH
2431 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2432 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2433 soname_spec='${libname}${release}${shared_ext}$major'
2434 if test "X$HPUX_IA64_MODE" = X32; then
2435 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2436 else
2437 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2438 fi
2439 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2440 ;;
2441 hppa*64*)
2442 shrext_cmds='.sl'
2443 hardcode_into_libs=yes
2444 dynamic_linker="$host_os dld.sl"
2445 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2446 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2447 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2448 soname_spec='${libname}${release}${shared_ext}$major'
2449 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2450 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2451 ;;
2452 *)
2453 shrext_cmds='.sl'
2454 dynamic_linker="$host_os dld.sl"
2455 shlibpath_var=SHLIB_PATH
2456 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
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 ;;
2460 esac
2461 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2462 postinstall_cmds='chmod 555 $lib'
2463 ;;
2464
2465 irix5* | irix6* | nonstopux*)
2466 case $host_os in
2467 nonstopux*) version_type=nonstopux ;;
2468 *)
2469 if test "$lt_cv_prog_gnu_ld" = yes; then
2470 version_type=linux
2471 else
2472 version_type=irix
2473 fi ;;
2474 esac
2475 need_lib_prefix=no
2476 need_version=no
2477 soname_spec='${libname}${release}${shared_ext}$major'
2478 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2479 case $host_os in
2480 irix5* | nonstopux*)
2481 libsuff= shlibsuff=
2482 ;;
2483 *)
2484 case $LD in # libtool.m4 will add one of these switches to LD
2485 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2486 libsuff= shlibsuff= libmagic=32-bit;;
2487 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2488 libsuff=32 shlibsuff=N32 libmagic=N32;;
2489 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2490 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2491 *) libsuff= shlibsuff= libmagic=never-match;;
2492 esac
2493 ;;
2494 esac
2495 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2496 shlibpath_overrides_runpath=no
2497 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2498 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2499 hardcode_into_libs=yes
2500 ;;
2501
2502 # No shared lib support for Linux oldld, aout, or coff.
2503 linux*oldld* | linux*aout* | linux*coff*)
2504 dynamic_linker=no
2505 ;;
2506
2507 # This must be Linux ELF.
2508 linux*)
2509 version_type=linux
2510 need_lib_prefix=no
2511 need_version=no
2512 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2513 soname_spec='${libname}${release}${shared_ext}$major'
2514 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2515 shlibpath_var=LD_LIBRARY_PATH
2516 shlibpath_overrides_runpath=no
2517 # This implies no fast_install, which is unacceptable.
2518 # Some rework will be needed to allow for fast_install
2519 # before this can be enabled.
2520 hardcode_into_libs=yes
2521
2522 # Append ld.so.conf contents to the search path
2523 if test -f /etc/ld.so.conf; then
2524 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' ' '`
2525 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2526 fi
2527
2528 # We used to test for /lib/ld.so.1 and disable shared libraries on
2529 # powerpc, because MkLinux only supported shared libraries with the
2530 # GNU dynamic linker. Since this was broken with cross compilers,
2531 # most powerpc-linux boxes support dynamic linking these days and
2532 # people can always --disable-shared, the test was removed, and we
2533 # assume the GNU/Linux dynamic linker is in use.
2534 dynamic_linker='GNU/Linux ld.so'
2535 ;;
2536
2537 netbsdelf*-gnu)
2538 version_type=linux
2539 need_lib_prefix=no
2540 need_version=no
2541 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2542 soname_spec='${libname}${release}${shared_ext}$major'
2543 shlibpath_var=LD_LIBRARY_PATH
2544 shlibpath_overrides_runpath=no
2545 hardcode_into_libs=yes
2546 dynamic_linker='NetBSD ld.elf_so'
2547 ;;
2548
2549 knetbsd*-gnu)
2550 version_type=linux
2551 need_lib_prefix=no
2552 need_version=no
2553 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2554 soname_spec='${libname}${release}${shared_ext}$major'
2555 shlibpath_var=LD_LIBRARY_PATH
2556 shlibpath_overrides_runpath=no
2557 hardcode_into_libs=yes
2558 dynamic_linker='GNU ld.so'
2559 ;;
2560
2561 netbsd*)
2562 version_type=sunos
2563 need_lib_prefix=no
2564 need_version=no
2565 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2566 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2567 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2568 dynamic_linker='NetBSD (a.out) ld.so'
2569 else
2570 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2571 soname_spec='${libname}${release}${shared_ext}$major'
2572 dynamic_linker='NetBSD ld.elf_so'
2573 fi
2574 shlibpath_var=LD_LIBRARY_PATH
2575 shlibpath_overrides_runpath=yes
2576 hardcode_into_libs=yes
2577 ;;
2578
2579 newsos6)
2580 version_type=linux
2581 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2582 shlibpath_var=LD_LIBRARY_PATH
2583 shlibpath_overrides_runpath=yes
2584 ;;
2585
2586 nto-qnx*)
2587 version_type=linux
2588 need_lib_prefix=no
2589 need_version=no
2590 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2591 soname_spec='${libname}${release}${shared_ext}$major'
2592 shlibpath_var=LD_LIBRARY_PATH
2593 shlibpath_overrides_runpath=yes
2594 ;;
2595
2596 openbsd*)
2597 version_type=sunos
2598 need_lib_prefix=no
2599 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2600 case $host_os in
2601 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2602 *) need_version=no ;;
2603 esac
2604 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2605 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2606 shlibpath_var=LD_LIBRARY_PATH
2607 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2608 case $host_os in
2609 openbsd2.[[89]] | openbsd2.[[89]].*)
2610 shlibpath_overrides_runpath=no
2611 ;;
2612 *)
2613 shlibpath_overrides_runpath=yes
2614 ;;
2615 esac
2616 else
2617 shlibpath_overrides_runpath=yes
2618 fi
2619 ;;
2620
2621 os2*)
2622 libname_spec='$name'
2623 shrext_cmds=".dll"
2624 need_lib_prefix=no
2625 library_names_spec='$libname${shared_ext} $libname.a'
2626 dynamic_linker='OS/2 ld.exe'
2627 shlibpath_var=LIBPATH
2628 ;;
2629
2630 osf3* | osf4* | osf5*)
2631 version_type=osf
2632 need_lib_prefix=no
2633 need_version=no
2634 soname_spec='${libname}${release}${shared_ext}$major'
2635 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2636 shlibpath_var=LD_LIBRARY_PATH
2637 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2638 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2639 ;;
2640
2641 sco3.2v5*)
2642 version_type=osf
2643 soname_spec='${libname}${release}${shared_ext}$major'
2644 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2645 shlibpath_var=LD_LIBRARY_PATH
2646 ;;
2647
2648 solaris*)
2649 version_type=linux
2650 need_lib_prefix=no
2651 need_version=no
2652 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2653 soname_spec='${libname}${release}${shared_ext}$major'
2654 shlibpath_var=LD_LIBRARY_PATH
2655 shlibpath_overrides_runpath=yes
2656 hardcode_into_libs=yes
2657 # ldd complains unless libraries are executable
2658 postinstall_cmds='chmod +x $lib'
2659 ;;
2660
2661 sunos4*)
2662 version_type=sunos
2663 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2664 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2665 shlibpath_var=LD_LIBRARY_PATH
2666 shlibpath_overrides_runpath=yes
2667 if test "$with_gnu_ld" = yes; then
2668 need_lib_prefix=no
2669 fi
2670 need_version=yes
2671 ;;
2672
2673 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2674 version_type=linux
2675 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2676 soname_spec='${libname}${release}${shared_ext}$major'
2677 shlibpath_var=LD_LIBRARY_PATH
2678 case $host_vendor in
2679 sni)
2680 shlibpath_overrides_runpath=no
2681 need_lib_prefix=no
2682 export_dynamic_flag_spec='${wl}-Blargedynsym'
2683 runpath_var=LD_RUN_PATH
2684 ;;
2685 siemens)
2686 need_lib_prefix=no
2687 ;;
2688 motorola)
2689 need_lib_prefix=no
2690 need_version=no
2691 shlibpath_overrides_runpath=no
2692 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2693 ;;
2694 esac
2695 ;;
2696
2697 sysv4*MP*)
2698 if test -d /usr/nec ;then
2699 version_type=linux
2700 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2701 soname_spec='$libname${shared_ext}.$major'
2702 shlibpath_var=LD_LIBRARY_PATH
2703 fi
2704 ;;
2705
2706 uts4*)
2707 version_type=linux
2708 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2709 soname_spec='${libname}${release}${shared_ext}$major'
2710 shlibpath_var=LD_LIBRARY_PATH
2711 ;;
2712
2713 *)
2714 dynamic_linker=no
2715 ;;
2716 esac
2717 AC_MSG_RESULT([$dynamic_linker])
2718 test "$dynamic_linker" = no && can_build_shared=no
2719 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2720
2721
2722 # _LT_AC_TAGCONFIG
2723 # ----------------
2724 AC_DEFUN([_LT_AC_TAGCONFIG],
2725 [AC_ARG_WITH([tags],
2726 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2727 [include additional configurations @<:@automatic@:>@])],
2728 [tagnames="$withval"])
2729
2730 if test -f "$ltmain" && test -n "$tagnames"; then
2731 if test ! -f "${ofile}"; then
2732 AC_MSG_WARN([output file `$ofile' does not exist])
2733 fi
2734
2735 if test -z "$LTCC"; then
2736 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2737 if test -z "$LTCC"; then
2738 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2739 else
2740 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2741 fi
2742 fi
2743
2744 # Extract list of available tagged configurations in $ofile.
2745 # Note that this assumes the entire list is on one line.
2746 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2747
2748 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2749 for tagname in $tagnames; do
2750 IFS="$lt_save_ifs"
2751 # Check whether tagname contains only valid characters
2752 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2753 "") ;;
2754 *) AC_MSG_ERROR([invalid tag name: $tagname])
2755 ;;
2756 esac
2757
2758 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2759 then
2760 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2761 fi
2762
2763 # Update the list of available tags.
2764 if test -n "$tagname"; then
2765 echo appending configuration tag \"$tagname\" to $ofile
2766
2767 case $tagname in
2768 CXX)
2769 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2770 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2771 (test "X$CXX" != "Xg++"))) ; then
2772 AC_LIBTOOL_LANG_CXX_CONFIG
2773 else
2774 tagname=""
2775 fi
2776 ;;
2777
2778 F77)
2779 if test -n "$F77" && test "X$F77" != "Xno"; then
2780 AC_LIBTOOL_LANG_F77_CONFIG
2781 else
2782 tagname=""
2783 fi
2784 ;;
2785
2786 GCJ)
2787 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2788 AC_LIBTOOL_LANG_GCJ_CONFIG
2789 else
2790 tagname=""
2791 fi
2792 ;;
2793
2794 RC)
2795 AC_LIBTOOL_LANG_RC_CONFIG
2796 ;;
2797
2798 *)
2799 AC_MSG_ERROR([Unsupported tag name: $tagname])
2800 ;;
2801 esac
2802
2803 # Append the new tag name to the list of available tags.
2804 if test -n "$tagname" ; then
2805 available_tags="$available_tags $tagname"
2806 fi
2807 fi
2808 done
2809 IFS="$lt_save_ifs"
2810
2811 # Now substitute the updated list of available tags.
2812 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2813 mv "${ofile}T" "$ofile"
2814 chmod +x "$ofile"
2815 else
2816 rm -f "${ofile}T"
2817 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2818 fi
2819 fi
2820 ])# _LT_AC_TAGCONFIG
2821
2822
2823 # AC_LIBTOOL_DLOPEN
2824 # -----------------
2825 # enable checks for dlopen support
2826 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2827 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2828 ])# AC_LIBTOOL_DLOPEN
2829
2830
2831 # AC_LIBTOOL_WIN32_DLL
2832 # --------------------
2833 # declare package support for building win32 DLLs
2834 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2835 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2836 ])# AC_LIBTOOL_WIN32_DLL
2837
2838
2839 # AC_ENABLE_SHARED([DEFAULT])
2840 # ---------------------------
2841 # implement the --enable-shared flag
2842 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2843 AC_DEFUN([AC_ENABLE_SHARED],
2844 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2845 AC_ARG_ENABLE([shared],
2846 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2847 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2848 [p=${PACKAGE-default}
2849 case $enableval in
2850 yes) enable_shared=yes ;;
2851 no) enable_shared=no ;;
2852 *)
2853 enable_shared=no
2854 # Look at the argument we got. We use all the common list separators.
2855 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2856 for pkg in $enableval; do
2857 IFS="$lt_save_ifs"
2858 if test "X$pkg" = "X$p"; then
2859 enable_shared=yes
2860 fi
2861 done
2862 IFS="$lt_save_ifs"
2863 ;;
2864 esac],
2865 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2866 ])# AC_ENABLE_SHARED
2867
2868
2869 # AC_DISABLE_SHARED
2870 # -----------------
2871 #- set the default shared flag to --disable-shared
2872 AC_DEFUN([AC_DISABLE_SHARED],
2873 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2874 AC_ENABLE_SHARED(no)
2875 ])# AC_DISABLE_SHARED
2876
2877
2878 # AC_ENABLE_STATIC([DEFAULT])
2879 # ---------------------------
2880 # implement the --enable-static flag
2881 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2882 AC_DEFUN([AC_ENABLE_STATIC],
2883 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2884 AC_ARG_ENABLE([static],
2885 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2886 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2887 [p=${PACKAGE-default}
2888 case $enableval in
2889 yes) enable_static=yes ;;
2890 no) enable_static=no ;;
2891 *)
2892 enable_static=no
2893 # Look at the argument we got. We use all the common list separators.
2894 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2895 for pkg in $enableval; do
2896 IFS="$lt_save_ifs"
2897 if test "X$pkg" = "X$p"; then
2898 enable_static=yes
2899 fi
2900 done
2901 IFS="$lt_save_ifs"
2902 ;;
2903 esac],
2904 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2905 ])# AC_ENABLE_STATIC
2906
2907
2908 # AC_DISABLE_STATIC
2909 # -----------------
2910 # set the default static flag to --disable-static
2911 AC_DEFUN([AC_DISABLE_STATIC],
2912 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2913 AC_ENABLE_STATIC(no)
2914 ])# AC_DISABLE_STATIC
2915
2916
2917 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2918 # ---------------------------------
2919 # implement the --enable-fast-install flag
2920 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2921 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2922 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2923 AC_ARG_ENABLE([fast-install],
2924 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2925 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2926 [p=${PACKAGE-default}
2927 case $enableval in
2928 yes) enable_fast_install=yes ;;
2929 no) enable_fast_install=no ;;
2930 *)
2931 enable_fast_install=no
2932 # Look at the argument we got. We use all the common list separators.
2933 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2934 for pkg in $enableval; do
2935 IFS="$lt_save_ifs"
2936 if test "X$pkg" = "X$p"; then
2937 enable_fast_install=yes
2938 fi
2939 done
2940 IFS="$lt_save_ifs"
2941 ;;
2942 esac],
2943 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2944 ])# AC_ENABLE_FAST_INSTALL
2945
2946
2947 # AC_DISABLE_FAST_INSTALL
2948 # -----------------------
2949 # set the default to --disable-fast-install
2950 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2951 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2952 AC_ENABLE_FAST_INSTALL(no)
2953 ])# AC_DISABLE_FAST_INSTALL
2954
2955
2956 # AC_LIBTOOL_PICMODE([MODE])
2957 # --------------------------
2958 # implement the --with-pic flag
2959 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2960 AC_DEFUN([AC_LIBTOOL_PICMODE],
2961 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2962 pic_mode=ifelse($#,1,$1,default)
2963 ])# AC_LIBTOOL_PICMODE
2964
2965
2966 # AC_PROG_EGREP
2967 # -------------
2968 # This is predefined starting with Autoconf 2.54, so this conditional
2969 # definition can be removed once we require Autoconf 2.54 or later.
2970 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2971 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2972 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2973 then ac_cv_prog_egrep='grep -E'
2974 else ac_cv_prog_egrep='egrep'
2975 fi])
2976 EGREP=$ac_cv_prog_egrep
2977 AC_SUBST([EGREP])
2978 ])])
2979
2980
2981 # AC_PATH_TOOL_PREFIX
2982 # -------------------
2983 # find a file program which can recognise shared library
2984 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2985 [AC_REQUIRE([AC_PROG_EGREP])dnl
2986 AC_MSG_CHECKING([for $1])
2987 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2988 [case $MAGIC_CMD in
2989 [[\\/*] | ?:[\\/]*])
2990 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2991 ;;
2992 *)
2993 lt_save_MAGIC_CMD="$MAGIC_CMD"
2994 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2995 dnl $ac_dummy forces splitting on constant user-supplied paths.
2996 dnl POSIX.2 word splitting is done only on the output of word expansions,
2997 dnl not every word. This closes a longstanding sh security hole.
2998 ac_dummy="ifelse([$2], , $PATH, [$2])"
2999 for ac_dir in $ac_dummy; do
3000 IFS="$lt_save_ifs"
3001 test -z "$ac_dir" && ac_dir=.
3002 if test -f $ac_dir/$1; then
3003 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3004 if test -n "$file_magic_test_file"; then
3005 case $deplibs_check_method in
3006 "file_magic "*)
3007 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3008 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3009 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3010 $EGREP "$file_magic_regex" > /dev/null; then
3011 :
3012 else
3013 cat <<EOF 1>&2
3014
3015 *** Warning: the command libtool uses to detect shared libraries,
3016 *** $file_magic_cmd, produces output that libtool cannot recognize.
3017 *** The result is that libtool may fail to recognize shared libraries
3018 *** as such. This will affect the creation of libtool libraries that
3019 *** depend on shared libraries, but programs linked with such libtool
3020 *** libraries will work regardless of this problem. Nevertheless, you
3021 *** may want to report the problem to your system manager and/or to
3022 *** bug-libtool@gnu.org
3023
3024 EOF
3025 fi ;;
3026 esac
3027 fi
3028 break
3029 fi
3030 done
3031 IFS="$lt_save_ifs"
3032 MAGIC_CMD="$lt_save_MAGIC_CMD"
3033 ;;
3034 esac])
3035 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3036 if test -n "$MAGIC_CMD"; then
3037 AC_MSG_RESULT($MAGIC_CMD)
3038 else
3039 AC_MSG_RESULT(no)
3040 fi
3041 ])# AC_PATH_TOOL_PREFIX
3042
3043
3044 # AC_PATH_MAGIC
3045 # -------------
3046 # find a file program which can recognise a shared library
3047 AC_DEFUN([AC_PATH_MAGIC],
3048 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3049 if test -z "$lt_cv_path_MAGIC_CMD"; then
3050 if test -n "$ac_tool_prefix"; then
3051 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3052 else
3053 MAGIC_CMD=:
3054 fi
3055 fi
3056 ])# AC_PATH_MAGIC
3057
3058
3059 # AC_PROG_LD
3060 # ----------
3061 # find the pathname to the GNU or non-GNU linker
3062 AC_DEFUN([AC_PROG_LD],
3063 [AC_ARG_WITH([gnu-ld],
3064 [AC_HELP_STRING([--with-gnu-ld],
3065 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3066 [test "$withval" = no || with_gnu_ld=yes],
3067 [with_gnu_ld=no])
3068 AC_REQUIRE([LT_AC_PROG_SED])dnl
3069 AC_REQUIRE([AC_PROG_CC])dnl
3070 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3071 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3072 ac_prog=ld
3073 if test "$GCC" = yes; then
3074 # Check if gcc -print-prog-name=ld gives a path.
3075 AC_MSG_CHECKING([for ld used by $CC])
3076 case $host in
3077 *-*-mingw*)
3078 # gcc leaves a trailing carriage return which upsets mingw
3079 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3080 *)
3081 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3082 esac
3083 case $ac_prog in
3084 # Accept absolute paths.
3085 [[\\/]]* | ?:[[\\/]]*)
3086 re_direlt='/[[^/]][[^/]]*/\.\./'
3087 # Canonicalize the pathname of ld
3088 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3089 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3090 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3091 done
3092 test -z "$LD" && LD="$ac_prog"
3093 ;;
3094 "")
3095 # If it fails, then pretend we aren't using GCC.
3096 ac_prog=ld
3097 ;;
3098 *)
3099 # If it is relative, then search for the first ld in PATH.
3100 with_gnu_ld=unknown
3101 ;;
3102 esac
3103 elif test "$with_gnu_ld" = yes; then
3104 AC_MSG_CHECKING([for GNU ld])
3105 else
3106 AC_MSG_CHECKING([for non-GNU ld])
3107 fi
3108 AC_CACHE_VAL(lt_cv_path_LD,
3109 [if test -z "$LD"; then
3110 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3111 for ac_dir in $PATH; do
3112 IFS="$lt_save_ifs"
3113 test -z "$ac_dir" && ac_dir=.
3114 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3115 lt_cv_path_LD="$ac_dir/$ac_prog"
3116 # Check to see if the program is GNU ld. I'd rather use --version,
3117 # but apparently some variants of GNU ld only accept -v.
3118 # Break only if it was the GNU/non-GNU ld that we prefer.
3119 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3120 *GNU* | *'with BFD'*)
3121 test "$with_gnu_ld" != no && break
3122 ;;
3123 *)
3124 test "$with_gnu_ld" != yes && break
3125 ;;
3126 esac
3127 fi
3128 done
3129 IFS="$lt_save_ifs"
3130 else
3131 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3132 fi])
3133 LD="$lt_cv_path_LD"
3134 if test -n "$LD"; then
3135 AC_MSG_RESULT($LD)
3136 else
3137 AC_MSG_RESULT(no)
3138 fi
3139 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3140 AC_PROG_LD_GNU
3141 ])# AC_PROG_LD
3142
3143
3144 # AC_PROG_LD_GNU
3145 # --------------
3146 AC_DEFUN([AC_PROG_LD_GNU],
3147 [AC_REQUIRE([AC_PROG_EGREP])dnl
3148 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3149 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3150 case `$LD -v 2>&1 </dev/null` in
3151 *GNU* | *'with BFD'*)
3152 lt_cv_prog_gnu_ld=yes
3153 ;;
3154 *)
3155 lt_cv_prog_gnu_ld=no
3156 ;;
3157 esac])
3158 with_gnu_ld=$lt_cv_prog_gnu_ld
3159 ])# AC_PROG_LD_GNU
3160
3161
3162 # AC_PROG_LD_RELOAD_FLAG
3163 # ----------------------
3164 # find reload flag for linker
3165 # -- PORTME Some linkers may need a different reload flag.
3166 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3167 [AC_CACHE_CHECK([for $LD option to reload object files],
3168 lt_cv_ld_reload_flag,
3169 [lt_cv_ld_reload_flag='-r'])
3170 reload_flag=$lt_cv_ld_reload_flag
3171 case $reload_flag in
3172 "" | " "*) ;;
3173 *) reload_flag=" $reload_flag" ;;
3174 esac
3175 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3176 case $host_os in
3177 darwin*)
3178 if test "$GCC" = yes; then
3179 reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
3180 else
3181 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3182 fi
3183 ;;
3184 esac
3185 ])# AC_PROG_LD_RELOAD_FLAG
3186
3187
3188 # AC_DEPLIBS_CHECK_METHOD
3189 # -----------------------
3190 # how to check for library dependencies
3191 # -- PORTME fill in with the dynamic library characteristics
3192 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3193 [AC_CACHE_CHECK([how to recognise dependent libraries],
3194 lt_cv_deplibs_check_method,
3195 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3196 lt_cv_file_magic_test_file=
3197 lt_cv_deplibs_check_method='unknown'
3198 # Need to set the preceding variable on all platforms that support
3199 # interlibrary dependencies.
3200 # 'none' -- dependencies not supported.
3201 # `unknown' -- same as none, but documents that we really don't know.
3202 # 'pass_all' -- all dependencies passed with no checks.
3203 # 'test_compile' -- check by making test program.
3204 # 'file_magic [[regex]]' -- check by looking for files in library path
3205 # which responds to the $file_magic_cmd with a given extended regex.
3206 # If you have `file' or equivalent on your system and you're not sure
3207 # whether `pass_all' will *always* work, you probably want this one.
3208
3209 case $host_os in
3210 aix4* | aix5*)
3211 lt_cv_deplibs_check_method=pass_all
3212 ;;
3213
3214 beos*)
3215 lt_cv_deplibs_check_method=pass_all
3216 ;;
3217
3218 bsdi[[45]]*)
3219 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3220 lt_cv_file_magic_cmd='/usr/bin/file -L'
3221 lt_cv_file_magic_test_file=/shlib/libc.so
3222 ;;
3223
3224 cygwin*)
3225 # func_win32_libid is a shell function defined in ltmain.sh
3226 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3227 lt_cv_file_magic_cmd='func_win32_libid'
3228 ;;
3229
3230 mingw* | pw32*)
3231 # Base MSYS/MinGW do not provide the 'file' command needed by
3232 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3233 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3234 lt_cv_file_magic_cmd='$OBJDUMP -f'
3235 ;;
3236
3237 darwin* | rhapsody*)
3238 lt_cv_deplibs_check_method=pass_all
3239 ;;
3240
3241 freebsd* | kfreebsd*-gnu | dragonfly*)
3242 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3243 case $host_cpu in
3244 i*86 )
3245 # Not sure whether the presence of OpenBSD here was a mistake.
3246 # Let's accept both of them until this is cleared up.
3247 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3248 lt_cv_file_magic_cmd=/usr/bin/file
3249 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3250 ;;
3251 esac
3252 else
3253 lt_cv_deplibs_check_method=pass_all
3254 fi
3255 ;;
3256
3257 gnu*)
3258 lt_cv_deplibs_check_method=pass_all
3259 ;;
3260
3261 hpux10.20* | hpux11*)
3262 lt_cv_file_magic_cmd=/usr/bin/file
3263 case $host_cpu in
3264 ia64*)
3265 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3266 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3267 ;;
3268 hppa*64*)
3269 [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]']
3270 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3271 ;;
3272 *)
3273 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3274 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3275 ;;
3276 esac
3277 ;;
3278
3279 irix5* | irix6* | nonstopux*)
3280 case $LD in
3281 *-32|*"-32 ") libmagic=32-bit;;
3282 *-n32|*"-n32 ") libmagic=N32;;
3283 *-64|*"-64 ") libmagic=64-bit;;
3284 *) libmagic=never-match;;
3285 esac
3286 lt_cv_deplibs_check_method=pass_all
3287 ;;
3288
3289 # This must be Linux ELF.
3290 linux*)
3291 lt_cv_deplibs_check_method=pass_all
3292 ;;
3293
3294 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
3295 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3296 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3297 else
3298 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3299 fi
3300 ;;
3301
3302 newos6*)
3303 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3304 lt_cv_file_magic_cmd=/usr/bin/file
3305 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3306 ;;
3307
3308 nto-qnx*)
3309 lt_cv_deplibs_check_method=unknown
3310 ;;
3311
3312 openbsd*)
3313 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3314 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3315 else
3316 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3317 fi
3318 ;;
3319
3320 osf3* | osf4* | osf5*)
3321 lt_cv_deplibs_check_method=pass_all
3322 ;;
3323
3324 sco3.2v5*)
3325 lt_cv_deplibs_check_method=pass_all
3326 ;;
3327
3328 solaris*)
3329 lt_cv_deplibs_check_method=pass_all
3330 ;;
3331
3332 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3333 case $host_vendor in
3334 motorola)
3335 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]]'
3336 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3337 ;;
3338 ncr)
3339 lt_cv_deplibs_check_method=pass_all
3340 ;;
3341 sequent)
3342 lt_cv_file_magic_cmd='/bin/file'
3343 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3344 ;;
3345 sni)
3346 lt_cv_file_magic_cmd='/bin/file'
3347 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3348 lt_cv_file_magic_test_file=/lib/libc.so
3349 ;;
3350 siemens)
3351 lt_cv_deplibs_check_method=pass_all
3352 ;;
3353 esac
3354 ;;
3355
3356 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3357 lt_cv_deplibs_check_method=pass_all
3358 ;;
3359 esac
3360 ])
3361 file_magic_cmd=$lt_cv_file_magic_cmd
3362 deplibs_check_method=$lt_cv_deplibs_check_method
3363 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3364 ])# AC_DEPLIBS_CHECK_METHOD
3365
3366
3367 # AC_PROG_NM
3368 # ----------
3369 # find the pathname to a BSD-compatible name lister
3370 AC_DEFUN([AC_PROG_NM],
3371 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3372 [if test -n "$NM"; then
3373 # Let the user override the test.
3374 lt_cv_path_NM="$NM"
3375 else
3376 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3377 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3378 IFS="$lt_save_ifs"
3379 test -z "$ac_dir" && ac_dir=.
3380 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3381 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3382 # Check to see if the nm accepts a BSD-compat flag.
3383 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3384 # nm: unknown option "B" ignored
3385 # Tru64's nm complains that /dev/null is an invalid object file
3386 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3387 */dev/null* | *'Invalid file or object type'*)
3388 lt_cv_path_NM="$tmp_nm -B"
3389 break
3390 ;;
3391 *)
3392 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3393 */dev/null*)
3394 lt_cv_path_NM="$tmp_nm -p"
3395 break
3396 ;;
3397 *)
3398 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3399 continue # so that we can try to find one that supports BSD flags
3400 ;;
3401 esac
3402 esac
3403 fi
3404 done
3405 IFS="$lt_save_ifs"
3406 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3407 fi])
3408 NM="$lt_cv_path_NM"
3409 ])# AC_PROG_NM
3410
3411
3412 # AC_CHECK_LIBM
3413 # -------------
3414 # check for math library
3415 AC_DEFUN([AC_CHECK_LIBM],
3416 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3417 LIBM=
3418 case $host in
3419 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3420 # These system don't have libm, or don't need it
3421 ;;
3422 *-ncr-sysv4.3*)
3423 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3424 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3425 ;;
3426 *)
3427 AC_CHECK_LIB(m, cos, LIBM="-lm")
3428 ;;
3429 esac
3430 ])# AC_CHECK_LIBM
3431
3432
3433 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3434 # -----------------------------------
3435 # sets LIBLTDL to the link flags for the libltdl convenience library and
3436 # LTDLINCL to the include flags for the libltdl header and adds
3437 # --enable-ltdl-convenience to the configure arguments. Note that
3438 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3439 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
3440 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3441 # (note the single quotes!). If your package is not flat and you're not
3442 # using automake, define top_builddir and top_srcdir appropriately in
3443 # the Makefiles.
3444 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3445 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3446 case $enable_ltdl_convenience in
3447 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3448 "") enable_ltdl_convenience=yes
3449 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3450 esac
3451 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3452 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3453 # For backwards non-gettext consistent compatibility...
3454 INCLTDL="$LTDLINCL"
3455 ])# AC_LIBLTDL_CONVENIENCE
3456
3457
3458 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3459 # -----------------------------------
3460 # sets LIBLTDL to the link flags for the libltdl installable library and
3461 # LTDLINCL to the include flags for the libltdl header and adds
3462 # --enable-ltdl-install to the configure arguments. Note that
3463 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3464 # and an installed libltdl is not found, it is assumed to be `libltdl'.
3465 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3466 # '${top_srcdir}/' (note the single quotes!). If your package is not
3467 # flat and you're not using automake, define top_builddir and top_srcdir
3468 # appropriately in the Makefiles.
3469 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3470 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3471 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3472 AC_CHECK_LIB(ltdl, lt_dlinit,
3473 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3474 [if test x"$enable_ltdl_install" = xno; then
3475 AC_MSG_WARN([libltdl not installed, but installation disabled])
3476 else
3477 enable_ltdl_install=yes
3478 fi
3479 ])
3480 if test x"$enable_ltdl_install" = x"yes"; then
3481 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3482 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3483 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3484 else
3485 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3486 LIBLTDL="-lltdl"
3487 LTDLINCL=
3488 fi
3489 # For backwards non-gettext consistent compatibility...
3490 INCLTDL="$LTDLINCL"
3491 ])# AC_LIBLTDL_INSTALLABLE
3492
3493
3494 # AC_LIBTOOL_CXX
3495 # --------------
3496 # enable support for C++ libraries
3497 AC_DEFUN([AC_LIBTOOL_CXX],
3498 [AC_REQUIRE([_LT_AC_LANG_CXX])
3499 ])# AC_LIBTOOL_CXX
3500
3501
3502 # _LT_AC_LANG_CXX
3503 # ---------------
3504 AC_DEFUN([_LT_AC_LANG_CXX],
3505 [AC_REQUIRE([AC_PROG_CXX])
3506 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3507 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3508 ])# _LT_AC_LANG_CXX
3509
3510 # _LT_AC_PROG_CXXCPP
3511 # ---------------
3512 AC_DEFUN([_LT_AC_PROG_CXXCPP],
3513 [
3514 AC_REQUIRE([AC_PROG_CXX])
3515 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3516 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3517 (test "X$CXX" != "Xg++"))) ; then
3518 AC_PROG_CXXCPP
3519 fi
3520 ])# _LT_AC_PROG_CXXCPP
3521
3522 # AC_LIBTOOL_F77
3523 # --------------
3524 # enable support for Fortran 77 libraries
3525 AC_DEFUN([AC_LIBTOOL_F77],
3526 [AC_REQUIRE([_LT_AC_LANG_F77])
3527 ])# AC_LIBTOOL_F77
3528
3529
3530 # _LT_AC_LANG_F77
3531 # ---------------
3532 AC_DEFUN([_LT_AC_LANG_F77],
3533 [AC_REQUIRE([AC_PROG_F77])
3534 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3535 ])# _LT_AC_LANG_F77
3536
3537
3538 # AC_LIBTOOL_GCJ
3539 # --------------
3540 # enable support for GCJ libraries
3541 AC_DEFUN([AC_LIBTOOL_GCJ],
3542 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3543 ])# AC_LIBTOOL_GCJ
3544
3545
3546 # _LT_AC_LANG_GCJ
3547 # ---------------
3548 AC_DEFUN([_LT_AC_LANG_GCJ],
3549 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3550 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3551 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3552 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3553 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3554 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3555 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3556 ])# _LT_AC_LANG_GCJ
3557
3558
3559 # AC_LIBTOOL_RC
3560 # --------------
3561 # enable support for Windows resource files
3562 AC_DEFUN([AC_LIBTOOL_RC],
3563 [AC_REQUIRE([LT_AC_PROG_RC])
3564 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3565 ])# AC_LIBTOOL_RC
3566
3567
3568 # AC_LIBTOOL_LANG_C_CONFIG
3569 # ------------------------
3570 # Ensure that the configuration vars for the C compiler are
3571 # suitably defined. Those variables are subsequently used by
3572 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3573 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3574 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3575 [lt_save_CC="$CC"
3576 AC_LANG_PUSH(C)
3577
3578 # Source file extension for C test sources.
3579 ac_ext=c
3580
3581 # Object file extension for compiled C test sources.
3582 objext=o
3583 _LT_AC_TAGVAR(objext, $1)=$objext
3584
3585 # Code to be used in simple compile tests
3586 lt_simple_compile_test_code="int some_variable = 0;\n"
3587
3588 # Code to be used in simple link tests
3589 lt_simple_link_test_code='int main(){return(0);}\n'
3590
3591 _LT_AC_SYS_COMPILER
3592
3593 # save warnings/boilerplate of simple test code
3594 _LT_COMPILER_BOILERPLATE
3595 _LT_LINKER_BOILERPLATE
3596
3597 #
3598 # Check for any special shared library compilation flags.
3599 #
3600 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3601 if test "$GCC" = no; then
3602 case $host_os in
3603 sco3.2v5*)
3604 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3605 ;;
3606 esac
3607 fi
3608 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3609 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3610 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
3611 else
3612 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3613 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3614 fi
3615 fi
3616
3617
3618 #
3619 # Check to make sure the static flag actually works.
3620 #
3621 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3622 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3623 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3624 [],
3625 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3626
3627
3628 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3629 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3630 AC_LIBTOOL_PROG_CC_C_O($1)
3631 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3632 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3633 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3634 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3635 AC_LIBTOOL_SYS_LIB_STRIP
3636 AC_LIBTOOL_DLOPEN_SELF($1)
3637
3638 # Report which librarie types wil actually be built
3639 AC_MSG_CHECKING([if libtool supports shared libraries])
3640 AC_MSG_RESULT([$can_build_shared])
3641
3642 AC_MSG_CHECKING([whether to build shared libraries])
3643 test "$can_build_shared" = "no" && enable_shared=no
3644
3645 # On AIX, shared libraries and static libraries use the same namespace, and
3646 # are all built from PIC.
3647 case $host_os in
3648 aix3*)
3649 test "$enable_shared" = yes && enable_static=no
3650 if test -n "$RANLIB"; then
3651 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3652 postinstall_cmds='$RANLIB $lib'
3653 fi
3654 ;;
3655
3656 aix4* | aix5*)
3657 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3658 test "$enable_shared" = yes && enable_static=no
3659 fi
3660 ;;
3661 esac
3662 AC_MSG_RESULT([$enable_shared])
3663
3664 AC_MSG_CHECKING([whether to build static libraries])
3665 # Make sure either enable_shared or enable_static is yes.
3666 test "$enable_shared" = yes || enable_static=yes
3667 AC_MSG_RESULT([$enable_static])
3668
3669 AC_LIBTOOL_CONFIG($1)
3670
3671 AC_LANG_POP
3672 CC="$lt_save_CC"
3673 ])# AC_LIBTOOL_LANG_C_CONFIG
3674
3675
3676 # AC_LIBTOOL_LANG_CXX_CONFIG
3677 # --------------------------
3678 # Ensure that the configuration vars for the C compiler are
3679 # suitably defined. Those variables are subsequently used by
3680 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3681 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3682 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3683 [AC_LANG_PUSH(C++)
3684 AC_REQUIRE([AC_PROG_CXX])
3685 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3686
3687 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3688 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3689 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3690 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3691 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3692 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3693 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3694 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3695 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3696 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3697 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3698 _LT_AC_TAGVAR(module_cmds, $1)=
3699 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3700 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3701 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3702 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3703 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3704 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3705
3706 # Dependencies to place before and after the object being linked:
3707 _LT_AC_TAGVAR(predep_objects, $1)=
3708 _LT_AC_TAGVAR(postdep_objects, $1)=
3709 _LT_AC_TAGVAR(predeps, $1)=
3710 _LT_AC_TAGVAR(postdeps, $1)=
3711 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3712
3713 # Source file extension for C++ test sources.
3714 ac_ext=cpp
3715
3716 # Object file extension for compiled C++ test sources.
3717 objext=o
3718 _LT_AC_TAGVAR(objext, $1)=$objext
3719
3720 # Code to be used in simple compile tests
3721 lt_simple_compile_test_code="int some_variable = 0;\n"
3722
3723 # Code to be used in simple link tests
3724 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3725
3726 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3727 _LT_AC_SYS_COMPILER
3728
3729 # save warnings/boilerplate of simple test code
3730 _LT_COMPILER_BOILERPLATE
3731 _LT_LINKER_BOILERPLATE
3732
3733 # Allow CC to be a program name with arguments.
3734 lt_save_CC=$CC
3735 lt_save_LD=$LD
3736 lt_save_GCC=$GCC
3737 GCC=$GXX
3738 lt_save_with_gnu_ld=$with_gnu_ld
3739 lt_save_path_LD=$lt_cv_path_LD
3740 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3741 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3742 else
3743 unset lt_cv_prog_gnu_ld
3744 fi
3745 if test -n "${lt_cv_path_LDCXX+set}"; then
3746 lt_cv_path_LD=$lt_cv_path_LDCXX
3747 else
3748 unset lt_cv_path_LD
3749 fi
3750 test -z "${LDCXX+set}" || LD=$LDCXX
3751 CC=${CXX-"c++"}
3752 compiler=$CC
3753 _LT_AC_TAGVAR(compiler, $1)=$CC
3754 _LT_CC_BASENAME([$compiler])
3755
3756 # We don't want -fno-exception wen compiling C++ code, so set the
3757 # no_builtin_flag separately
3758 if test "$GXX" = yes; then
3759 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3760 else
3761 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3762 fi
3763
3764 if test "$GXX" = yes; then
3765 # Set up default GNU C++ configuration
3766
3767 AC_PROG_LD
3768
3769 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3770 # archiving commands below assume that GNU ld is being used.
3771 if test "$with_gnu_ld" = yes; then
3772 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3773 _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'
3774
3775 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3776 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3777
3778 # If archive_cmds runs LD, not CC, wlarc should be empty
3779 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3780 # investigate it a little bit more. (MM)
3781 wlarc='${wl}'
3782
3783 # ancient GNU ld didn't support --whole-archive et. al.
3784 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3785 grep 'no-whole-archive' > /dev/null; then
3786 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3787 else
3788 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3789 fi
3790 else
3791 with_gnu_ld=no
3792 wlarc=
3793
3794 # A generic and very simple default shared library creation
3795 # command for GNU C++ for the case where it uses the native
3796 # linker, instead of GNU ld. If possible, this setting should
3797 # overridden to take advantage of the native linker features on
3798 # the platform it is being used on.
3799 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3800 fi
3801
3802 # Commands to make compiler produce verbose output that lists
3803 # what "hidden" libraries, object files and flags are used when
3804 # linking a shared library.
3805 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3806
3807 else
3808 GXX=no
3809 with_gnu_ld=no
3810 wlarc=
3811 fi
3812
3813 # PORTME: fill in a description of your system's C++ link characteristics
3814 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3815 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3816 case $host_os in
3817 aix3*)
3818 # FIXME: insert proper C++ library support
3819 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3820 ;;
3821 aix4* | aix5*)
3822 if test "$host_cpu" = ia64; then
3823 # On IA64, the linker does run time linking by default, so we don't
3824 # have to do anything special.
3825 aix_use_runtimelinking=no
3826 exp_sym_flag='-Bexport'
3827 no_entry_flag=""
3828 else
3829 aix_use_runtimelinking=no
3830
3831 # Test if we are trying to use run time linking or normal
3832 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3833 # need to do runtime linking.
3834 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3835 for ld_flag in $LDFLAGS; do
3836 case $ld_flag in
3837 *-brtl*)
3838 aix_use_runtimelinking=yes
3839 break
3840 ;;
3841 esac
3842 done
3843 esac
3844
3845 exp_sym_flag='-bexport'
3846 no_entry_flag='-bnoentry'
3847 fi
3848
3849 # When large executables or shared objects are built, AIX ld can
3850 # have problems creating the table of contents. If linking a library
3851 # or program results in "error TOC overflow" add -mminimal-toc to
3852 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3853 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3854
3855 _LT_AC_TAGVAR(archive_cmds, $1)=''
3856 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3857 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3858 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3859
3860 if test "$GXX" = yes; then
3861 case $host_os in aix4.[[012]]|aix4.[[012]].*)
3862 # We only want to do this on AIX 4.2 and lower, the check
3863 # below for broken collect2 doesn't work under 4.3+
3864 collect2name=`${CC} -print-prog-name=collect2`
3865 if test -f "$collect2name" && \
3866 strings "$collect2name" | grep resolve_lib_name >/dev/null
3867 then
3868 # We have reworked collect2
3869 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3870 else
3871 # We have old collect2
3872 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3873 # It fails to find uninstalled libraries when the uninstalled
3874 # path is not listed in the libpath. Setting hardcode_minus_L
3875 # to unsupported forces relinking
3876 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3877 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3878 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3879 fi
3880 esac
3881 shared_flag='-shared'
3882 if test "$aix_use_runtimelinking" = yes; then
3883 shared_flag="$shared_flag "'${wl}-G'
3884 fi
3885 else
3886 # not using gcc
3887 if test "$host_cpu" = ia64; then
3888 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3889 # chokes on -Wl,-G. The following line is correct:
3890 shared_flag='-G'
3891 else
3892 if test "$aix_use_runtimelinking" = yes; then
3893 shared_flag='${wl}-G'
3894 else
3895 shared_flag='${wl}-bM:SRE'
3896 fi
3897 fi
3898 fi
3899
3900 # It seems that -bexpall does not export symbols beginning with
3901 # underscore (_), so it is better to generate a list of symbols to export.
3902 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3903 if test "$aix_use_runtimelinking" = yes; then
3904 # Warning - without using the other runtime loading flags (-brtl),
3905 # -berok will link without error, but may produce a broken library.
3906 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3907 # Determine the default libpath from the value encoded in an empty executable.
3908 _LT_AC_SYS_LIBPATH_AIX
3909 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3910
3911 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3912 else
3913 if test "$host_cpu" = ia64; then
3914 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3915 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3916 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3917 else
3918 # Determine the default libpath from the value encoded in an empty executable.
3919 _LT_AC_SYS_LIBPATH_AIX
3920 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3921 # Warning - without using the other run time loading flags,
3922 # -berok will link without error, but may produce a broken library.
3923 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3924 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3925 # -bexpall does not export symbols beginning with underscore (_)
3926 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3927 # Exported symbols can be pulled into shared objects from archives
3928 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3929 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3930 # This is similar to how AIX traditionally builds its shared libraries.
3931 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3932 fi
3933 fi
3934 ;;
3935 chorus*)
3936 case $cc_basename in
3937 *)
3938 # FIXME: insert proper C++ library support
3939 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3940 ;;
3941 esac
3942 ;;
3943
3944
3945 cygwin* | mingw* | pw32*)
3946 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3947 # as there is no search path for DLLs.
3948 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3949 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3950 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3951 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3952
3953 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3954 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3955 # If the export-symbols file already is a .def file (1st line
3956 # is EXPORTS), use it as is; otherwise, prepend...
3957 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3958 cp $export_symbols $output_objdir/$soname.def;
3959 else
3960 echo EXPORTS > $output_objdir/$soname.def;
3961 cat $export_symbols >> $output_objdir/$soname.def;
3962 fi~
3963 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3964 else
3965 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3966 fi
3967 ;;
3968 darwin* | rhapsody*)
3969 case $host_os in
3970 rhapsody* | darwin1.[[012]])
3971 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3972 ;;
3973 *) # Darwin 1.3 on
3974 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3975 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3976 else
3977 case ${MACOSX_DEPLOYMENT_TARGET} in
3978 10.[[012]])
3979 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3980 ;;
3981 10.*)
3982 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3983 ;;
3984 esac
3985 fi
3986 ;;
3987 esac
3988 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3989 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3990 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3991 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3992 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3993 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3994
3995 if test "$GXX" = yes ; then
3996 lt_int_apple_cc_single_mod=no
3997 output_verbose_link_cmd='echo'
3998 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3999 lt_int_apple_cc_single_mod=yes
4000 fi
4001 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4002 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4003 else
4004 _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'
4005 fi
4006 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4007 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4008 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4009 _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}'
4010 else
4011 _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}'
4012 fi
4013 _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}'
4014 else
4015 case $cc_basename in
4016 xlc*)
4017 output_verbose_link_cmd='echo'
4018 _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'
4019 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4020 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4021 _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}'
4022 _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}'
4023 ;;
4024 *)
4025 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4026 ;;
4027 esac
4028 fi
4029 ;;
4030
4031 dgux*)
4032 case $cc_basename in
4033 ec++*)
4034 # FIXME: insert proper C++ library support
4035 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4036 ;;
4037 ghcx*)
4038 # Green Hills C++ Compiler
4039 # FIXME: insert proper C++ library support
4040 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4041 ;;
4042 *)
4043 # FIXME: insert proper C++ library support
4044 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4045 ;;
4046 esac
4047 ;;
4048 freebsd[[12]]*)
4049 # C++ shared libraries reported to be fairly broken before switch to ELF
4050 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4051 ;;
4052 freebsd-elf*)
4053 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4054 ;;
4055 freebsd* | kfreebsd*-gnu | dragonfly*)
4056 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4057 # conventions
4058 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4059 ;;
4060 gnu*)
4061 ;;
4062 hpux9*)
4063 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4064 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4065 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4066 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4067 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4068 # but as the default
4069 # location of the library.
4070
4071 case $cc_basename in
4072 CC*)
4073 # FIXME: insert proper C++ library support
4074 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4075 ;;
4076 aCC*)
4077 _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'
4078 # Commands to make compiler produce verbose output that lists
4079 # what "hidden" libraries, object files and flags are used when
4080 # linking a shared library.
4081 #
4082 # There doesn't appear to be a way to prevent this compiler from
4083 # explicitly linking system object files so we need to strip them
4084 # from the output so that they don't get included in the library
4085 # dependencies.
4086 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'
4087 ;;
4088 *)
4089 if test "$GXX" = yes; then
4090 _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'
4091 else
4092 # FIXME: insert proper C++ library support
4093 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4094 fi
4095 ;;
4096 esac
4097 ;;
4098 hpux10*|hpux11*)
4099 if test $with_gnu_ld = no; then
4100 case $host_cpu in
4101 hppa*64*)
4102 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4103 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4104 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4105 ;;
4106 ia64*)
4107 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4108 ;;
4109 *)
4110 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4111 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4112 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4113 ;;
4114 esac
4115 fi
4116 case $host_cpu in
4117 hppa*64*)
4118 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4119 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4120 ;;
4121 ia64*)
4122 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4123 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4124 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4125 # but as the default
4126 # location of the library.
4127 ;;
4128 *)
4129 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4130 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4131 # but as the default
4132 # location of the library.
4133 ;;
4134 esac
4135
4136 case $cc_basename in
4137 CC*)
4138 # FIXME: insert proper C++ library support
4139 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4140 ;;
4141 aCC*)
4142 case $host_cpu in
4143 hppa*64*|ia64*)
4144 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4145 ;;
4146 *)
4147 _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'
4148 ;;
4149 esac
4150 # Commands to make compiler produce verbose output that lists
4151 # what "hidden" libraries, object files and flags are used when
4152 # linking a shared library.
4153 #
4154 # There doesn't appear to be a way to prevent this compiler from
4155 # explicitly linking system object files so we need to strip them
4156 # from the output so that they don't get included in the library
4157 # dependencies.
4158 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'
4159 ;;
4160 *)
4161 if test "$GXX" = yes; then
4162 if test $with_gnu_ld = no; then
4163 case $host_cpu in
4164 ia64*|hppa*64*)
4165 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4166 ;;
4167 *)
4168 _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'
4169 ;;
4170 esac
4171 fi
4172 else
4173 # FIXME: insert proper C++ library support
4174 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4175 fi
4176 ;;
4177 esac
4178 ;;
4179 irix5* | irix6*)
4180 case $cc_basename in
4181 CC*)
4182 # SGI C++
4183 _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'
4184
4185 # Archives containing C++ object files must be created using
4186 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
4187 # necessary to make sure instantiated templates are included
4188 # in the archive.
4189 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4190 ;;
4191 *)
4192 if test "$GXX" = yes; then
4193 if test "$with_gnu_ld" = no; then
4194 _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'
4195 else
4196 _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'
4197 fi
4198 fi
4199 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4200 ;;
4201 esac
4202 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4203 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4204 ;;
4205 linux*)
4206 case $cc_basename in
4207 KCC*)
4208 # Kuck and Associates, Inc. (KAI) C++ Compiler
4209
4210 # KCC will only create a shared library if the output file
4211 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4212 # to its proper name (with version) after linking.
4213 _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'
4214 _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'
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 $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'
4224
4225 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4226 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4227
4228 # Archives containing C++ object files must be created using
4229 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4230 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4231 ;;
4232 icpc*)
4233 # Intel C++
4234 with_gnu_ld=yes
4235 # version 8.0 and above of icpc choke on multiply defined symbols
4236 # if we add $predep_objects and $postdep_objects, however 7.1 and
4237 # earlier do not add the objects themselves.
4238 case `$CC -V 2>&1` in
4239 *"Version 7."*)
4240 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4241 _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'
4242 ;;
4243 *) # Version 8.0 or newer
4244 tmp_idyn=
4245 case $host_cpu in
4246 ia64*) tmp_idyn=' -i_dynamic';;
4247 esac
4248 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4249 _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'
4250 ;;
4251 esac
4252 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4253 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4254 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4255 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4256 ;;
4257 pgCC*)
4258 # Portland Group C++ compiler
4259 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4260 _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'
4261
4262 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4263 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4264 _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'
4265 ;;
4266 cxx*)
4267 # Compaq C++
4268 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4269 _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'
4270
4271 runpath_var=LD_RUN_PATH
4272 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4273 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4274
4275 # Commands to make compiler produce verbose output that lists
4276 # what "hidden" libraries, object files and flags are used when
4277 # linking a shared library.
4278 #
4279 # There doesn't appear to be a way to prevent this compiler from
4280 # explicitly linking system object files so we need to strip them
4281 # from the output so that they don't get included in the library
4282 # dependencies.
4283 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'
4284 ;;
4285 esac
4286 ;;
4287 lynxos*)
4288 # FIXME: insert proper C++ library support
4289 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4290 ;;
4291 m88k*)
4292 # FIXME: insert proper C++ library support
4293 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4294 ;;
4295 mvs*)
4296 case $cc_basename in
4297 cxx*)
4298 # FIXME: insert proper C++ library support
4299 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4300 ;;
4301 *)
4302 # FIXME: insert proper C++ library support
4303 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4304 ;;
4305 esac
4306 ;;
4307 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
4308 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4309 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4310 wlarc=
4311 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4312 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4313 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4314 fi
4315 # Workaround some broken pre-1.5 toolchains
4316 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4317 ;;
4318 openbsd2*)
4319 # C++ shared libraries are fairly broken
4320 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4321 ;;
4322 openbsd*)
4323 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4324 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4325 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4326 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4327 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4328 _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'
4329 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4330 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4331 fi
4332 output_verbose_link_cmd='echo'
4333 ;;
4334 osf3*)
4335 case $cc_basename in
4336 KCC*)
4337 # Kuck and Associates, Inc. (KAI) C++ Compiler
4338
4339 # KCC will only create a shared library if the output file
4340 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4341 # to its proper name (with version) after linking.
4342 _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'
4343
4344 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4345 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4346
4347 # Archives containing C++ object files must be created using
4348 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4349 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4350
4351 ;;
4352 RCC*)
4353 # Rational C++ 2.4.1
4354 # FIXME: insert proper C++ library support
4355 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4356 ;;
4357 cxx*)
4358 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4359 _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'
4360
4361 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4362 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4363
4364 # Commands to make compiler produce verbose output that lists
4365 # what "hidden" libraries, object files and flags are used when
4366 # linking a shared library.
4367 #
4368 # There doesn't appear to be a way to prevent this compiler from
4369 # explicitly linking system object files so we need to strip them
4370 # from the output so that they don't get included in the library
4371 # dependencies.
4372 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'
4373 ;;
4374 *)
4375 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4376 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4377 _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'
4378
4379 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4380 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4381
4382 # Commands to make compiler produce verbose output that lists
4383 # what "hidden" libraries, object files and flags are used when
4384 # linking a shared library.
4385 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4386
4387 else
4388 # FIXME: insert proper C++ library support
4389 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4390 fi
4391 ;;
4392 esac
4393 ;;
4394 osf4* | osf5*)
4395 case $cc_basename in
4396 KCC*)
4397 # Kuck and Associates, Inc. (KAI) C++ Compiler
4398
4399 # KCC will only create a shared library if the output file
4400 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4401 # to its proper name (with version) after linking.
4402 _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'
4403
4404 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4405 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4406
4407 # Archives containing C++ object files must be created using
4408 # the KAI C++ compiler.
4409 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4410 ;;
4411 RCC*)
4412 # Rational C++ 2.4.1
4413 # FIXME: insert proper C++ library support
4414 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4415 ;;
4416 cxx*)
4417 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4418 _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'
4419 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4420 echo "-hidden">> $lib.exp~
4421 $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~
4422 $rm $lib.exp'
4423
4424 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4425 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4426
4427 # Commands to make compiler produce verbose output that lists
4428 # what "hidden" libraries, object files and flags are used when
4429 # linking a shared library.
4430 #
4431 # There doesn't appear to be a way to prevent this compiler from
4432 # explicitly linking system object files so we need to strip them
4433 # from the output so that they don't get included in the library
4434 # dependencies.
4435 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'
4436 ;;
4437 *)
4438 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4439 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4440 _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'
4441
4442 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4443 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4444
4445 # Commands to make compiler produce verbose output that lists
4446 # what "hidden" libraries, object files and flags are used when
4447 # linking a shared library.
4448 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4449
4450 else
4451 # FIXME: insert proper C++ library support
4452 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4453 fi
4454 ;;
4455 esac
4456 ;;
4457 psos*)
4458 # FIXME: insert proper C++ library support
4459 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4460 ;;
4461 sco*)
4462 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4463 case $cc_basename in
4464 CC*)
4465 # FIXME: insert proper C++ library support
4466 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4467 ;;
4468 *)
4469 # FIXME: insert proper C++ library support
4470 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4471 ;;
4472 esac
4473 ;;
4474 sunos4*)
4475 case $cc_basename in
4476 CC*)
4477 # Sun C++ 4.x
4478 # FIXME: insert proper C++ library support
4479 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4480 ;;
4481 lcc*)
4482 # Lucid
4483 # FIXME: insert proper C++ library support
4484 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4485 ;;
4486 *)
4487 # FIXME: insert proper C++ library support
4488 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4489 ;;
4490 esac
4491 ;;
4492 solaris*)
4493 case $cc_basename in
4494 CC*)
4495 # Sun C++ 4.2, 5.x and Centerline C++
4496 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
4497 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4498 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4499 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4500 $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'
4501
4502 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4503 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4504 case $host_os in
4505 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4506 *)
4507 # The C++ compiler is used as linker so we must use $wl
4508 # flag to pass the commands to the underlying system
4509 # linker. We must also pass each convience library through
4510 # to the system linker between allextract/defaultextract.
4511 # The C++ compiler will combine linker options so we
4512 # cannot just pass the convience library names through
4513 # without $wl.
4514 # Supported since Solaris 2.6 (maybe 2.5.1?)
4515 _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'
4516 ;;
4517 esac
4518 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4519
4520 output_verbose_link_cmd='echo'
4521
4522 # Archives containing C++ object files must be created using
4523 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4524 # necessary to make sure instantiated templates are included
4525 # in the archive.
4526 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4527 ;;
4528 gcx*)
4529 # Green Hills C++ Compiler
4530 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4531
4532 # The C++ compiler must be used to create the archive.
4533 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4534 ;;
4535 *)
4536 # GNU C++ compiler with Solaris linker
4537 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4538 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4539 if $CC --version | grep -v '^2\.7' > /dev/null; then
4540 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4541 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4542 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4543
4544 # Commands to make compiler produce verbose output that lists
4545 # what "hidden" libraries, object files and flags are used when
4546 # linking a shared library.
4547 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4548 else
4549 # g++ 2.7 appears to require `-G' NOT `-shared' on this
4550 # platform.
4551 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4552 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4553 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4554
4555 # Commands to make compiler produce verbose output that lists
4556 # what "hidden" libraries, object files and flags are used when
4557 # linking a shared library.
4558 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4559 fi
4560
4561 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4562 fi
4563 ;;
4564 esac
4565 ;;
4566 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4567 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4568 ;;
4569 tandem*)
4570 case $cc_basename in
4571 NCC*)
4572 # NonStop-UX NCC 3.20
4573 # FIXME: insert proper C++ library support
4574 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4575 ;;
4576 *)
4577 # FIXME: insert proper C++ library support
4578 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4579 ;;
4580 esac
4581 ;;
4582 vxworks*)
4583 # FIXME: insert proper C++ library support
4584 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4585 ;;
4586 *)
4587 # FIXME: insert proper C++ library support
4588 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4589 ;;
4590 esac
4591 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4592 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4593
4594 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4595 _LT_AC_TAGVAR(LD, $1)="$LD"
4596
4597 AC_LIBTOOL_POSTDEP_PREDEP($1)
4598 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4599 AC_LIBTOOL_PROG_CC_C_O($1)
4600 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4601 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4602 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4603 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4604 AC_LIBTOOL_SYS_LIB_STRIP
4605 AC_LIBTOOL_DLOPEN_SELF($1)
4606
4607 AC_LIBTOOL_CONFIG($1)
4608
4609 AC_LANG_POP
4610 CC=$lt_save_CC
4611 LDCXX=$LD
4612 LD=$lt_save_LD
4613 GCC=$lt_save_GCC
4614 with_gnu_ldcxx=$with_gnu_ld
4615 with_gnu_ld=$lt_save_with_gnu_ld
4616 lt_cv_path_LDCXX=$lt_cv_path_LD
4617 lt_cv_path_LD=$lt_save_path_LD
4618 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4619 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4620 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4621
4622 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4623 # ------------------------
4624 # Figure out "hidden" library dependencies from verbose
4625 # compiler output when linking a shared library.
4626 # Parse the compiler output and extract the necessary
4627 # objects, libraries and library flags.
4628 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4629 dnl we can't use the lt_simple_compile_test_code here,
4630 dnl because it contains code intended for an executable,
4631 dnl not a library. It's possible we should let each
4632 dnl tag define a new lt_????_link_test_code variable,
4633 dnl but it's only used here...
4634 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4635 int a;
4636 void foo (void) { a = 0; }
4637 EOF
4638 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4639 class Foo
4640 {
4641 public:
4642 Foo (void) { a = 0; }
4643 private:
4644 int a;
4645 };
4646 EOF
4647 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4648 subroutine foo
4649 implicit none
4650 integer*4 a
4651 a=0
4652 return
4653 end
4654 EOF
4655 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4656 public class foo {
4657 private int a;
4658 public void bar (void) {
4659 a = 0;
4660 }
4661 };
4662 EOF
4663 ])
4664 dnl Parse the compiler output and extract the necessary
4665 dnl objects, libraries and library flags.
4666 if AC_TRY_EVAL(ac_compile); then
4667 # Parse the compiler output and extract the necessary
4668 # objects, libraries and library flags.
4669
4670 # Sentinel used to keep track of whether or not we are before
4671 # the conftest object file.
4672 pre_test_object_deps_done=no
4673
4674 # The `*' in the case matches for architectures that use `case' in
4675 # $output_verbose_cmd can trigger glob expansion during the loop
4676 # eval without this substitution.
4677 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4678
4679 for p in `eval $output_verbose_link_cmd`; do
4680 case $p in
4681
4682 -L* | -R* | -l*)
4683 # Some compilers place space between "-{L,R}" and the path.
4684 # Remove the space.
4685 if test $p = "-L" \
4686 || test $p = "-R"; then
4687 prev=$p
4688 continue
4689 else
4690 prev=
4691 fi
4692
4693 if test "$pre_test_object_deps_done" = no; then
4694 case $p in
4695 -L* | -R*)
4696 # Internal compiler library paths should come after those
4697 # provided the user. The postdeps already come after the
4698 # user supplied libs so there is no need to process them.
4699 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4700 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4701 else
4702 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4703 fi
4704 ;;
4705 # The "-l" case would never come before the object being
4706 # linked, so don't bother handling this case.
4707 esac
4708 else
4709 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4710 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4711 else
4712 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4713 fi
4714 fi
4715 ;;
4716
4717 *.$objext)
4718 # This assumes that the test object file only shows up
4719 # once in the compiler output.
4720 if test "$p" = "conftest.$objext"; then
4721 pre_test_object_deps_done=yes
4722 continue
4723 fi
4724
4725 if test "$pre_test_object_deps_done" = no; then
4726 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4727 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4728 else
4729 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4730 fi
4731 else
4732 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4733 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4734 else
4735 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4736 fi
4737 fi
4738 ;;
4739
4740 *) ;; # Ignore the rest.
4741
4742 esac
4743 done
4744
4745 # Clean up.
4746 rm -f a.out a.exe
4747 else
4748 echo "libtool.m4: error: problem compiling $1 test program"
4749 fi
4750
4751 $rm -f confest.$objext
4752
4753 # PORTME: override above test on systems where it is broken
4754 ifelse([$1],[CXX],
4755 [case $host_os in
4756 solaris*)
4757 case $cc_basename in
4758 CC*)
4759 # Adding this requires a known-good setup of shared libraries for
4760 # Sun compiler versions before 5.6, else PIC objects from an old
4761 # archive will be linked into the output, leading to subtle bugs.
4762 _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
4763 ;;
4764 esac
4765 esac
4766 ])
4767
4768 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4769 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4770 esac
4771 ])# AC_LIBTOOL_POSTDEP_PREDEP
4772
4773 # AC_LIBTOOL_LANG_F77_CONFIG
4774 # ------------------------
4775 # Ensure that the configuration vars for the C compiler are
4776 # suitably defined. Those variables are subsequently used by
4777 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4778 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4779 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4780 [AC_REQUIRE([AC_PROG_F77])
4781 AC_LANG_PUSH(Fortran 77)
4782
4783 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4784 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4785 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4786 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4787 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4788 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4789 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4790 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4791 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4792 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4793 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4794 _LT_AC_TAGVAR(module_cmds, $1)=
4795 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4796 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4797 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4798 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4799 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4800 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4801
4802 # Source file extension for f77 test sources.
4803 ac_ext=f
4804
4805 # Object file extension for compiled f77 test sources.
4806 objext=o
4807 _LT_AC_TAGVAR(objext, $1)=$objext
4808
4809 # Code to be used in simple compile tests
4810 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4811
4812 # Code to be used in simple link tests
4813 lt_simple_link_test_code=" program t\n end\n"
4814
4815 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4816 _LT_AC_SYS_COMPILER
4817
4818 # save warnings/boilerplate of simple test code
4819 _LT_COMPILER_BOILERPLATE
4820 _LT_LINKER_BOILERPLATE
4821
4822 # Allow CC to be a program name with arguments.
4823 lt_save_CC="$CC"
4824 CC=${F77-"f77"}
4825 compiler=$CC
4826 _LT_AC_TAGVAR(compiler, $1)=$CC
4827 _LT_CC_BASENAME([$compiler])
4828
4829 AC_MSG_CHECKING([if libtool supports shared libraries])
4830 AC_MSG_RESULT([$can_build_shared])
4831
4832 AC_MSG_CHECKING([whether to build shared libraries])
4833 test "$can_build_shared" = "no" && enable_shared=no
4834
4835 # On AIX, shared libraries and static libraries use the same namespace, and
4836 # are all built from PIC.
4837 case $host_os in
4838 aix3*)
4839 test "$enable_shared" = yes && enable_static=no
4840 if test -n "$RANLIB"; then
4841 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4842 postinstall_cmds='$RANLIB $lib'
4843 fi
4844 ;;
4845 aix4* | aix5*)
4846 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4847 test "$enable_shared" = yes && enable_static=no
4848 fi
4849 ;;
4850 esac
4851 AC_MSG_RESULT([$enable_shared])
4852
4853 AC_MSG_CHECKING([whether to build static libraries])
4854 # Make sure either enable_shared or enable_static is yes.
4855 test "$enable_shared" = yes || enable_static=yes
4856 AC_MSG_RESULT([$enable_static])
4857
4858 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4859
4860 _LT_AC_TAGVAR(GCC, $1)="$G77"
4861 _LT_AC_TAGVAR(LD, $1)="$LD"
4862
4863 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4864 AC_LIBTOOL_PROG_CC_C_O($1)
4865 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4866 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4867 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4868 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4869 AC_LIBTOOL_SYS_LIB_STRIP
4870
4871
4872 AC_LIBTOOL_CONFIG($1)
4873
4874 AC_LANG_POP
4875 CC="$lt_save_CC"
4876 ])# AC_LIBTOOL_LANG_F77_CONFIG
4877
4878
4879 # AC_LIBTOOL_LANG_GCJ_CONFIG
4880 # --------------------------
4881 # Ensure that the configuration vars for the C compiler are
4882 # suitably defined. Those variables are subsequently used by
4883 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4884 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4885 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4886 [AC_LANG_SAVE
4887
4888 # Source file extension for Java test sources.
4889 ac_ext=java
4890
4891 # Object file extension for compiled Java test sources.
4892 objext=o
4893 _LT_AC_TAGVAR(objext, $1)=$objext
4894
4895 # Code to be used in simple compile tests
4896 lt_simple_compile_test_code="class foo {}\n"
4897
4898 # Code to be used in simple link tests
4899 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4900
4901 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4902 _LT_AC_SYS_COMPILER
4903
4904 # save warnings/boilerplate of simple test code
4905 _LT_COMPILER_BOILERPLATE
4906 _LT_LINKER_BOILERPLATE
4907
4908 # Allow CC to be a program name with arguments.
4909 lt_save_CC="$CC"
4910 CC=${GCJ-"gcj"}
4911 compiler=$CC
4912 _LT_AC_TAGVAR(compiler, $1)=$CC
4913 _LT_CC_BASENAME([$compiler])
4914
4915 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4916 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4917
4918 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4919
4920 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4921 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4922 AC_LIBTOOL_PROG_CC_C_O($1)
4923 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4924 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4925 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4926 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4927 AC_LIBTOOL_SYS_LIB_STRIP
4928 AC_LIBTOOL_DLOPEN_SELF($1)
4929
4930 AC_LIBTOOL_CONFIG($1)
4931
4932 AC_LANG_RESTORE
4933 CC="$lt_save_CC"
4934 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4935
4936
4937 # AC_LIBTOOL_LANG_RC_CONFIG
4938 # --------------------------
4939 # Ensure that the configuration vars for the Windows resource compiler are
4940 # suitably defined. Those variables are subsequently used by
4941 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4942 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4943 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4944 [AC_LANG_SAVE
4945
4946 # Source file extension for RC test sources.
4947 ac_ext=rc
4948
4949 # Object file extension for compiled RC test sources.
4950 objext=o
4951 _LT_AC_TAGVAR(objext, $1)=$objext
4952
4953 # Code to be used in simple compile tests
4954 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4955
4956 # Code to be used in simple link tests
4957 lt_simple_link_test_code="$lt_simple_compile_test_code"
4958
4959 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4960 _LT_AC_SYS_COMPILER
4961
4962 # save warnings/boilerplate of simple test code
4963 _LT_COMPILER_BOILERPLATE
4964 _LT_LINKER_BOILERPLATE
4965
4966 # Allow CC to be a program name with arguments.
4967 lt_save_CC="$CC"
4968 CC=${RC-"windres"}
4969 compiler=$CC
4970 _LT_AC_TAGVAR(compiler, $1)=$CC
4971 _LT_CC_BASENAME([$compiler])
4972 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4973
4974 AC_LIBTOOL_CONFIG($1)
4975
4976 AC_LANG_RESTORE
4977 CC="$lt_save_CC"
4978 ])# AC_LIBTOOL_LANG_RC_CONFIG
4979
4980
4981 # AC_LIBTOOL_CONFIG([TAGNAME])
4982 # ----------------------------
4983 # If TAGNAME is not passed, then create an initial libtool script
4984 # with a default configuration from the untagged config vars. Otherwise
4985 # add code to config.status for appending the configuration named by
4986 # TAGNAME from the matching tagged config vars.
4987 AC_DEFUN([AC_LIBTOOL_CONFIG],
4988 [# The else clause should only fire when bootstrapping the
4989 # libtool distribution, otherwise you forgot to ship ltmain.sh
4990 # with your package, and you will get complaints that there are
4991 # no rules to generate ltmain.sh.
4992 if test -f "$ltmain"; then
4993 # See if we are running on zsh, and set the options which allow our commands through
4994 # without removal of \ escapes.
4995 if test -n "${ZSH_VERSION+set}" ; then
4996 setopt NO_GLOB_SUBST
4997 fi
4998 # Now quote all the things that may contain metacharacters while being
4999 # careful not to overquote the AC_SUBSTed values. We take copies of the
5000 # variables and quote the copies for generation of the libtool script.
5001 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
5002 SED SHELL STRIP \
5003 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5004 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5005 deplibs_check_method reload_flag reload_cmds need_locks \
5006 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5007 lt_cv_sys_global_symbol_to_c_name_address \
5008 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5009 old_postinstall_cmds old_postuninstall_cmds \
5010 _LT_AC_TAGVAR(compiler, $1) \
5011 _LT_AC_TAGVAR(CC, $1) \
5012 _LT_AC_TAGVAR(LD, $1) \
5013 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5014 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5015 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5016 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5017 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5018 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5019 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5020 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5021 _LT_AC_TAGVAR(old_archive_cmds, $1) \
5022 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5023 _LT_AC_TAGVAR(predep_objects, $1) \
5024 _LT_AC_TAGVAR(postdep_objects, $1) \
5025 _LT_AC_TAGVAR(predeps, $1) \
5026 _LT_AC_TAGVAR(postdeps, $1) \
5027 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5028 _LT_AC_TAGVAR(archive_cmds, $1) \
5029 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5030 _LT_AC_TAGVAR(postinstall_cmds, $1) \
5031 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5032 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5033 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5034 _LT_AC_TAGVAR(no_undefined_flag, $1) \
5035 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5036 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5037 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5038 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5039 _LT_AC_TAGVAR(hardcode_automatic, $1) \
5040 _LT_AC_TAGVAR(module_cmds, $1) \
5041 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5042 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5043 _LT_AC_TAGVAR(exclude_expsyms, $1) \
5044 _LT_AC_TAGVAR(include_expsyms, $1); do
5045
5046 case $var in
5047 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5048 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5049 _LT_AC_TAGVAR(archive_cmds, $1) | \
5050 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5051 _LT_AC_TAGVAR(module_cmds, $1) | \
5052 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5053 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5054 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5055 extract_expsyms_cmds | reload_cmds | finish_cmds | \
5056 postinstall_cmds | postuninstall_cmds | \
5057 old_postinstall_cmds | old_postuninstall_cmds | \
5058 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5059 # Double-quote double-evaled strings.
5060 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5061 ;;
5062 *)
5063 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5064 ;;
5065 esac
5066 done
5067
5068 case $lt_echo in
5069 *'\[$]0 --fallback-echo"')
5070 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5071 ;;
5072 esac
5073
5074 ifelse([$1], [],
5075 [cfgfile="${ofile}T"
5076 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5077 $rm -f "$cfgfile"
5078 AC_MSG_NOTICE([creating $ofile])],
5079 [cfgfile="$ofile"])
5080
5081 cat <<__EOF__ >> "$cfgfile"
5082 ifelse([$1], [],
5083 [#! $SHELL
5084
5085 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5086 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5087 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
5088 #
5089 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5090 # Free Software Foundation, Inc.
5091 #
5092 # This file is part of GNU Libtool:
5093 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5094 #
5095 # This program is free software; you can redistribute it and/or modify
5096 # it under the terms of the GNU General Public License as published by
5097 # the Free Software Foundation; either version 2 of the License, or
5098 # (at your option) any later version.
5099 #
5100 # This program is distributed in the hope that it will be useful, but
5101 # WITHOUT ANY WARRANTY; without even the implied warranty of
5102 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5103 # General Public License for more details.
5104 #
5105 # You should have received a copy of the GNU General Public License
5106 # along with this program; if not, write to the Free Software
5107 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5108 #
5109 # As a special exception to the GNU General Public License, if you
5110 # distribute this file as part of a program that contains a
5111 # configuration script generated by Autoconf, you may include it under
5112 # the same distribution terms that you use for the rest of that program.
5113
5114 # A sed program that does not truncate output.
5115 SED=$lt_SED
5116
5117 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
5118 Xsed="$SED -e 1s/^X//"
5119
5120 # The HP-UX ksh and POSIX shell print the target directory to stdout
5121 # if CDPATH is set.
5122 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5123
5124 # The names of the tagged configurations supported by this script.
5125 available_tags=
5126
5127 # ### BEGIN LIBTOOL CONFIG],
5128 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5129
5130 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5131
5132 # Shell to use when invoking shell scripts.
5133 SHELL=$lt_SHELL
5134
5135 # Whether or not to build shared libraries.
5136 build_libtool_libs=$enable_shared
5137
5138 # Whether or not to build static libraries.
5139 build_old_libs=$enable_static
5140
5141 # Whether or not to add -lc for building shared libraries.
5142 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5143
5144 # Whether or not to disallow shared libs when runtime libs are static
5145 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5146
5147 # Whether or not to optimize for fast installation.
5148 fast_install=$enable_fast_install
5149
5150 # The host system.
5151 host_alias=$host_alias
5152 host=$host
5153 host_os=$host_os
5154
5155 # The build system.
5156 build_alias=$build_alias
5157 build=$build
5158 build_os=$build_os
5159
5160 # An echo program that does not interpret backslashes.
5161 echo=$lt_echo
5162
5163 # The archiver.
5164 AR=$lt_AR
5165 AR_FLAGS=$lt_AR_FLAGS
5166
5167 # A C compiler.
5168 LTCC=$lt_LTCC
5169
5170 # A language-specific compiler.
5171 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5172
5173 # Is the compiler the GNU C compiler?
5174 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5175
5176 # An ERE matcher.
5177 EGREP=$lt_EGREP
5178
5179 # The linker used to build libraries.
5180 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5181
5182 # Whether we need hard or soft links.
5183 LN_S=$lt_LN_S
5184
5185 # A BSD-compatible nm program.
5186 NM=$lt_NM
5187
5188 # A symbol stripping program
5189 STRIP=$lt_STRIP
5190
5191 # Used to examine libraries when file_magic_cmd begins "file"
5192 MAGIC_CMD=$MAGIC_CMD
5193
5194 # Used on cygwin: DLL creation program.
5195 DLLTOOL="$DLLTOOL"
5196
5197 # Used on cygwin: object dumper.
5198 OBJDUMP="$OBJDUMP"
5199
5200 # Used on cygwin: assembler.
5201 AS="$AS"
5202
5203 # The name of the directory that contains temporary libtool files.
5204 objdir=$objdir
5205
5206 # How to create reloadable object files.
5207 reload_flag=$lt_reload_flag
5208 reload_cmds=$lt_reload_cmds
5209
5210 # How to pass a linker flag through the compiler.
5211 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5212
5213 # Object file suffix (normally "o").
5214 objext="$ac_objext"
5215
5216 # Old archive suffix (normally "a").
5217 libext="$libext"
5218
5219 # Shared library suffix (normally ".so").
5220 shrext_cmds='$shrext_cmds'
5221
5222 # Executable file suffix (normally "").
5223 exeext="$exeext"
5224
5225 # Additional compiler flags for building library objects.
5226 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5227 pic_mode=$pic_mode
5228
5229 # What is the maximum length of a command?
5230 max_cmd_len=$lt_cv_sys_max_cmd_len
5231
5232 # Does compiler simultaneously support -c and -o options?
5233 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5234
5235 # Must we lock files when doing compilation?
5236 need_locks=$lt_need_locks
5237
5238 # Do we need the lib prefix for modules?
5239 need_lib_prefix=$need_lib_prefix
5240
5241 # Do we need a version for libraries?
5242 need_version=$need_version
5243
5244 # Whether dlopen is supported.
5245 dlopen_support=$enable_dlopen
5246
5247 # Whether dlopen of programs is supported.
5248 dlopen_self=$enable_dlopen_self
5249
5250 # Whether dlopen of statically linked programs is supported.
5251 dlopen_self_static=$enable_dlopen_self_static
5252
5253 # Compiler flag to prevent dynamic linking.
5254 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5255
5256 # Compiler flag to turn off builtin functions.
5257 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5258
5259 # Compiler flag to allow reflexive dlopens.
5260 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5261
5262 # Compiler flag to generate shared objects directly from archives.
5263 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5264
5265 # Compiler flag to generate thread-safe objects.
5266 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5267
5268 # Library versioning type.
5269 version_type=$version_type
5270
5271 # Format of library name prefix.
5272 libname_spec=$lt_libname_spec
5273
5274 # List of archive names. First name is the real one, the rest are links.
5275 # The last name is the one that the linker finds with -lNAME.
5276 library_names_spec=$lt_library_names_spec
5277
5278 # The coded name of the library, if different from the real name.
5279 soname_spec=$lt_soname_spec
5280
5281 # Commands used to build and install an old-style archive.
5282 RANLIB=$lt_RANLIB
5283 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5284 old_postinstall_cmds=$lt_old_postinstall_cmds
5285 old_postuninstall_cmds=$lt_old_postuninstall_cmds
5286
5287 # Create an old-style archive from a shared archive.
5288 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5289
5290 # Create a temporary old-style archive to link instead of a shared archive.
5291 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5292
5293 # Commands used to build and install a shared archive.
5294 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5295 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5296 postinstall_cmds=$lt_postinstall_cmds
5297 postuninstall_cmds=$lt_postuninstall_cmds
5298
5299 # Commands used to build a loadable module (assumed same as above if empty)
5300 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5301 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5302
5303 # Commands to strip libraries.
5304 old_striplib=$lt_old_striplib
5305 striplib=$lt_striplib
5306
5307 # Dependencies to place before the objects being linked to create a
5308 # shared library.
5309 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5310
5311 # Dependencies to place after the objects being linked to create a
5312 # shared library.
5313 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5314
5315 # Dependencies to place before the objects being linked to create a
5316 # shared library.
5317 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5318
5319 # Dependencies to place after the objects being linked to create a
5320 # shared library.
5321 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5322
5323 # The library search path used internally by the compiler when linking
5324 # a shared library.
5325 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5326
5327 # Method to check whether dependent libraries are shared objects.
5328 deplibs_check_method=$lt_deplibs_check_method
5329
5330 # Command to use when deplibs_check_method == file_magic.
5331 file_magic_cmd=$lt_file_magic_cmd
5332
5333 # Flag that allows shared libraries with undefined symbols to be built.
5334 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5335
5336 # Flag that forces no undefined symbols.
5337 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5338
5339 # Commands used to finish a libtool library installation in a directory.
5340 finish_cmds=$lt_finish_cmds
5341
5342 # Same as above, but a single script fragment to be evaled but not shown.
5343 finish_eval=$lt_finish_eval
5344
5345 # Take the output of nm and produce a listing of raw symbols and C names.
5346 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5347
5348 # Transform the output of nm in a proper C declaration
5349 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5350
5351 # Transform the output of nm in a C name address pair
5352 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5353
5354 # This is the shared library runtime path variable.
5355 runpath_var=$runpath_var
5356
5357 # This is the shared library path variable.
5358 shlibpath_var=$shlibpath_var
5359
5360 # Is shlibpath searched before the hard-coded library search path?
5361 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5362
5363 # How to hardcode a shared library path into an executable.
5364 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5365
5366 # Whether we should hardcode library paths into libraries.
5367 hardcode_into_libs=$hardcode_into_libs
5368
5369 # Flag to hardcode \$libdir into a binary during linking.
5370 # This must work even if \$libdir does not exist.
5371 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5372
5373 # If ld is used when linking, flag to hardcode \$libdir into
5374 # a binary during linking. This must work even if \$libdir does
5375 # not exist.
5376 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5377
5378 # Whether we need a single -rpath flag with a separated argument.
5379 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5380
5381 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5382 # resulting binary.
5383 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5384
5385 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5386 # resulting binary.
5387 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5388
5389 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5390 # the resulting binary.
5391 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5392
5393 # Set to yes if building a shared library automatically hardcodes DIR into the library
5394 # and all subsequent libraries and executables linked against it.
5395 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5396
5397 # Variables whose values should be saved in libtool wrapper scripts and
5398 # restored at relink time.
5399 variables_saved_for_relink="$variables_saved_for_relink"
5400
5401 # Whether libtool must link a program against all its dependency libraries.
5402 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5403
5404 # Compile-time system search path for libraries
5405 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5406
5407 # Run-time system search path for libraries
5408 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5409
5410 # Fix the shell variable \$srcfile for the compiler.
5411 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5412
5413 # Set to yes if exported symbols are required.
5414 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5415
5416 # The commands to list exported symbols.
5417 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5418
5419 # The commands to extract the exported symbol list from a shared archive.
5420 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5421
5422 # Symbols that should not be listed in the preloaded symbols.
5423 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5424
5425 # Symbols that must always be exported.
5426 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5427
5428 ifelse([$1],[],
5429 [# ### END LIBTOOL CONFIG],
5430 [# ### END LIBTOOL TAG CONFIG: $tagname])
5431
5432 __EOF__
5433
5434 ifelse([$1],[], [
5435 case $host_os in
5436 aix3*)
5437 cat <<\EOF >> "$cfgfile"
5438
5439 # AIX sometimes has problems with the GCC collect2 program. For some
5440 # reason, if we set the COLLECT_NAMES environment variable, the problems
5441 # vanish in a puff of smoke.
5442 if test "X${COLLECT_NAMES+set}" != Xset; then
5443 COLLECT_NAMES=
5444 export COLLECT_NAMES
5445 fi
5446 EOF
5447 ;;
5448 esac
5449
5450 # We use sed instead of cat because bash on DJGPP gets confused if
5451 # if finds mixed CR/LF and LF-only lines. Since sed operates in
5452 # text mode, it properly converts lines to CR/LF. This bash problem
5453 # is reportedly fixed, but why not run on old versions too?
5454 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5455
5456 mv -f "$cfgfile" "$ofile" || \
5457 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5458 chmod +x "$ofile"
5459 ])
5460 else
5461 # If there is no Makefile yet, we rely on a make rule to execute
5462 # `config.status --recheck' to rerun these tests and create the
5463 # libtool script then.
5464 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5465 if test -f "$ltmain_in"; then
5466 test -f Makefile && make "$ltmain"
5467 fi
5468 fi
5469 ])# AC_LIBTOOL_CONFIG
5470
5471
5472 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5473 # -------------------------------------------
5474 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5475 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5476
5477 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5478
5479 if test "$GCC" = yes; then
5480 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5481
5482 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5483 lt_cv_prog_compiler_rtti_exceptions,
5484 [-fno-rtti -fno-exceptions], [],
5485 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5486 fi
5487 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5488
5489
5490 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5491 # ---------------------------------
5492 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5493 [AC_REQUIRE([AC_CANONICAL_HOST])
5494 AC_REQUIRE([AC_PROG_NM])
5495 AC_REQUIRE([AC_OBJEXT])
5496 # Check for command to grab the raw symbol name followed by C symbol from nm.
5497 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5498 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5499 [
5500 # These are sane defaults that work on at least a few old systems.
5501 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5502
5503 # Character class describing NM global symbol codes.
5504 symcode='[[BCDEGRST]]'
5505
5506 # Regexp to match symbols that can be accessed directly from C.
5507 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5508
5509 # Transform an extracted symbol line into a proper C declaration
5510 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5511
5512 # Transform an extracted symbol line into symbol name and symbol address
5513 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'"
5514
5515 # Define system-specific variables.
5516 case $host_os in
5517 aix*)
5518 symcode='[[BCDT]]'
5519 ;;
5520 cygwin* | mingw* | pw32*)
5521 symcode='[[ABCDGISTW]]'
5522 ;;
5523 hpux*) # Its linker distinguishes data from code symbols
5524 if test "$host_cpu" = ia64; then
5525 symcode='[[ABCDEGRST]]'
5526 fi
5527 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5528 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'"
5529 ;;
5530 linux*)
5531 if test "$host_cpu" = ia64; then
5532 symcode='[[ABCDGIRSTW]]'
5533 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5534 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'"
5535 fi
5536 ;;
5537 irix* | nonstopux*)
5538 symcode='[[BCDEGRST]]'
5539 ;;
5540 osf*)
5541 symcode='[[BCDEGQRST]]'
5542 ;;
5543 solaris* | sysv5*)
5544 symcode='[[BDRT]]'
5545 ;;
5546 sysv4)
5547 symcode='[[DFNSTU]]'
5548 ;;
5549 esac
5550
5551 # Handle CRLF in mingw tool chain
5552 opt_cr=
5553 case $build_os in
5554 mingw*)
5555 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5556 ;;
5557 esac
5558
5559 # If we're using GNU nm, then use its standard symbol codes.
5560 case `$NM -V 2>&1` in
5561 *GNU* | *'with BFD'*)
5562 symcode='[[ABCDGIRSTW]]' ;;
5563 esac
5564
5565 # Try without a prefix undercore, then with it.
5566 for ac_symprfx in "" "_"; do
5567
5568 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5569 symxfrm="\\1 $ac_symprfx\\2 \\2"
5570
5571 # Write the raw and C identifiers.
5572 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5573
5574 # Check to see that the pipe works correctly.
5575 pipe_works=no
5576
5577 rm -f conftest*
5578 cat > conftest.$ac_ext <<EOF
5579 #ifdef __cplusplus
5580 extern "C" {
5581 #endif
5582 char nm_test_var;
5583 void nm_test_func(){}
5584 #ifdef __cplusplus
5585 }
5586 #endif
5587 int main(){nm_test_var='a';nm_test_func();return(0);}
5588 EOF
5589
5590 if AC_TRY_EVAL(ac_compile); then
5591 # Now try to grab the symbols.
5592 nlist=conftest.nm
5593 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5594 # Try sorting and uniquifying the output.
5595 if sort "$nlist" | uniq > "$nlist"T; then
5596 mv -f "$nlist"T "$nlist"
5597 else
5598 rm -f "$nlist"T
5599 fi
5600
5601 # Make sure that we snagged all the symbols we need.
5602 if grep ' nm_test_var$' "$nlist" >/dev/null; then
5603 if grep ' nm_test_func$' "$nlist" >/dev/null; then
5604 cat <<EOF > conftest.$ac_ext
5605 #ifdef __cplusplus
5606 extern "C" {
5607 #endif
5608
5609 EOF
5610 # Now generate the symbol file.
5611 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5612
5613 cat <<EOF >> conftest.$ac_ext
5614 #if defined (__STDC__) && __STDC__
5615 # define lt_ptr_t void *
5616 #else
5617 # define lt_ptr_t char *
5618 # define const
5619 #endif
5620
5621 /* The mapping between symbol names and symbols. */
5622 const struct {
5623 const char *name;
5624 lt_ptr_t address;
5625 }
5626 lt_preloaded_symbols[[]] =
5627 {
5628 EOF
5629 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5630 cat <<\EOF >> conftest.$ac_ext
5631 {0, (lt_ptr_t) 0}
5632 };
5633
5634 #ifdef __cplusplus
5635 }
5636 #endif
5637 EOF
5638 # Now try linking the two files.
5639 mv conftest.$ac_objext conftstm.$ac_objext
5640 lt_save_LIBS="$LIBS"
5641 lt_save_CFLAGS="$CFLAGS"
5642 LIBS="conftstm.$ac_objext"
5643 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5644 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5645 pipe_works=yes
5646 fi
5647 LIBS="$lt_save_LIBS"
5648 CFLAGS="$lt_save_CFLAGS"
5649 else
5650 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5651 fi
5652 else
5653 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5654 fi
5655 else
5656 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5657 fi
5658 else
5659 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5660 cat conftest.$ac_ext >&5
5661 fi
5662 rm -f conftest* conftst*
5663
5664 # Do not use the global_symbol_pipe unless it works.
5665 if test "$pipe_works" = yes; then
5666 break
5667 else
5668 lt_cv_sys_global_symbol_pipe=
5669 fi
5670 done
5671 ])
5672 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5673 lt_cv_sys_global_symbol_to_cdecl=
5674 fi
5675 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5676 AC_MSG_RESULT(failed)
5677 else
5678 AC_MSG_RESULT(ok)
5679 fi
5680 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5681
5682
5683 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5684 # ---------------------------------------
5685 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5686 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5687 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5688 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5689
5690 AC_MSG_CHECKING([for $compiler option to produce PIC])
5691 ifelse([$1],[CXX],[
5692 # C++ specific cases for pic, static, wl, etc.
5693 if test "$GXX" = yes; then
5694 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5695 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5696
5697 case $host_os in
5698 aix*)
5699 # All AIX code is PIC.
5700 if test "$host_cpu" = ia64; then
5701 # AIX 5 now supports IA64 processor
5702 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5703 fi
5704 ;;
5705 amigaos*)
5706 # FIXME: we need at least 68020 code to build shared libraries, but
5707 # adding the `-m68020' flag to GCC prevents building anything better,
5708 # like `-m68040'.
5709 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5710 ;;
5711 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5712 # PIC is the default for these OSes.
5713 ;;
5714 mingw* | os2* | pw32*)
5715 # This hack is so that the source file can tell whether it is being
5716 # built for inclusion in a dll (and should export symbols for example).
5717 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5718 ;;
5719 darwin* | rhapsody*)
5720 # PIC is the default on this platform
5721 # Common symbols not allowed in MH_DYLIB files
5722 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5723 ;;
5724 *djgpp*)
5725 # DJGPP does not support shared libraries at all
5726 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5727 ;;
5728 sysv4*MP*)
5729 if test -d /usr/nec; then
5730 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5731 fi
5732 ;;
5733 hpux*)
5734 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5735 # not for PA HP-UX.
5736 case $host_cpu in
5737 hppa*64*|ia64*)
5738 ;;
5739 *)
5740 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5741 ;;
5742 esac
5743 ;;
5744 *)
5745 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5746 ;;
5747 esac
5748 else
5749 case $host_os in
5750 aix4* | aix5*)
5751 # All AIX code is PIC.
5752 if test "$host_cpu" = ia64; then
5753 # AIX 5 now supports IA64 processor
5754 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5755 else
5756 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5757 fi
5758 ;;
5759 chorus*)
5760 case $cc_basename in
5761 cxch68*)
5762 # Green Hills C++ Compiler
5763 # _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"
5764 ;;
5765 esac
5766 ;;
5767 darwin*)
5768 # PIC is the default on this platform
5769 # Common symbols not allowed in MH_DYLIB files
5770 case $cc_basename in
5771 xlc*)
5772 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5773 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5774 ;;
5775 esac
5776 ;;
5777 dgux*)
5778 case $cc_basename in
5779 ec++*)
5780 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5781 ;;
5782 ghcx*)
5783 # Green Hills C++ Compiler
5784 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5785 ;;
5786 *)
5787 ;;
5788 esac
5789 ;;
5790 freebsd* | kfreebsd*-gnu | dragonfly*)
5791 # FreeBSD uses GNU C++
5792 ;;
5793 hpux9* | hpux10* | hpux11*)
5794 case $cc_basename in
5795 CC*)
5796 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5797 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5798 if test "$host_cpu" != ia64; then
5799 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5800 fi
5801 ;;
5802 aCC*)
5803 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5804 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5805 case $host_cpu in
5806 hppa*64*|ia64*)
5807 # +Z the default
5808 ;;
5809 *)
5810 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5811 ;;
5812 esac
5813 ;;
5814 *)
5815 ;;
5816 esac
5817 ;;
5818 irix5* | irix6* | nonstopux*)
5819 case $cc_basename in
5820 CC*)
5821 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5822 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5823 # CC pic flag -KPIC is the default.
5824 ;;
5825 *)
5826 ;;
5827 esac
5828 ;;
5829 linux*)
5830 case $cc_basename in
5831 KCC*)
5832 # KAI C++ Compiler
5833 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5834 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5835 ;;
5836 icpc* | ecpc*)
5837 # Intel C++
5838 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5839 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5840 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5841 ;;
5842 pgCC*)
5843 # Portland Group C++ compiler.
5844 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5845 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5846 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5847 ;;
5848 cxx*)
5849 # Compaq C++
5850 # Make sure the PIC flag is empty. It appears that all Alpha
5851 # Linux and Compaq Tru64 Unix objects are PIC.
5852 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5853 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5854 ;;
5855 *)
5856 ;;
5857 esac
5858 ;;
5859 lynxos*)
5860 ;;
5861 m88k*)
5862 ;;
5863 mvs*)
5864 case $cc_basename in
5865 cxx*)
5866 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5867 ;;
5868 *)
5869 ;;
5870 esac
5871 ;;
5872 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
5873 ;;
5874 osf3* | osf4* | osf5*)
5875 case $cc_basename in
5876 KCC*)
5877 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5878 ;;
5879 RCC*)
5880 # Rational C++ 2.4.1
5881 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5882 ;;
5883 cxx*)
5884 # Digital/Compaq C++
5885 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5886 # Make sure the PIC flag is empty. It appears that all Alpha
5887 # Linux and Compaq Tru64 Unix objects are PIC.
5888 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5889 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5890 ;;
5891 *)
5892 ;;
5893 esac
5894 ;;
5895 psos*)
5896 ;;
5897 sco*)
5898 case $cc_basename in
5899 CC*)
5900 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5901 ;;
5902 *)
5903 ;;
5904 esac
5905 ;;
5906 solaris*)
5907 case $cc_basename in
5908 CC*)
5909 # Sun C++ 4.2, 5.x and Centerline C++
5910 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5911 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5912 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5913 ;;
5914 gcx*)
5915 # Green Hills C++ Compiler
5916 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5917 ;;
5918 *)
5919 ;;
5920 esac
5921 ;;
5922 sunos4*)
5923 case $cc_basename in
5924 CC*)
5925 # Sun C++ 4.x
5926 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5927 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5928 ;;
5929 lcc*)
5930 # Lucid
5931 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5932 ;;
5933 *)
5934 ;;
5935 esac
5936 ;;
5937 tandem*)
5938 case $cc_basename in
5939 NCC*)
5940 # NonStop-UX NCC 3.20
5941 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5942 ;;
5943 *)
5944 ;;
5945 esac
5946 ;;
5947 unixware*)
5948 ;;
5949 vxworks*)
5950 ;;
5951 *)
5952 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5953 ;;
5954 esac
5955 fi
5956 ],
5957 [
5958 if test "$GCC" = yes; then
5959 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5960 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5961
5962 case $host_os in
5963 aix*)
5964 # All AIX code is PIC.
5965 if test "$host_cpu" = ia64; then
5966 # AIX 5 now supports IA64 processor
5967 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5968 fi
5969 ;;
5970
5971 amigaos*)
5972 # FIXME: we need at least 68020 code to build shared libraries, but
5973 # adding the `-m68020' flag to GCC prevents building anything better,
5974 # like `-m68040'.
5975 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5976 ;;
5977
5978 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5979 # PIC is the default for these OSes.
5980 ;;
5981
5982 mingw* | pw32* | os2*)
5983 # This hack is so that the source file can tell whether it is being
5984 # built for inclusion in a dll (and should export symbols for example).
5985 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5986 ;;
5987
5988 darwin* | rhapsody*)
5989 # PIC is the default on this platform
5990 # Common symbols not allowed in MH_DYLIB files
5991 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5992 ;;
5993
5994 msdosdjgpp*)
5995 # Just because we use GCC doesn't mean we suddenly get shared libraries
5996 # on systems that don't support them.
5997 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5998 enable_shared=no
5999 ;;
6000
6001 sysv4*MP*)
6002 if test -d /usr/nec; then
6003 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6004 fi
6005 ;;
6006
6007 hpux*)
6008 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6009 # not for PA HP-UX.
6010 case $host_cpu in
6011 hppa*64*|ia64*)
6012 # +Z the default
6013 ;;
6014 *)
6015 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6016 ;;
6017 esac
6018 ;;
6019
6020 *)
6021 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6022 ;;
6023 esac
6024 else
6025 # PORTME Check for flag to pass linker flags through the system compiler.
6026 case $host_os in
6027 aix*)
6028 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6029 if test "$host_cpu" = ia64; then
6030 # AIX 5 now supports IA64 processor
6031 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6032 else
6033 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6034 fi
6035 ;;
6036 darwin*)
6037 # PIC is the default on this platform
6038 # Common symbols not allowed in MH_DYLIB files
6039 case $cc_basename in
6040 xlc*)
6041 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6042 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6043 ;;
6044 esac
6045 ;;
6046
6047 mingw* | pw32* | os2*)
6048 # This hack is so that the source file can tell whether it is being
6049 # built for inclusion in a dll (and should export symbols for example).
6050 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6051 ;;
6052
6053 hpux9* | hpux10* | hpux11*)
6054 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6055 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6056 # not for PA HP-UX.
6057 case $host_cpu in
6058 hppa*64*|ia64*)
6059 # +Z the default
6060 ;;
6061 *)
6062 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6063 ;;
6064 esac
6065 # Is there a better lt_prog_compiler_static that works with the bundled CC?
6066 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6067 ;;
6068
6069 irix5* | irix6* | nonstopux*)
6070 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6071 # PIC (with -KPIC) is the default.
6072 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6073 ;;
6074
6075 newsos6)
6076 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6077 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6078 ;;
6079
6080 linux*)
6081 case $cc_basename in
6082 icc* | ecc*)
6083 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6084 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6085 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6086 ;;
6087 pgcc* | pgf77* | pgf90* | pgf95*)
6088 # Portland Group compilers (*not* the Pentium gcc compiler,
6089 # which looks to be a dead project)
6090 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6091 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6092 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6093 ;;
6094 ccc*)
6095 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6096 # All Alpha code is PIC.
6097 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6098 ;;
6099 esac
6100 ;;
6101
6102 osf3* | osf4* | osf5*)
6103 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6104 # All OSF/1 code is PIC.
6105 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6106 ;;
6107
6108 sco3.2v5*)
6109 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
6110 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
6111 ;;
6112
6113 solaris*)
6114 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6115 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6116 case $cc_basename in
6117 f77* | f90* | f95*)
6118 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6119 *)
6120 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6121 esac
6122 ;;
6123
6124 sunos4*)
6125 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6126 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6127 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6128 ;;
6129
6130 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6131 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6132 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6133 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6134 ;;
6135
6136 sysv4*MP*)
6137 if test -d /usr/nec ;then
6138 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6139 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6140 fi
6141 ;;
6142
6143 unicos*)
6144 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6145 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6146 ;;
6147
6148 uts4*)
6149 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6150 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6151 ;;
6152
6153 *)
6154 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6155 ;;
6156 esac
6157 fi
6158 ])
6159 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6160
6161 #
6162 # Check to make sure the PIC flag actually works.
6163 #
6164 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6165 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6166 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6167 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6168 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6169 "" | " "*) ;;
6170 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6171 esac],
6172 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6173 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6174 fi
6175 case $host_os in
6176 # For platforms which do not support PIC, -DPIC is meaningless:
6177 *djgpp*)
6178 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6179 ;;
6180 *)
6181 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6182 ;;
6183 esac
6184 ])
6185
6186
6187 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6188 # ------------------------------------
6189 # See if the linker supports building shared libraries.
6190 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6191 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6192 ifelse([$1],[CXX],[
6193 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6194 case $host_os in
6195 aix4* | aix5*)
6196 # If we're using GNU nm, then we don't want the "-C" option.
6197 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6198 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6199 _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'
6200 else
6201 _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'
6202 fi
6203 ;;
6204 pw32*)
6205 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6206 ;;
6207 cygwin* | mingw*)
6208 _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'
6209 ;;
6210 linux*)
6211 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6212 ;;
6213 *)
6214 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6215 ;;
6216 esac
6217 ],[
6218 runpath_var=
6219 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6220 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6221 _LT_AC_TAGVAR(archive_cmds, $1)=
6222 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6223 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6224 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6225 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6226 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6227 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6228 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6229 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6230 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6231 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6232 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6233 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6234 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6235 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6236 _LT_AC_TAGVAR(module_cmds, $1)=
6237 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6238 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6239 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6240 # include_expsyms should be a list of space-separated symbols to be *always*
6241 # included in the symbol list
6242 _LT_AC_TAGVAR(include_expsyms, $1)=
6243 # exclude_expsyms can be an extended regexp of symbols to exclude
6244 # it will be wrapped by ` (' and `)$', so one must not match beginning or
6245 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6246 # as well as any symbol that contains `d'.
6247 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6248 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6249 # platforms (ab)use it in PIC code, but their linkers get confused if
6250 # the symbol is explicitly referenced. Since portable code cannot
6251 # rely on this symbol name, it's probably fine to never include it in
6252 # preloaded symbol tables.
6253 extract_expsyms_cmds=
6254 # Just being paranoid about ensuring that cc_basename is set.
6255 _LT_CC_BASENAME([$compiler])
6256 case $host_os in
6257 cygwin* | mingw* | pw32*)
6258 # FIXME: the MSVC++ port hasn't been tested in a loooong time
6259 # When not using gcc, we currently assume that we are using
6260 # Microsoft Visual C++.
6261 if test "$GCC" != yes; then
6262 with_gnu_ld=no
6263 fi
6264 ;;
6265 openbsd*)
6266 with_gnu_ld=no
6267 ;;
6268 esac
6269
6270 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6271 if test "$with_gnu_ld" = yes; then
6272 # If archive_cmds runs LD, not CC, wlarc should be empty
6273 wlarc='${wl}'
6274
6275 # Set some defaults for GNU ld with shared library support. These
6276 # are reset later if shared libraries are not supported. Putting them
6277 # here allows them to be overridden if necessary.
6278 runpath_var=LD_RUN_PATH
6279 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6280 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6281 # ancient GNU ld didn't support --whole-archive et. al.
6282 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6283 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6284 else
6285 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6286 fi
6287 supports_anon_versioning=no
6288 case `$LD -v 2>/dev/null` in
6289 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6290 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6291 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6292 *\ 2.11.*) ;; # other 2.11 versions
6293 *) supports_anon_versioning=yes ;;
6294 esac
6295
6296 # See if GNU ld supports shared libraries.
6297 case $host_os in
6298 aix3* | aix4* | aix5*)
6299 # On AIX/PPC, the GNU linker is very broken
6300 if test "$host_cpu" != ia64; then
6301 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6302 cat <<EOF 1>&2
6303
6304 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6305 *** to be unable to reliably create shared libraries on AIX.
6306 *** Therefore, libtool is disabling shared libraries support. If you
6307 *** really care for shared libraries, you may want to modify your PATH
6308 *** so that a non-GNU linker is found, and then restart.
6309
6310 EOF
6311 fi
6312 ;;
6313
6314 amigaos*)
6315 _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)'
6316 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6317 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6318
6319 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6320 # that the semantics of dynamic libraries on AmigaOS, at least up
6321 # to version 4, is to share data among multiple programs linked
6322 # with the same dynamic library. Since this doesn't match the
6323 # behavior of shared libraries on other platforms, we can't use
6324 # them.
6325 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6326 ;;
6327
6328 beos*)
6329 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6330 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6331 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6332 # support --undefined. This deserves some investigation. FIXME
6333 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6334 else
6335 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6336 fi
6337 ;;
6338
6339 cygwin* | mingw* | pw32*)
6340 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6341 # as there is no search path for DLLs.
6342 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6343 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6344 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6345 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6346 _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'
6347
6348 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6349 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6350 # If the export-symbols file already is a .def file (1st line
6351 # is EXPORTS), use it as is; otherwise, prepend...
6352 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6353 cp $export_symbols $output_objdir/$soname.def;
6354 else
6355 echo EXPORTS > $output_objdir/$soname.def;
6356 cat $export_symbols >> $output_objdir/$soname.def;
6357 fi~
6358 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6359 else
6360 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6361 fi
6362 ;;
6363
6364 linux*)
6365 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6366 tmp_addflag=
6367 case $cc_basename,$host_cpu in
6368 pgcc*) # Portland Group C compiler
6369 _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'
6370 tmp_addflag=' $pic_flag'
6371 ;;
6372 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
6373 _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'
6374 tmp_addflag=' $pic_flag -Mnomain' ;;
6375 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6376 tmp_addflag=' -i_dynamic' ;;
6377 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6378 tmp_addflag=' -i_dynamic -nofor_main' ;;
6379 ifc* | ifort*) # Intel Fortran compiler
6380 tmp_addflag=' -nofor_main' ;;
6381 esac
6382 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6383
6384 if test $supports_anon_versioning = yes; then
6385 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6386 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6387 $echo "local: *; };" >> $output_objdir/$libname.ver~
6388 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6389 fi
6390 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6391 else
6392 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6393 fi
6394 ;;
6395
6396 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
6397 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6398 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6399 wlarc=
6400 else
6401 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6402 _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'
6403 fi
6404 ;;
6405
6406 solaris* | sysv5*)
6407 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6408 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6409 cat <<EOF 1>&2
6410
6411 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6412 *** create shared libraries on Solaris systems. Therefore, libtool
6413 *** is disabling shared libraries support. We urge you to upgrade GNU
6414 *** binutils to release 2.9.1 or newer. Another option is to modify
6415 *** your PATH or compiler configuration so that the native linker is
6416 *** used, and then restart.
6417
6418 EOF
6419 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6420 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6421 _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'
6422 else
6423 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6424 fi
6425 ;;
6426
6427 sunos4*)
6428 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6429 wlarc=
6430 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6431 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6432 ;;
6433
6434 *)
6435 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6436 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6437 _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'
6438 else
6439 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6440 fi
6441 ;;
6442 esac
6443
6444 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6445 runpath_var=
6446 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6447 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6448 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6449 fi
6450 else
6451 # PORTME fill in a description of your system's linker (not GNU ld)
6452 case $host_os in
6453 aix3*)
6454 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6455 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6456 _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'
6457 # Note: this linker hardcodes the directories in LIBPATH if there
6458 # are no directories specified by -L.
6459 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6460 if test "$GCC" = yes && test -z "$link_static_flag"; then
6461 # Neither direct hardcoding nor static linking is supported with a
6462 # broken collect2.
6463 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6464 fi
6465 ;;
6466
6467 aix4* | aix5*)
6468 if test "$host_cpu" = ia64; then
6469 # On IA64, the linker does run time linking by default, so we don't
6470 # have to do anything special.
6471 aix_use_runtimelinking=no
6472 exp_sym_flag='-Bexport'
6473 no_entry_flag=""
6474 else
6475 # If we're using GNU nm, then we don't want the "-C" option.
6476 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6477 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6478 _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'
6479 else
6480 _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'
6481 fi
6482 aix_use_runtimelinking=no
6483
6484 # Test if we are trying to use run time linking or normal
6485 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6486 # need to do runtime linking.
6487 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6488 for ld_flag in $LDFLAGS; do
6489 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6490 aix_use_runtimelinking=yes
6491 break
6492 fi
6493 done
6494 esac
6495
6496 exp_sym_flag='-bexport'
6497 no_entry_flag='-bnoentry'
6498 fi
6499
6500 # When large executables or shared objects are built, AIX ld can
6501 # have problems creating the table of contents. If linking a library
6502 # or program results in "error TOC overflow" add -mminimal-toc to
6503 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6504 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6505
6506 _LT_AC_TAGVAR(archive_cmds, $1)=''
6507 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6508 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6509 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6510
6511 if test "$GCC" = yes; then
6512 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6513 # We only want to do this on AIX 4.2 and lower, the check
6514 # below for broken collect2 doesn't work under 4.3+
6515 collect2name=`${CC} -print-prog-name=collect2`
6516 if test -f "$collect2name" && \
6517 strings "$collect2name" | grep resolve_lib_name >/dev/null
6518 then
6519 # We have reworked collect2
6520 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6521 else
6522 # We have old collect2
6523 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6524 # It fails to find uninstalled libraries when the uninstalled
6525 # path is not listed in the libpath. Setting hardcode_minus_L
6526 # to unsupported forces relinking
6527 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6528 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6529 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6530 fi
6531 esac
6532 shared_flag='-shared'
6533 if test "$aix_use_runtimelinking" = yes; then
6534 shared_flag="$shared_flag "'${wl}-G'
6535 fi
6536 else
6537 # not using gcc
6538 if test "$host_cpu" = ia64; then
6539 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6540 # chokes on -Wl,-G. The following line is correct:
6541 shared_flag='-G'
6542 else
6543 if test "$aix_use_runtimelinking" = yes; then
6544 shared_flag='${wl}-G'
6545 else
6546 shared_flag='${wl}-bM:SRE'
6547 fi
6548 fi
6549 fi
6550
6551 # It seems that -bexpall does not export symbols beginning with
6552 # underscore (_), so it is better to generate a list of symbols to export.
6553 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6554 if test "$aix_use_runtimelinking" = yes; then
6555 # Warning - without using the other runtime loading flags (-brtl),
6556 # -berok will link without error, but may produce a broken library.
6557 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6558 # Determine the default libpath from the value encoded in an empty executable.
6559 _LT_AC_SYS_LIBPATH_AIX
6560 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6561 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6562 else
6563 if test "$host_cpu" = ia64; then
6564 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6565 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6566 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
6567 else
6568 # Determine the default libpath from the value encoded in an empty executable.
6569 _LT_AC_SYS_LIBPATH_AIX
6570 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6571 # Warning - without using the other run time loading flags,
6572 # -berok will link without error, but may produce a broken library.
6573 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6574 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6575 # -bexpall does not export symbols beginning with underscore (_)
6576 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6577 # Exported symbols can be pulled into shared objects from archives
6578 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6579 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6580 # This is similar to how AIX traditionally builds its shared libraries.
6581 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6582 fi
6583 fi
6584 ;;
6585
6586 amigaos*)
6587 _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)'
6588 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6589 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6590 # see comment about different semantics on the GNU ld section
6591 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6592 ;;
6593
6594 bsdi[[45]]*)
6595 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6596 ;;
6597
6598 cygwin* | mingw* | pw32*)
6599 # When not using gcc, we currently assume that we are using
6600 # Microsoft Visual C++.
6601 # hardcode_libdir_flag_spec is actually meaningless, as there is
6602 # no search path for DLLs.
6603 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6604 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6605 # Tell ltmain to make .lib files, not .a files.
6606 libext=lib
6607 # Tell ltmain to make .dll files, not .so files.
6608 shrext_cmds=".dll"
6609 # FIXME: Setting linknames here is a bad hack.
6610 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6611 # The linker will automatically build a .lib file if we build a DLL.
6612 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6613 # FIXME: Should let the user specify the lib program.
6614 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6615 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6616 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6617 ;;
6618
6619 darwin* | rhapsody*)
6620 case $host_os in
6621 rhapsody* | darwin1.[[012]])
6622 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6623 ;;
6624 *) # Darwin 1.3 on
6625 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6626 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6627 else
6628 case ${MACOSX_DEPLOYMENT_TARGET} in
6629 10.[[012]])
6630 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6631 ;;
6632 10.*)
6633 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6634 ;;
6635 esac
6636 fi
6637 ;;
6638 esac
6639 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6640 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6641 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6642 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6643 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6644 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6645 if test "$GCC" = yes ; then
6646 output_verbose_link_cmd='echo'
6647 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6648 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6649 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6650 _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}'
6651 _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}'
6652 else
6653 case $cc_basename in
6654 xlc*)
6655 output_verbose_link_cmd='echo'
6656 _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'
6657 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6658 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6659 _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}'
6660 _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}'
6661 ;;
6662 *)
6663 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6664 ;;
6665 esac
6666 fi
6667 ;;
6668
6669 dgux*)
6670 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6671 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6672 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6673 ;;
6674
6675 freebsd1*)
6676 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6677 ;;
6678
6679 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6680 # support. Future versions do this automatically, but an explicit c++rt0.o
6681 # does not break anything, and helps significantly (at the cost of a little
6682 # extra space).
6683 freebsd2.2*)
6684 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6685 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6686 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6687 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6688 ;;
6689
6690 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6691 freebsd2*)
6692 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6693 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6694 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6695 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6696 ;;
6697
6698 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6699 freebsd* | kfreebsd*-gnu | dragonfly*)
6700 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6701 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6702 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6703 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6704 ;;
6705
6706 hpux9*)
6707 if test "$GCC" = yes; then
6708 _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'
6709 else
6710 _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'
6711 fi
6712 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6713 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6714 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6715
6716 # hardcode_minus_L: Not really in the search PATH,
6717 # but as the default location of the library.
6718 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6719 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6720 ;;
6721
6722 hpux10* | hpux11*)
6723 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6724 case $host_cpu in
6725 hppa*64*|ia64*)
6726 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6727 ;;
6728 *)
6729 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6730 ;;
6731 esac
6732 else
6733 case $host_cpu in
6734 hppa*64*|ia64*)
6735 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6736 ;;
6737 *)
6738 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6739 ;;
6740 esac
6741 fi
6742 if test "$with_gnu_ld" = no; then
6743 case $host_cpu in
6744 hppa*64*)
6745 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6746 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6747 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6748 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6749 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6750 ;;
6751 ia64*)
6752 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6753 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6754 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6755
6756 # hardcode_minus_L: Not really in the search PATH,
6757 # but as the default location of the library.
6758 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6759 ;;
6760 *)
6761 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6762 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6763 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6764 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6765
6766 # hardcode_minus_L: Not really in the search PATH,
6767 # but as the default location of the library.
6768 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6769 ;;
6770 esac
6771 fi
6772 ;;
6773
6774 irix5* | irix6* | nonstopux*)
6775 if test "$GCC" = yes; then
6776 _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'
6777 else
6778 _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'
6779 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6780 fi
6781 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6782 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6783 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6784 ;;
6785
6786 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
6787 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6788 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6789 else
6790 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6791 fi
6792 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6793 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6794 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6795 ;;
6796
6797 newsos6)
6798 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6799 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6800 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6801 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6802 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6803 ;;
6804
6805 openbsd*)
6806 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6807 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6808 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6809 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6810 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6811 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6812 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6813 else
6814 case $host_os in
6815 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6816 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6817 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6818 ;;
6819 *)
6820 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6821 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6822 ;;
6823 esac
6824 fi
6825 ;;
6826
6827 os2*)
6828 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6829 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6830 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6831 _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'
6832 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6833 ;;
6834
6835 osf3*)
6836 if test "$GCC" = yes; then
6837 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6838 _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'
6839 else
6840 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6841 _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'
6842 fi
6843 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6844 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6845 ;;
6846
6847 osf4* | osf5*) # as osf3* with the addition of -msym flag
6848 if test "$GCC" = yes; then
6849 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6850 _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'
6851 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6852 else
6853 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6854 _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'
6855 _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~
6856 $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'
6857
6858 # Both c and cxx compiler support -rpath directly
6859 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6860 fi
6861 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6862 ;;
6863
6864 sco3.2v5*)
6865 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6866 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6867 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6868 runpath_var=LD_RUN_PATH
6869 hardcode_runpath_var=yes
6870 ;;
6871
6872 solaris*)
6873 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6874 if test "$GCC" = yes; then
6875 wlarc='${wl}'
6876 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6877 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6878 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6879 else
6880 wlarc=''
6881 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6882 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6883 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6884 fi
6885 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6886 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6887 case $host_os in
6888 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6889 *)
6890 # The compiler driver will combine linker options so we
6891 # cannot just pass the convience library names through
6892 # without $wl, iff we do not link with $LD.
6893 # Luckily, gcc supports the same syntax we need for Sun Studio.
6894 # Supported since Solaris 2.6 (maybe 2.5.1?)
6895 case $wlarc in
6896 '')
6897 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6898 *)
6899 _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' ;;
6900 esac ;;
6901 esac
6902 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6903 ;;
6904
6905 sunos4*)
6906 if test "x$host_vendor" = xsequent; then
6907 # Use $CC to link under sequent, because it throws in some extra .o
6908 # files that make .init and .fini sections work.
6909 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6910 else
6911 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6912 fi
6913 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6914 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6915 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6916 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6917 ;;
6918
6919 sysv4)
6920 case $host_vendor in
6921 sni)
6922 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6923 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6924 ;;
6925 siemens)
6926 ## LD is ld it makes a PLAMLIB
6927 ## CC just makes a GrossModule.
6928 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6929 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6930 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6931 ;;
6932 motorola)
6933 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6934 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6935 ;;
6936 esac
6937 runpath_var='LD_RUN_PATH'
6938 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6939 ;;
6940
6941 sysv4.3*)
6942 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6943 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6944 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6945 ;;
6946
6947 sysv4*MP*)
6948 if test -d /usr/nec; then
6949 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6950 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6951 runpath_var=LD_RUN_PATH
6952 hardcode_runpath_var=yes
6953 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6954 fi
6955 ;;
6956
6957 sysv4.2uw2*)
6958 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6959 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6960 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6961 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6962 hardcode_runpath_var=yes
6963 runpath_var=LD_RUN_PATH
6964 ;;
6965
6966 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6967 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6968 if test "$GCC" = yes; then
6969 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6970 else
6971 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6972 fi
6973 runpath_var='LD_RUN_PATH'
6974 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6975 ;;
6976
6977 sysv5*)
6978 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6979 # $CC -shared without GNU ld will not create a library from C++
6980 # object files and a static libstdc++, better avoid it by now
6981 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6982 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6983 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6984 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6985 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6986 runpath_var='LD_RUN_PATH'
6987 ;;
6988
6989 uts4*)
6990 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6991 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6992 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6993 ;;
6994
6995 *)
6996 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6997 ;;
6998 esac
6999 fi
7000 ])
7001 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7002 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7003
7004 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
7005 if test "$GCC" = yes; then
7006 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7007 fi
7008
7009 #
7010 # Do we need to explicitly link libc?
7011 #
7012 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7013 x|xyes)
7014 # Assume -lc should be added
7015 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7016
7017 if test "$enable_shared" = yes && test "$GCC" = yes; then
7018 case $_LT_AC_TAGVAR(archive_cmds, $1) in
7019 *'~'*)
7020 # FIXME: we may have to deal with multi-command sequences.
7021 ;;
7022 '$CC '*)
7023 # Test whether the compiler implicitly links with -lc since on some
7024 # systems, -lgcc has to come before -lc. If gcc already passes -lc
7025 # to ld, don't add -lc before -lgcc.
7026 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7027 $rm conftest*
7028 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7029
7030 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7031 soname=conftest
7032 lib=conftest
7033 libobjs=conftest.$ac_objext
7034 deplibs=
7035 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7036 compiler_flags=-v
7037 linker_flags=-v
7038 verstring=
7039 output_objdir=.
7040 libname=conftest
7041 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7042 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7043 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7044 then
7045 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7046 else
7047 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7048 fi
7049 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7050 else
7051 cat conftest.err 1>&5
7052 fi
7053 $rm conftest*
7054 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7055 ;;
7056 esac
7057 fi
7058 ;;
7059 esac
7060 ])# AC_LIBTOOL_PROG_LD_SHLIBS
7061
7062
7063 # _LT_AC_FILE_LTDLL_C
7064 # -------------------
7065 # Be careful that the start marker always follows a newline.
7066 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7067 # /* ltdll.c starts here */
7068 # #define WIN32_LEAN_AND_MEAN
7069 # #include <windows.h>
7070 # #undef WIN32_LEAN_AND_MEAN
7071 # #include <stdio.h>
7072 #
7073 # #ifndef __CYGWIN__
7074 # # ifdef __CYGWIN32__
7075 # # define __CYGWIN__ __CYGWIN32__
7076 # # endif
7077 # #endif
7078 #
7079 # #ifdef __cplusplus
7080 # extern "C" {
7081 # #endif
7082 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7083 # #ifdef __cplusplus
7084 # }
7085 # #endif
7086 #
7087 # #ifdef __CYGWIN__
7088 # #include <cygwin/cygwin_dll.h>
7089 # DECLARE_CYGWIN_DLL( DllMain );
7090 # #endif
7091 # HINSTANCE __hDllInstance_base;
7092 #
7093 # BOOL APIENTRY
7094 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7095 # {
7096 # __hDllInstance_base = hInst;
7097 # return TRUE;
7098 # }
7099 # /* ltdll.c ends here */
7100 ])# _LT_AC_FILE_LTDLL_C
7101
7102
7103 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7104 # ---------------------------------
7105 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7106
7107
7108 # old names
7109 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
7110 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7111 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7112 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7113 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7114 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
7115 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
7116
7117 # This is just to silence aclocal about the macro not being used
7118 ifelse([AC_DISABLE_FAST_INSTALL])
7119
7120 AC_DEFUN([LT_AC_PROG_GCJ],
7121 [AC_CHECK_TOOL(GCJ, gcj, no)
7122 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7123 AC_SUBST(GCJFLAGS)
7124 ])
7125
7126 AC_DEFUN([LT_AC_PROG_RC],
7127 [AC_CHECK_TOOL(RC, windres, no)
7128 ])
7129
7130 # NOTE: This macro has been submitted for inclusion into #
7131 # GNU Autoconf as AC_PROG_SED. When it is available in #
7132 # a released version of Autoconf we should remove this #
7133 # macro and use it instead. #
7134 # LT_AC_PROG_SED
7135 # --------------
7136 # Check for a fully-functional sed program, that truncates
7137 # as few characters as possible. Prefer GNU sed if found.
7138 AC_DEFUN([LT_AC_PROG_SED],
7139 [AC_MSG_CHECKING([for a sed that does not truncate output])
7140 AC_CACHE_VAL(lt_cv_path_SED,
7141 [# Loop through the user's path and test for sed and gsed.
7142 # Then use that list of sed's as ones to test for truncation.
7143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7144 for as_dir in $PATH
7145 do
7146 IFS=$as_save_IFS
7147 test -z "$as_dir" && as_dir=.
7148 for lt_ac_prog in sed gsed; do
7149 for ac_exec_ext in '' $ac_executable_extensions; do
7150 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7151 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7152 fi
7153 done
7154 done
7155 done
7156 lt_ac_max=0
7157 lt_ac_count=0
7158 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7159 # along with /bin/sed that truncates output.
7160 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7161 test ! -f $lt_ac_sed && continue
7162 cat /dev/null > conftest.in
7163 lt_ac_count=0
7164 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7165 # Check for GNU sed and select it if it is found.
7166 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7167 lt_cv_path_SED=$lt_ac_sed
7168 break
7169 fi
7170 while true; do
7171 cat conftest.in conftest.in >conftest.tmp
7172 mv conftest.tmp conftest.in
7173 cp conftest.in conftest.nl
7174 echo >>conftest.nl
7175 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7176 cmp -s conftest.out conftest.nl || break
7177 # 10000 chars as input seems more than enough
7178 test $lt_ac_count -gt 10 && break
7179 lt_ac_count=`expr $lt_ac_count + 1`
7180 if test $lt_ac_count -gt $lt_ac_max; then
7181 lt_ac_max=$lt_ac_count
7182 lt_cv_path_SED=$lt_ac_sed
7183 fi
7184 done
7185 done
7186 ])
7187 SED=$lt_cv_path_SED
7188 AC_MSG_RESULT([$SED])
7189 ])
7190
7191 # gettext.m4 serial 37 (gettext-0.14.4)
7192 dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
7193 dnl This file is free software; the Free Software Foundation
7194 dnl gives unlimited permission to copy and/or distribute it,
7195 dnl with or without modifications, as long as this notice is preserved.
7196 dnl
7197 dnl This file can can be used in projects which are not available under
7198 dnl the GNU General Public License or the GNU Library General Public
7199 dnl License but which still want to provide support for the GNU gettext
7200 dnl functionality.
7201 dnl Please note that the actual code of the GNU gettext library is covered
7202 dnl by the GNU Library General Public License, and the rest of the GNU
7203 dnl gettext package package is covered by the GNU General Public License.
7204 dnl They are *not* in the public domain.
7205
7206 dnl Authors:
7207 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
7208 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
7209
7210 dnl Macro to add for using GNU gettext.
7211
7212 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
7213 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
7214 dnl default (if it is not specified or empty) is 'no-libtool'.
7215 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
7216 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
7217 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
7218 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
7219 dnl depending on --{enable,disable}-{shared,static} and on the presence of
7220 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
7221 dnl $(top_builddir)/intl/libintl.a will be created.
7222 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
7223 dnl implementations (in libc or libintl) without the ngettext() function
7224 dnl will be ignored. If NEEDSYMBOL is specified and is
7225 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
7226 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
7227 dnl INTLDIR is used to find the intl libraries. If empty,
7228 dnl the value `$(top_builddir)/intl/' is used.
7229 dnl
7230 dnl The result of the configuration is one of three cases:
7231 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
7232 dnl and used.
7233 dnl Catalog format: GNU --> install in $(datadir)
7234 dnl Catalog extension: .mo after installation, .gmo in source tree
7235 dnl 2) GNU gettext has been found in the system's C library.
7236 dnl Catalog format: GNU --> install in $(datadir)
7237 dnl Catalog extension: .mo after installation, .gmo in source tree
7238 dnl 3) No internationalization, always use English msgid.
7239 dnl Catalog format: none
7240 dnl Catalog extension: none
7241 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
7242 dnl The use of .gmo is historical (it was needed to avoid overwriting the
7243 dnl GNU format catalogs when building on a platform with an X/Open gettext),
7244 dnl but we keep it in order not to force irrelevant filename changes on the
7245 dnl maintainers.
7246 dnl
7247 AC_DEFUN([AM_GNU_GETTEXT],
7248 [
7249 dnl Argument checking.
7250 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
7251 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
7252 ])])])])])
7253 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
7254 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
7255 ])])])])
7256 define([gt_included_intl], ifelse([$1], [external], [no], [yes]))
7257 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
7258
7259 AC_REQUIRE([AM_PO_SUBDIRS])dnl
7260 ifelse(gt_included_intl, yes, [
7261 AC_REQUIRE([AM_INTL_SUBDIR])dnl
7262 ])
7263
7264 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
7265 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
7266 AC_REQUIRE([AC_LIB_RPATH])
7267
7268 dnl Sometimes libintl requires libiconv, so first search for libiconv.
7269 dnl Ideally we would do this search only after the
7270 dnl if test "$USE_NLS" = "yes"; then
7271 dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
7272 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
7273 dnl the configure script would need to contain the same shell code
7274 dnl again, outside any 'if'. There are two solutions:
7275 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
7276 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
7277 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
7278 dnl documented, we avoid it.
7279 ifelse(gt_included_intl, yes, , [
7280 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
7281 ])
7282
7283 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
7284 gt_INTL_MACOSX
7285
7286 dnl Set USE_NLS.
7287 AM_NLS
7288
7289 ifelse(gt_included_intl, yes, [
7290 BUILD_INCLUDED_LIBINTL=no
7291 USE_INCLUDED_LIBINTL=no
7292 ])
7293 LIBINTL=
7294 LTLIBINTL=
7295 POSUB=
7296
7297 dnl If we use NLS figure out what method
7298 if test "$USE_NLS" = "yes"; then
7299 gt_use_preinstalled_gnugettext=no
7300 ifelse(gt_included_intl, yes, [
7301 AC_MSG_CHECKING([whether included gettext is requested])
7302 AC_ARG_WITH(included-gettext,
7303 [ --with-included-gettext use the GNU gettext library included here],
7304 nls_cv_force_use_gnu_gettext=$withval,
7305 nls_cv_force_use_gnu_gettext=no)
7306 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
7307
7308 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7309 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7310 ])
7311 dnl User does not insist on using GNU NLS library. Figure out what
7312 dnl to use. If GNU gettext is available we use this. Else we have
7313 dnl to fall back to GNU NLS library.
7314
7315 dnl Add a version number to the cache macros.
7316 define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
7317 define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
7318 define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
7319
7320 AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
7321 [AC_TRY_LINK([#include <libintl.h>
7322 ]ifelse([$2], [need-formatstring-macros],
7323 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
7324 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
7325 #endif
7326 changequote(,)dnl
7327 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
7328 changequote([,])dnl
7329 ], [])[extern int _nl_msg_cat_cntr;
7330 extern int *_nl_domain_bindings;],
7331 [bindtextdomain ("", "");
7332 return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
7333 gt_cv_func_gnugettext_libc=yes,
7334 gt_cv_func_gnugettext_libc=no)])
7335
7336 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
7337 dnl Sometimes libintl requires libiconv, so first search for libiconv.
7338 ifelse(gt_included_intl, yes, , [
7339 AM_ICONV_LINK
7340 ])
7341 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
7342 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
7343 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
7344 dnl even if libiconv doesn't exist.
7345 AC_LIB_LINKFLAGS_BODY([intl])
7346 AC_CACHE_CHECK([for GNU gettext in libintl],
7347 gt_cv_func_gnugettext_libintl,
7348 [gt_save_CPPFLAGS="$CPPFLAGS"
7349 CPPFLAGS="$CPPFLAGS $INCINTL"
7350 gt_save_LIBS="$LIBS"
7351 LIBS="$LIBS $LIBINTL"
7352 dnl Now see whether libintl exists and does not depend on libiconv.
7353 AC_TRY_LINK([#include <libintl.h>
7354 ]ifelse([$2], [need-formatstring-macros],
7355 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
7356 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
7357 #endif
7358 changequote(,)dnl
7359 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
7360 changequote([,])dnl
7361 ], [])[extern int _nl_msg_cat_cntr;
7362 extern
7363 #ifdef __cplusplus
7364 "C"
7365 #endif
7366 const char *_nl_expand_alias (const char *);],
7367 [bindtextdomain ("", "");
7368 return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
7369 gt_cv_func_gnugettext_libintl=yes,
7370 gt_cv_func_gnugettext_libintl=no)
7371 dnl Now see whether libintl exists and depends on libiconv.
7372 if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
7373 LIBS="$LIBS $LIBICONV"
7374 AC_TRY_LINK([#include <libintl.h>
7375 ]ifelse([$2], [need-formatstring-macros],
7376 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
7377 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
7378 #endif
7379 changequote(,)dnl
7380 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
7381 changequote([,])dnl
7382 ], [])[extern int _nl_msg_cat_cntr;
7383 extern
7384 #ifdef __cplusplus
7385 "C"
7386 #endif
7387 const char *_nl_expand_alias (const char *);],
7388 [bindtextdomain ("", "");
7389 return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
7390 [LIBINTL="$LIBINTL $LIBICONV"
7391 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
7392 gt_cv_func_gnugettext_libintl=yes
7393 ])
7394 fi
7395 CPPFLAGS="$gt_save_CPPFLAGS"
7396 LIBS="$gt_save_LIBS"])
7397 fi
7398
7399 dnl If an already present or preinstalled GNU gettext() is found,
7400 dnl use it. But if this macro is used in GNU gettext, and GNU
7401 dnl gettext is already preinstalled in libintl, we update this
7402 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
7403 if test "$gt_cv_func_gnugettext_libc" = "yes" \
7404 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
7405 && test "$PACKAGE" != gettext-runtime \
7406 && test "$PACKAGE" != gettext-tools; }; then
7407 gt_use_preinstalled_gnugettext=yes
7408 else
7409 dnl Reset the values set by searching for libintl.
7410 LIBINTL=
7411 LTLIBINTL=
7412 INCINTL=
7413 fi
7414
7415 ifelse(gt_included_intl, yes, [
7416 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
7417 dnl GNU gettext is not found in the C library.
7418 dnl Fall back on included GNU gettext library.
7419 nls_cv_use_gnu_gettext=yes
7420 fi
7421 fi
7422
7423 if test "$nls_cv_use_gnu_gettext" = "yes"; then
7424 dnl Mark actions used to generate GNU NLS library.
7425 BUILD_INCLUDED_LIBINTL=yes
7426 USE_INCLUDED_LIBINTL=yes
7427 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
7428 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
7429 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
7430 fi
7431
7432 CATOBJEXT=
7433 if test "$gt_use_preinstalled_gnugettext" = "yes" \
7434 || test "$nls_cv_use_gnu_gettext" = "yes"; then
7435 dnl Mark actions to use GNU gettext tools.
7436 CATOBJEXT=.gmo
7437 fi
7438 ])
7439
7440 if test -n "$INTL_MACOSX_LIBS"; then
7441 if test "$gt_use_preinstalled_gnugettext" = "yes" \
7442 || test "$nls_cv_use_gnu_gettext" = "yes"; then
7443 dnl Some extra flags are needed during linking.
7444 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
7445 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
7446 fi
7447 fi
7448
7449 if test "$gt_use_preinstalled_gnugettext" = "yes" \
7450 || test "$nls_cv_use_gnu_gettext" = "yes"; then
7451 AC_DEFINE(ENABLE_NLS, 1,
7452 [Define to 1 if translation of program messages to the user's native language
7453 is requested.])
7454 else
7455 USE_NLS=no
7456 fi
7457 fi
7458
7459 AC_MSG_CHECKING([whether to use NLS])
7460 AC_MSG_RESULT([$USE_NLS])
7461 if test "$USE_NLS" = "yes"; then
7462 AC_MSG_CHECKING([where the gettext function comes from])
7463 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
7464 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
7465 gt_source="external libintl"
7466 else
7467 gt_source="libc"
7468 fi
7469 else
7470 gt_source="included intl directory"
7471 fi
7472 AC_MSG_RESULT([$gt_source])
7473 fi
7474
7475 if test "$USE_NLS" = "yes"; then
7476
7477 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
7478 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
7479 AC_MSG_CHECKING([how to link with libintl])
7480 AC_MSG_RESULT([$LIBINTL])
7481 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
7482 fi
7483
7484 dnl For backward compatibility. Some packages may be using this.
7485 AC_DEFINE(HAVE_GETTEXT, 1,
7486 [Define if the GNU gettext() function is already present or preinstalled.])
7487 AC_DEFINE(HAVE_DCGETTEXT, 1,
7488 [Define if the GNU dcgettext() function is already present or preinstalled.])
7489 fi
7490
7491 dnl We need to process the po/ directory.
7492 POSUB=po
7493 fi
7494
7495 ifelse(gt_included_intl, yes, [
7496 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
7497 dnl to 'yes' because some of the testsuite requires it.
7498 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
7499 BUILD_INCLUDED_LIBINTL=yes
7500 fi
7501
7502 dnl Make all variables we use known to autoconf.
7503 AC_SUBST(BUILD_INCLUDED_LIBINTL)
7504 AC_SUBST(USE_INCLUDED_LIBINTL)
7505 AC_SUBST(CATOBJEXT)
7506
7507 dnl For backward compatibility. Some configure.ins may be using this.
7508 nls_cv_header_intl=
7509 nls_cv_header_libgt=
7510
7511 dnl For backward compatibility. Some Makefiles may be using this.
7512 DATADIRNAME=share
7513 AC_SUBST(DATADIRNAME)
7514
7515 dnl For backward compatibility. Some Makefiles may be using this.
7516 INSTOBJEXT=.mo
7517 AC_SUBST(INSTOBJEXT)
7518
7519 dnl For backward compatibility. Some Makefiles may be using this.
7520 GENCAT=gencat
7521 AC_SUBST(GENCAT)
7522
7523 dnl For backward compatibility. Some Makefiles may be using this.
7524 INTLOBJS=
7525 if test "$USE_INCLUDED_LIBINTL" = yes; then
7526 INTLOBJS="\$(GETTOBJS)"
7527 fi
7528 AC_SUBST(INTLOBJS)
7529
7530 dnl Enable libtool support if the surrounding package wishes it.
7531 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
7532 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
7533 ])
7534
7535 dnl For backward compatibility. Some Makefiles may be using this.
7536 INTLLIBS="$LIBINTL"
7537 AC_SUBST(INTLLIBS)
7538
7539 dnl Make all documented variables known to autoconf.
7540 AC_SUBST(LIBINTL)
7541 AC_SUBST(LTLIBINTL)
7542 AC_SUBST(POSUB)
7543 ])
7544
7545
7546 dnl Checks for all prerequisites of the intl subdirectory,
7547 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
7548 dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
7549 AC_DEFUN([AM_INTL_SUBDIR],
7550 [
7551 AC_REQUIRE([AC_PROG_INSTALL])dnl
7552 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
7553 AC_REQUIRE([AC_PROG_CC])dnl
7554 AC_REQUIRE([AC_CANONICAL_HOST])dnl
7555 AC_REQUIRE([gt_GLIBC2])dnl
7556 AC_REQUIRE([AC_PROG_RANLIB])dnl
7557 AC_REQUIRE([AC_ISC_POSIX])dnl
7558 AC_REQUIRE([AC_HEADER_STDC])dnl
7559 AC_REQUIRE([AC_C_CONST])dnl
7560 AC_REQUIRE([bh_C_SIGNED])dnl
7561 AC_REQUIRE([AC_C_INLINE])dnl
7562 AC_REQUIRE([AC_TYPE_OFF_T])dnl
7563 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
7564 AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
7565 AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
7566 AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
7567 AC_REQUIRE([gt_TYPE_WINT_T])dnl
7568 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
7569 AC_REQUIRE([gl_AC_HEADER_STDINT_H])
7570 AC_REQUIRE([gt_TYPE_INTMAX_T])
7571 AC_REQUIRE([gt_PRINTF_POSIX])
7572 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
7573 AC_REQUIRE([AC_FUNC_MMAP])dnl
7574 AC_REQUIRE([gl_GLIBC21])dnl
7575 AC_REQUIRE([gt_INTDIV0])dnl
7576 AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
7577 AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
7578 AC_REQUIRE([gt_INTTYPES_PRI])dnl
7579 AC_REQUIRE([gl_XSIZE])dnl
7580 AC_REQUIRE([gt_INTL_MACOSX])dnl
7581
7582 AC_CHECK_TYPE([ptrdiff_t], ,
7583 [AC_DEFINE([ptrdiff_t], [long],
7584 [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
7585 ])
7586 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
7587 stdlib.h string.h unistd.h sys/param.h])
7588 AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
7589 mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
7590 strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
7591 __fsetlocking])
7592
7593 dnl Use the _snprintf function only if it is declared (because on NetBSD it
7594 dnl is defined as a weak alias of snprintf; we prefer to use the latter).
7595 gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
7596 gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
7597
7598 dnl Use the *_unlocked functions only if they are declared.
7599 dnl (because some of them were defined without being declared in Solaris
7600 dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
7601 dnl on Solaris 2.5.1 to run on Solaris 2.6).
7602 dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
7603 gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
7604 gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
7605 gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
7606
7607 case $gt_cv_func_printf_posix in
7608 *yes) HAVE_POSIX_PRINTF=1 ;;
7609 *) HAVE_POSIX_PRINTF=0 ;;
7610 esac
7611 AC_SUBST([HAVE_POSIX_PRINTF])
7612 if test "$ac_cv_func_asprintf" = yes; then
7613 HAVE_ASPRINTF=1
7614 else
7615 HAVE_ASPRINTF=0
7616 fi
7617 AC_SUBST([HAVE_ASPRINTF])
7618 if test "$ac_cv_func_snprintf" = yes; then
7619 HAVE_SNPRINTF=1
7620 else
7621 HAVE_SNPRINTF=0
7622 fi
7623 AC_SUBST([HAVE_SNPRINTF])
7624 if test "$ac_cv_func_wprintf" = yes; then
7625 HAVE_WPRINTF=1
7626 else
7627 HAVE_WPRINTF=0
7628 fi
7629 AC_SUBST([HAVE_WPRINTF])
7630
7631 AM_ICONV
7632 AM_LANGINFO_CODESET
7633 if test $ac_cv_header_locale_h = yes; then
7634 gt_LC_MESSAGES
7635 fi
7636
7637 if test -n "$INTL_MACOSX_LIBS"; then
7638 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
7639 fi
7640
7641 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
7642 dnl because plural.y uses bison specific features. It requires at least
7643 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
7644 dnl compile.
7645 dnl bison is only needed for the maintainer (who touches plural.y). But in
7646 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
7647 dnl the rule in general Makefile. Now, some people carelessly touch the
7648 dnl files or have a broken "make" program, hence the plural.c rule will
7649 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
7650 dnl present or too old.
7651 AC_CHECK_PROGS([INTLBISON], [bison])
7652 if test -z "$INTLBISON"; then
7653 ac_verc_fail=yes
7654 else
7655 dnl Found it, now check the version.
7656 AC_MSG_CHECKING([version of bison])
7657 changequote(<<,>>)dnl
7658 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
7659 case $ac_prog_version in
7660 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
7661 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
7662 changequote([,])dnl
7663 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
7664 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
7665 esac
7666 AC_MSG_RESULT([$ac_prog_version])
7667 fi
7668 if test $ac_verc_fail = yes; then
7669 INTLBISON=:
7670 fi
7671 ])
7672
7673
7674 dnl Checks for special options needed on MacOS X.
7675 dnl Defines INTL_MACOSX_LIBS.
7676 AC_DEFUN([gt_INTL_MACOSX],
7677 [
7678 dnl Check for API introduced in MacOS X 10.2.
7679 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
7680 gt_cv_func_CFPreferencesCopyAppValue,
7681 [gt_save_CPPFLAGS="$CPPFLAGS"
7682 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
7683 gt_save_LIBS="$LIBS"
7684 LIBS="$LIBS -framework CoreFoundation"
7685 AC_TRY_LINK([#include <CFPreferences.h>],
7686 [CFPreferencesCopyAppValue(NULL, NULL)],
7687 [gt_cv_func_CFPreferencesCopyAppValue=yes],
7688 [gt_cv_func_CFPreferencesCopyAppValue=no])
7689 CPPFLAGS="$gt_save_CPPFLAGS"
7690 LIBS="$gt_save_LIBS"])
7691 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
7692 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
7693 [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
7694 fi
7695 dnl Check for API introduced in MacOS X 10.3.
7696 AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
7697 [gt_save_CPPFLAGS="$CPPFLAGS"
7698 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
7699 gt_save_LIBS="$LIBS"
7700 LIBS="$LIBS -framework CoreFoundation"
7701 AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],
7702 [gt_cv_func_CFLocaleCopyCurrent=yes],
7703 [gt_cv_func_CFLocaleCopyCurrent=no])
7704 CPPFLAGS="$gt_save_CPPFLAGS"
7705 LIBS="$gt_save_LIBS"])
7706 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
7707 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
7708 [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
7709 fi
7710 INTL_MACOSX_LIBS=
7711 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
7712 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
7713 fi
7714 AC_SUBST([INTL_MACOSX_LIBS])
7715 ])
7716
7717
7718 dnl gt_CHECK_DECL(FUNC, INCLUDES)
7719 dnl Check whether a function is declared.
7720 AC_DEFUN([gt_CHECK_DECL],
7721 [
7722 AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
7723 [AC_TRY_COMPILE([$2], [
7724 #ifndef $1
7725 char *p = (char *) $1;
7726 #endif
7727 ], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
7728 if test $ac_cv_have_decl_$1 = yes; then
7729 gt_value=1
7730 else
7731 gt_value=0
7732 fi
7733 AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
7734 [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
7735 ])
7736
7737
7738 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
7739 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
7740
7741 # po.m4 serial 7 (gettext-0.14.3)
7742 dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
7743 dnl This file is free software; the Free Software Foundation
7744 dnl gives unlimited permission to copy and/or distribute it,
7745 dnl with or without modifications, as long as this notice is preserved.
7746 dnl
7747 dnl This file can can be used in projects which are not available under
7748 dnl the GNU General Public License or the GNU Library General Public
7749 dnl License but which still want to provide support for the GNU gettext
7750 dnl functionality.
7751 dnl Please note that the actual code of the GNU gettext library is covered
7752 dnl by the GNU Library General Public License, and the rest of the GNU
7753 dnl gettext package package is covered by the GNU General Public License.
7754 dnl They are *not* in the public domain.
7755
7756 dnl Authors:
7757 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
7758 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
7759
7760 AC_PREREQ(2.50)
7761
7762 dnl Checks for all prerequisites of the po subdirectory.
7763 AC_DEFUN([AM_PO_SUBDIRS],
7764 [
7765 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
7766 AC_REQUIRE([AC_PROG_INSTALL])dnl
7767 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
7768 AC_REQUIRE([AM_NLS])dnl
7769
7770 dnl Perform the following tests also if --disable-nls has been given,
7771 dnl because they are needed for "make dist" to work.
7772
7773 dnl Search for GNU msgfmt in the PATH.
7774 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
7775 dnl The second test excludes FreeBSD msgfmt.
7776 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
7777 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
7778 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
7779 :)
7780 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7781
7782 dnl Search for GNU xgettext 0.12 or newer in the PATH.
7783 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
7784 dnl The second test excludes FreeBSD xgettext.
7785 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
7786 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
7787 (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)],
7788 :)
7789 dnl Remove leftover from FreeBSD xgettext call.
7790 rm -f messages.po
7791
7792 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
7793 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
7794 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
7795
7796 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
7797 dnl Test whether we really found GNU msgfmt.
7798 if test "$GMSGFMT" != ":"; then
7799 dnl If it is no GNU msgfmt we define it as : so that the
7800 dnl Makefiles still can work.
7801 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
7802 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
7803 : ;
7804 else
7805 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
7806 AC_MSG_RESULT(
7807 [found $GMSGFMT program is not GNU msgfmt; ignore it])
7808 GMSGFMT=":"
7809 fi
7810 fi
7811
7812 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
7813 dnl Test whether we really found GNU xgettext.
7814 if test "$XGETTEXT" != ":"; then
7815 dnl If it is no GNU xgettext we define it as : so that the
7816 dnl Makefiles still can work.
7817 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
7818 (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
7819 : ;
7820 else
7821 AC_MSG_RESULT(
7822 [found xgettext program is not GNU xgettext; ignore it])
7823 XGETTEXT=":"
7824 fi
7825 dnl Remove leftover from FreeBSD xgettext call.
7826 rm -f messages.po
7827 fi
7828
7829 AC_OUTPUT_COMMANDS([
7830 for ac_file in $CONFIG_FILES; do
7831 # Support "outfile[:infile[:infile...]]"
7832 case "$ac_file" in
7833 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7834 esac
7835 # PO directories have a Makefile.in generated from Makefile.in.in.
7836 case "$ac_file" in */Makefile.in)
7837 # Adjust a relative srcdir.
7838 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
7839 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
7840 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
7841 # In autoconf-2.13 it is called $ac_given_srcdir.
7842 # In autoconf-2.50 it is called $srcdir.
7843 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
7844 case "$ac_given_srcdir" in
7845 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
7846 /*) top_srcdir="$ac_given_srcdir" ;;
7847 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
7848 esac
7849 # Treat a directory as a PO directory if and only if it has a
7850 # POTFILES.in file. This allows packages to have multiple PO
7851 # directories under different names or in different locations.
7852 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
7853 rm -f "$ac_dir/POTFILES"
7854 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
7855 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
7856 POMAKEFILEDEPS="POTFILES.in"
7857 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
7858 # on $ac_dir but don't depend on user-specified configuration
7859 # parameters.
7860 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
7861 # The LINGUAS file contains the set of available languages.
7862 if test -n "$OBSOLETE_ALL_LINGUAS"; then
7863 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
7864 fi
7865 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
7866 # Hide the ALL_LINGUAS assigment from automake.
7867 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
7868 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
7869 else
7870 # The set of available languages was given in configure.in.
7871 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
7872 fi
7873 # Compute POFILES
7874 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
7875 # Compute UPDATEPOFILES
7876 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
7877 # Compute DUMMYPOFILES
7878 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
7879 # Compute GMOFILES
7880 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
7881 case "$ac_given_srcdir" in
7882 .) srcdirpre= ;;
7883 *) srcdirpre='$(srcdir)/' ;;
7884 esac
7885 POFILES=
7886 UPDATEPOFILES=
7887 DUMMYPOFILES=
7888 GMOFILES=
7889 for lang in $ALL_LINGUAS; do
7890 POFILES="$POFILES $srcdirpre$lang.po"
7891 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
7892 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
7893 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
7894 done
7895 # CATALOGS depends on both $ac_dir and the user's LINGUAS
7896 # environment variable.
7897 INST_LINGUAS=
7898 if test -n "$ALL_LINGUAS"; then
7899 for presentlang in $ALL_LINGUAS; do
7900 useit=no
7901 if test "%UNSET%" != "$LINGUAS"; then
7902 desiredlanguages="$LINGUAS"
7903 else
7904 desiredlanguages="$ALL_LINGUAS"
7905 fi
7906 for desiredlang in $desiredlanguages; do
7907 # Use the presentlang catalog if desiredlang is
7908 # a. equal to presentlang, or
7909 # b. a variant of presentlang (because in this case,
7910 # presentlang can be used as a fallback for messages
7911 # which are not translated in the desiredlang catalog).
7912 case "$desiredlang" in
7913 "$presentlang"*) useit=yes;;
7914 esac
7915 done
7916 if test $useit = yes; then
7917 INST_LINGUAS="$INST_LINGUAS $presentlang"
7918 fi
7919 done
7920 fi
7921 CATALOGS=
7922 if test -n "$INST_LINGUAS"; then
7923 for lang in $INST_LINGUAS; do
7924 CATALOGS="$CATALOGS $lang.gmo"
7925 done
7926 fi
7927 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
7928 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"
7929 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
7930 if test -f "$f"; then
7931 case "$f" in
7932 *.orig | *.bak | *~) ;;
7933 *) cat "$f" >> "$ac_dir/Makefile" ;;
7934 esac
7935 fi
7936 done
7937 fi
7938 ;;
7939 esac
7940 done],
7941 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
7942 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
7943 # from automake.
7944 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
7945 # Capture the value of LINGUAS because we need it to compute CATALOGS.
7946 LINGUAS="${LINGUAS-%UNSET%}"
7947 ])
7948 ])
7949
7950 dnl Postprocesses a Makefile in a directory containing PO files.
7951 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
7952 [
7953 # When this code is run, in config.status, two variables have already been
7954 # set:
7955 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
7956 # - LINGUAS is the value of the environment variable LINGUAS at configure
7957 # time.
7958
7959 changequote(,)dnl
7960 # Adjust a relative srcdir.
7961 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
7962 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
7963 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
7964 # In autoconf-2.13 it is called $ac_given_srcdir.
7965 # In autoconf-2.50 it is called $srcdir.
7966 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
7967 case "$ac_given_srcdir" in
7968 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
7969 /*) top_srcdir="$ac_given_srcdir" ;;
7970 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
7971 esac
7972
7973 # Find a way to echo strings without interpreting backslash.
7974 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
7975 gt_echo='echo'
7976 else
7977 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
7978 gt_echo='printf %s\n'
7979 else
7980 echo_func () {
7981 cat <<EOT
7982 $*
7983 EOT
7984 }
7985 gt_echo='echo_func'
7986 fi
7987 fi
7988
7989 # A sed script that extracts the value of VARIABLE from a Makefile.
7990 sed_x_variable='
7991 # Test if the hold space is empty.
7992 x
7993 s/P/P/
7994 x
7995 ta
7996 # Yes it was empty. Look if we have the expected variable definition.
7997 /^[ ]*VARIABLE[ ]*=/{
7998 # Seen the first line of the variable definition.
7999 s/^[ ]*VARIABLE[ ]*=//
8000 ba
8001 }
8002 bd
8003 :a
8004 # Here we are processing a line from the variable definition.
8005 # Remove comment, more precisely replace it with a space.
8006 s/#.*$/ /
8007 # See if the line ends in a backslash.
8008 tb
8009 :b
8010 s/\\$//
8011 # Print the line, without the trailing backslash.
8012 p
8013 tc
8014 # There was no trailing backslash. The end of the variable definition is
8015 # reached. Clear the hold space.
8016 s/^.*$//
8017 x
8018 bd
8019 :c
8020 # A trailing backslash means that the variable definition continues in the
8021 # next line. Put a nonempty string into the hold space to indicate this.
8022 s/^.*$/P/
8023 x
8024 :d
8025 '
8026 changequote([,])dnl
8027
8028 # Set POTFILES to the value of the Makefile variable POTFILES.
8029 sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
8030 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
8031 # Compute POTFILES_DEPS as
8032 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
8033 POTFILES_DEPS=
8034 for file in $POTFILES; do
8035 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
8036 done
8037 POMAKEFILEDEPS=""
8038
8039 if test -n "$OBSOLETE_ALL_LINGUAS"; then
8040 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
8041 fi
8042 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
8043 # The LINGUAS file contains the set of available languages.
8044 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
8045 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
8046 else
8047 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
8048 sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
8049 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
8050 fi
8051 # Hide the ALL_LINGUAS assigment from automake.
8052 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
8053 # Compute POFILES
8054 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
8055 # Compute UPDATEPOFILES
8056 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
8057 # Compute DUMMYPOFILES
8058 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
8059 # Compute GMOFILES
8060 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
8061 # Compute PROPERTIESFILES
8062 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
8063 # Compute CLASSFILES
8064 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
8065 # Compute QMFILES
8066 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
8067 # Compute MSGFILES
8068 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
8069 # Compute RESOURCESDLLFILES
8070 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
8071 case "$ac_given_srcdir" in
8072 .) srcdirpre= ;;
8073 *) srcdirpre='$(srcdir)/' ;;
8074 esac
8075 POFILES=
8076 UPDATEPOFILES=
8077 DUMMYPOFILES=
8078 GMOFILES=
8079 PROPERTIESFILES=
8080 CLASSFILES=
8081 QMFILES=
8082 MSGFILES=
8083 RESOURCESDLLFILES=
8084 for lang in $ALL_LINGUAS; do
8085 POFILES="$POFILES $srcdirpre$lang.po"
8086 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
8087 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
8088 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
8089 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
8090 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
8091 QMFILES="$QMFILES $srcdirpre$lang.qm"
8092 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
8093 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
8094 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/'`
8095 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
8096 done
8097 # CATALOGS depends on both $ac_dir and the user's LINGUAS
8098 # environment variable.
8099 INST_LINGUAS=
8100 if test -n "$ALL_LINGUAS"; then
8101 for presentlang in $ALL_LINGUAS; do
8102 useit=no
8103 if test "%UNSET%" != "$LINGUAS"; then
8104 desiredlanguages="$LINGUAS"
8105 else
8106 desiredlanguages="$ALL_LINGUAS"
8107 fi
8108 for desiredlang in $desiredlanguages; do
8109 # Use the presentlang catalog if desiredlang is
8110 # a. equal to presentlang, or
8111 # b. a variant of presentlang (because in this case,
8112 # presentlang can be used as a fallback for messages
8113 # which are not translated in the desiredlang catalog).
8114 case "$desiredlang" in
8115 "$presentlang"*) useit=yes;;
8116 esac
8117 done
8118 if test $useit = yes; then
8119 INST_LINGUAS="$INST_LINGUAS $presentlang"
8120 fi
8121 done
8122 fi
8123 CATALOGS=
8124 JAVACATALOGS=
8125 QTCATALOGS=
8126 TCLCATALOGS=
8127 CSHARPCATALOGS=
8128 if test -n "$INST_LINGUAS"; then
8129 for lang in $INST_LINGUAS; do
8130 CATALOGS="$CATALOGS $lang.gmo"
8131 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
8132 QTCATALOGS="$QTCATALOGS $lang.qm"
8133 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
8134 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
8135 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/'`
8136 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
8137 done
8138 fi
8139
8140 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"
8141 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
8142 # Add dependencies that cannot be formulated as a simple suffix rule.
8143 for lang in $ALL_LINGUAS; do
8144 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
8145 cat >> "$ac_file.tmp" <<EOF
8146 $frobbedlang.msg: $lang.po
8147 @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
8148 \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
8149 EOF
8150 done
8151 fi
8152 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
8153 # Add dependencies that cannot be formulated as a simple suffix rule.
8154 for lang in $ALL_LINGUAS; do
8155 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/'`
8156 cat >> "$ac_file.tmp" <<EOF
8157 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
8158 @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
8159 \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
8160 EOF
8161 done
8162 fi
8163 if test -n "$POMAKEFILEDEPS"; then
8164 cat >> "$ac_file.tmp" <<EOF
8165 Makefile: $POMAKEFILEDEPS
8166 EOF
8167 fi
8168 mv "$ac_file.tmp" "$ac_file"
8169 ])
8170
8171 # nls.m4 serial 2 (gettext-0.14.3)
8172 dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc.
8173 dnl This file is free software; the Free Software Foundation
8174 dnl gives unlimited permission to copy and/or distribute it,
8175 dnl with or without modifications, as long as this notice is preserved.
8176 dnl
8177 dnl This file can can be used in projects which are not available under
8178 dnl the GNU General Public License or the GNU Library General Public
8179 dnl License but which still want to provide support for the GNU gettext
8180 dnl functionality.
8181 dnl Please note that the actual code of the GNU gettext library is covered
8182 dnl by the GNU Library General Public License, and the rest of the GNU
8183 dnl gettext package package is covered by the GNU General Public License.
8184 dnl They are *not* in the public domain.
8185
8186 dnl Authors:
8187 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
8188 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
8189
8190 AC_PREREQ(2.50)
8191
8192 AC_DEFUN([AM_NLS],
8193 [
8194 AC_MSG_CHECKING([whether NLS is requested])
8195 dnl Default is enabled NLS
8196 AC_ARG_ENABLE(nls,
8197 [ --disable-nls do not use Native Language Support],
8198 USE_NLS=$enableval, USE_NLS=yes)
8199 AC_MSG_RESULT($USE_NLS)
8200 AC_SUBST(USE_NLS)
8201 ])
8202
8203 AC_DEFUN([AM_MKINSTALLDIRS],
8204 [
8205 dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing.
8206 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])])
8207 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
8208 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
8209 dnl Try to locate it.
8210 MKINSTALLDIRS=
8211 if test -n "$ac_aux_dir"; then
8212 case "$ac_aux_dir" in
8213 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
8214 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
8215 esac
8216 fi
8217 if test -z "$MKINSTALLDIRS"; then
8218 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8219 fi
8220 AC_SUBST(MKINSTALLDIRS)
8221 ])
8222
8223 # progtest.m4 serial 4 (gettext-0.14.2)
8224 dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
8225 dnl This file is free software; the Free Software Foundation
8226 dnl gives unlimited permission to copy and/or distribute it,
8227 dnl with or without modifications, as long as this notice is preserved.
8228 dnl
8229 dnl This file can can be used in projects which are not available under
8230 dnl the GNU General Public License or the GNU Library General Public
8231 dnl License but which still want to provide support for the GNU gettext
8232 dnl functionality.
8233 dnl Please note that the actual code of the GNU gettext library is covered
8234 dnl by the GNU Library General Public License, and the rest of the GNU
8235 dnl gettext package package is covered by the GNU General Public License.
8236 dnl They are *not* in the public domain.
8237
8238 dnl Authors:
8239 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
8240
8241 AC_PREREQ(2.50)
8242
8243 # Search path for a program which passes the given test.
8244
8245 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
8246 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
8247 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
8248 [
8249 # Prepare PATH_SEPARATOR.
8250 # The user is always right.
8251 if test "${PATH_SEPARATOR+set}" != set; then
8252 echo "#! /bin/sh" >conf$$.sh
8253 echo "exit 0" >>conf$$.sh
8254 chmod +x conf$$.sh
8255 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8256 PATH_SEPARATOR=';'
8257 else
8258 PATH_SEPARATOR=:
8259 fi
8260 rm -f conf$$.sh
8261 fi
8262
8263 # Find out how to test for executable files. Don't use a zero-byte file,
8264 # as systems may use methods other than mode bits to determine executability.
8265 cat >conf$$.file <<_ASEOF
8266 #! /bin/sh
8267 exit 0
8268 _ASEOF
8269 chmod +x conf$$.file
8270 if test -x conf$$.file >/dev/null 2>&1; then
8271 ac_executable_p="test -x"
8272 else
8273 ac_executable_p="test -f"
8274 fi
8275 rm -f conf$$.file
8276
8277 # Extract the first word of "$2", so it can be a program name with args.
8278 set dummy $2; ac_word=[$]2
8279 AC_MSG_CHECKING([for $ac_word])
8280 AC_CACHE_VAL(ac_cv_path_$1,
8281 [case "[$]$1" in
8282 [[\\/]]* | ?:[[\\/]]*)
8283 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
8284 ;;
8285 *)
8286 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
8287 for ac_dir in ifelse([$5], , $PATH, [$5]); do
8288 IFS="$ac_save_IFS"
8289 test -z "$ac_dir" && ac_dir=.
8290 for ac_exec_ext in '' $ac_executable_extensions; do
8291 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
8292 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
8293 if [$3]; then
8294 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
8295 break 2
8296 fi
8297 fi
8298 done
8299 done
8300 IFS="$ac_save_IFS"
8301 dnl If no 4th arg is given, leave the cache variable unset,
8302 dnl so AC_PATH_PROGS will keep looking.
8303 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
8304 ])dnl
8305 ;;
8306 esac])dnl
8307 $1="$ac_cv_path_$1"
8308 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
8309 AC_MSG_RESULT([$]$1)
8310 else
8311 AC_MSG_RESULT(no)
8312 fi
8313 AC_SUBST($1)dnl
8314 ])
8315
8316 # iconv.m4 serial AM4 (gettext-0.11.3)
8317 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
8318 dnl This file is free software; the Free Software Foundation
8319 dnl gives unlimited permission to copy and/or distribute it,
8320 dnl with or without modifications, as long as this notice is preserved.
8321
8322 dnl From Bruno Haible.
8323
8324 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
8325 [
8326 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
8327 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
8328 AC_REQUIRE([AC_LIB_RPATH])
8329
8330 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
8331 dnl accordingly.
8332 AC_LIB_LINKFLAGS_BODY([iconv])
8333 ])
8334
8335 AC_DEFUN([AM_ICONV_LINK],
8336 [
8337 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
8338 dnl those with the standalone portable GNU libiconv installed).
8339
8340 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
8341 dnl accordingly.
8342 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
8343
8344 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
8345 dnl because if the user has installed libiconv and not disabled its use
8346 dnl via --without-libiconv-prefix, he wants to use it. The first
8347 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
8348 am_save_CPPFLAGS="$CPPFLAGS"
8349 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
8350
8351 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
8352 am_cv_func_iconv="no, consider installing GNU libiconv"
8353 am_cv_lib_iconv=no
8354 AC_TRY_LINK([#include <stdlib.h>
8355 #include <iconv.h>],
8356 [iconv_t cd = iconv_open("","");
8357 iconv(cd,NULL,NULL,NULL,NULL);
8358 iconv_close(cd);],
8359 am_cv_func_iconv=yes)
8360 if test "$am_cv_func_iconv" != yes; then
8361 am_save_LIBS="$LIBS"
8362 LIBS="$LIBS $LIBICONV"
8363 AC_TRY_LINK([#include <stdlib.h>
8364 #include <iconv.h>],
8365 [iconv_t cd = iconv_open("","");
8366 iconv(cd,NULL,NULL,NULL,NULL);
8367 iconv_close(cd);],
8368 am_cv_lib_iconv=yes
8369 am_cv_func_iconv=yes)
8370 LIBS="$am_save_LIBS"
8371 fi
8372 ])
8373 if test "$am_cv_func_iconv" = yes; then
8374 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
8375 fi
8376 if test "$am_cv_lib_iconv" = yes; then
8377 AC_MSG_CHECKING([how to link with libiconv])
8378 AC_MSG_RESULT([$LIBICONV])
8379 else
8380 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
8381 dnl either.
8382 CPPFLAGS="$am_save_CPPFLAGS"
8383 LIBICONV=
8384 LTLIBICONV=
8385 fi
8386 AC_SUBST(LIBICONV)
8387 AC_SUBST(LTLIBICONV)
8388 ])
8389
8390 AC_DEFUN([AM_ICONV],
8391 [
8392 AM_ICONV_LINK
8393 if test "$am_cv_func_iconv" = yes; then
8394 AC_MSG_CHECKING([for iconv declaration])
8395 AC_CACHE_VAL(am_cv_proto_iconv, [
8396 AC_TRY_COMPILE([
8397 #include <stdlib.h>
8398 #include <iconv.h>
8399 extern
8400 #ifdef __cplusplus
8401 "C"
8402 #endif
8403 #if defined(__STDC__) || defined(__cplusplus)
8404 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8405 #else
8406 size_t iconv();
8407 #endif
8408 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
8409 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);"])
8410 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8411 AC_MSG_RESULT([$]{ac_t:-
8412 }[$]am_cv_proto_iconv)
8413 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
8414 [Define as const if the declaration of iconv() needs const.])
8415 fi
8416 ])
8417
8418 # glibc2.m4 serial 1
8419 dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
8420 dnl This file is free software; the Free Software Foundation
8421 dnl gives unlimited permission to copy and/or distribute it,
8422 dnl with or without modifications, as long as this notice is preserved.
8423
8424 # Test for the GNU C Library, version 2.0 or newer.
8425 # From Bruno Haible.
8426
8427 AC_DEFUN([gt_GLIBC2],
8428 [
8429 AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
8430 ac_cv_gnu_library_2,
8431 [AC_EGREP_CPP([Lucky GNU user],
8432 [
8433 #include <features.h>
8434 #ifdef __GNU_LIBRARY__
8435 #if (__GLIBC__ >= 2)
8436 Lucky GNU user
8437 #endif
8438 #endif
8439 ],
8440 ac_cv_gnu_library_2=yes,
8441 ac_cv_gnu_library_2=no)
8442 ]
8443 )
8444 AC_SUBST(GLIBC2)
8445 GLIBC2="$ac_cv_gnu_library_2"
8446 ]
8447 )
8448
8449 # signed.m4 serial 1 (gettext-0.10.40)
8450 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
8451 dnl This file is free software; the Free Software Foundation
8452 dnl gives unlimited permission to copy and/or distribute it,
8453 dnl with or without modifications, as long as this notice is preserved.
8454
8455 dnl From Bruno Haible.
8456
8457 AC_DEFUN([bh_C_SIGNED],
8458 [
8459 AC_CACHE_CHECK([for signed], bh_cv_c_signed,
8460 [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
8461 if test $bh_cv_c_signed = no; then
8462 AC_DEFINE(signed, ,
8463 [Define to empty if the C compiler doesn't support this keyword.])
8464 fi
8465 ])
8466
8467 # longlong.m4 serial 5
8468 dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
8469 dnl This file is free software; the Free Software Foundation
8470 dnl gives unlimited permission to copy and/or distribute it,
8471 dnl with or without modifications, as long as this notice is preserved.
8472
8473 dnl From Paul Eggert.
8474
8475 # Define HAVE_LONG_LONG if 'long long' works.
8476
8477 AC_DEFUN([gl_AC_TYPE_LONG_LONG],
8478 [
8479 AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
8480 [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
8481 [long long llmax = (long long) -1;
8482 return ll << i | ll >> i | llmax / ll | llmax % ll;],
8483 ac_cv_type_long_long=yes,
8484 ac_cv_type_long_long=no)])
8485 if test $ac_cv_type_long_long = yes; then
8486 AC_DEFINE(HAVE_LONG_LONG, 1,
8487 [Define if you have the 'long long' type.])
8488 fi
8489 ])
8490
8491 # longdouble.m4 serial 1 (gettext-0.12)
8492 dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
8493 dnl This file is free software; the Free Software Foundation
8494 dnl gives unlimited permission to copy and/or distribute it,
8495 dnl with or without modifications, as long as this notice is preserved.
8496
8497 dnl From Bruno Haible.
8498 dnl Test whether the compiler supports the 'long double' type.
8499 dnl Prerequisite: AC_PROG_CC
8500
8501 AC_DEFUN([gt_TYPE_LONGDOUBLE],
8502 [
8503 AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
8504 [if test "$GCC" = yes; then
8505 gt_cv_c_long_double=yes
8506 else
8507 AC_TRY_COMPILE([
8508 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
8509 long double foo = 0.0;
8510 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8511 int array [2*(sizeof(long double) >= sizeof(double)) - 1];
8512 ], ,
8513 gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
8514 fi])
8515 if test $gt_cv_c_long_double = yes; then
8516 AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
8517 fi
8518 ])
8519
8520 # wchar_t.m4 serial 1 (gettext-0.12)
8521 dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
8522 dnl This file is free software; the Free Software Foundation
8523 dnl gives unlimited permission to copy and/or distribute it,
8524 dnl with or without modifications, as long as this notice is preserved.
8525
8526 dnl From Bruno Haible.
8527 dnl Test whether <stddef.h> has the 'wchar_t' type.
8528 dnl Prerequisite: AC_PROG_CC
8529
8530 AC_DEFUN([gt_TYPE_WCHAR_T],
8531 [
8532 AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
8533 [AC_TRY_COMPILE([#include <stddef.h>
8534 wchar_t foo = (wchar_t)'\0';], ,
8535 gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
8536 if test $gt_cv_c_wchar_t = yes; then
8537 AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
8538 fi
8539 ])
8540
8541 # wint_t.m4 serial 1 (gettext-0.12)
8542 dnl Copyright (C) 2003 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 dnl Test whether <wchar.h> has the 'wint_t' type.
8549 dnl Prerequisite: AC_PROG_CC
8550
8551 AC_DEFUN([gt_TYPE_WINT_T],
8552 [
8553 AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
8554 [AC_TRY_COMPILE([#include <wchar.h>
8555 wint_t foo = (wchar_t)'\0';], ,
8556 gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
8557 if test $gt_cv_c_wint_t = yes; then
8558 AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
8559 fi
8560 ])
8561
8562 # inttypes_h.m4 serial 6
8563 dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
8564 dnl This file is free software; the Free Software Foundation
8565 dnl gives unlimited permission to copy and/or distribute it,
8566 dnl with or without modifications, as long as this notice is preserved.
8567
8568 dnl From Paul Eggert.
8569
8570 # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
8571 # doesn't clash with <sys/types.h>, and declares uintmax_t.
8572
8573 AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
8574 [
8575 AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
8576 [AC_TRY_COMPILE(
8577 [#include <sys/types.h>
8578 #include <inttypes.h>],
8579 [uintmax_t i = (uintmax_t) -1;],
8580 gl_cv_header_inttypes_h=yes,
8581 gl_cv_header_inttypes_h=no)])
8582 if test $gl_cv_header_inttypes_h = yes; then
8583 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
8584 [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
8585 and declares uintmax_t. ])
8586 fi
8587 ])
8588
8589 # stdint_h.m4 serial 5
8590 dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
8591 dnl This file is free software; the Free Software Foundation
8592 dnl gives unlimited permission to copy and/or distribute it,
8593 dnl with or without modifications, as long as this notice is preserved.
8594
8595 dnl From Paul Eggert.
8596
8597 # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
8598 # doesn't clash with <sys/types.h>, and declares uintmax_t.
8599
8600 AC_DEFUN([gl_AC_HEADER_STDINT_H],
8601 [
8602 AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
8603 [AC_TRY_COMPILE(
8604 [#include <sys/types.h>
8605 #include <stdint.h>],
8606 [uintmax_t i = (uintmax_t) -1;],
8607 gl_cv_header_stdint_h=yes,
8608 gl_cv_header_stdint_h=no)])
8609 if test $gl_cv_header_stdint_h = yes; then
8610 AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
8611 [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
8612 and declares uintmax_t. ])
8613 fi
8614 ])
8615
8616 # intmax.m4 serial 2 (gettext-0.14.2)
8617 dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
8618 dnl This file is free software; the Free Software Foundation
8619 dnl gives unlimited permission to copy and/or distribute it,
8620 dnl with or without modifications, as long as this notice is preserved.
8621
8622 dnl From Bruno Haible.
8623 dnl Test whether the system has the 'intmax_t' type, but don't attempt to
8624 dnl find a replacement if it is lacking.
8625
8626 AC_DEFUN([gt_TYPE_INTMAX_T],
8627 [
8628 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
8629 AC_REQUIRE([gl_AC_HEADER_STDINT_H])
8630 AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
8631 [AC_TRY_COMPILE([
8632 #include <stddef.h>
8633 #include <stdlib.h>
8634 #if HAVE_STDINT_H_WITH_UINTMAX
8635 #include <stdint.h>
8636 #endif
8637 #if HAVE_INTTYPES_H_WITH_UINTMAX
8638 #include <inttypes.h>
8639 #endif
8640 ], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
8641 if test $gt_cv_c_intmax_t = yes; then
8642 AC_DEFINE(HAVE_INTMAX_T, 1,
8643 [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
8644 fi
8645 ])
8646
8647 # printf-posix.m4 serial 2 (gettext-0.13.1)
8648 dnl Copyright (C) 2003 Free Software Foundation, Inc.
8649 dnl This file is free software; the Free Software Foundation
8650 dnl gives unlimited permission to copy and/or distribute it,
8651 dnl with or without modifications, as long as this notice is preserved.
8652
8653 dnl From Bruno Haible.
8654 dnl Test whether the printf() function supports POSIX/XSI format strings with
8655 dnl positions.
8656
8657 AC_DEFUN([gt_PRINTF_POSIX],
8658 [
8659 AC_REQUIRE([AC_PROG_CC])
8660 AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
8661 gt_cv_func_printf_posix,
8662 [
8663 AC_TRY_RUN([
8664 #include <stdio.h>
8665 #include <string.h>
8666 /* The string "%2$d %1$d", with dollar characters protected from the shell's
8667 dollar expansion (possibly an autoconf bug). */
8668 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
8669 static char buf[100];
8670 int main ()
8671 {
8672 sprintf (buf, format, 33, 55);
8673 return (strcmp (buf, "55 33") != 0);
8674 }], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
8675 [
8676 AC_EGREP_CPP(notposix, [
8677 #if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
8678 notposix
8679 #endif
8680 ], gt_cv_func_printf_posix="guessing no",
8681 gt_cv_func_printf_posix="guessing yes")
8682 ])
8683 ])
8684 case $gt_cv_func_printf_posix in
8685 *yes)
8686 AC_DEFINE(HAVE_POSIX_PRINTF, 1,
8687 [Define if your printf() function supports format strings with positions.])
8688 ;;
8689 esac
8690 ])
8691
8692 # glibc21.m4 serial 3
8693 dnl Copyright (C) 2000-2002, 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 # Test for the GNU C Library, version 2.1 or newer.
8699 # From Bruno Haible.
8700
8701 AC_DEFUN([gl_GLIBC21],
8702 [
8703 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
8704 ac_cv_gnu_library_2_1,
8705 [AC_EGREP_CPP([Lucky GNU user],
8706 [
8707 #include <features.h>
8708 #ifdef __GNU_LIBRARY__
8709 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
8710 Lucky GNU user
8711 #endif
8712 #endif
8713 ],
8714 ac_cv_gnu_library_2_1=yes,
8715 ac_cv_gnu_library_2_1=no)
8716 ]
8717 )
8718 AC_SUBST(GLIBC21)
8719 GLIBC21="$ac_cv_gnu_library_2_1"
8720 ]
8721 )
8722
8723 # intdiv0.m4 serial 1 (gettext-0.11.3)
8724 dnl Copyright (C) 2002 Free Software Foundation, Inc.
8725 dnl This file is free software; the Free Software Foundation
8726 dnl gives unlimited permission to copy and/or distribute it,
8727 dnl with or without modifications, as long as this notice is preserved.
8728
8729 dnl From Bruno Haible.
8730
8731 AC_DEFUN([gt_INTDIV0],
8732 [
8733 AC_REQUIRE([AC_PROG_CC])dnl
8734 AC_REQUIRE([AC_CANONICAL_HOST])dnl
8735
8736 AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
8737 gt_cv_int_divbyzero_sigfpe,
8738 [
8739 AC_TRY_RUN([
8740 #include <stdlib.h>
8741 #include <signal.h>
8742
8743 static void
8744 #ifdef __cplusplus
8745 sigfpe_handler (int sig)
8746 #else
8747 sigfpe_handler (sig) int sig;
8748 #endif
8749 {
8750 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
8751 exit (sig != SIGFPE);
8752 }
8753
8754 int x = 1;
8755 int y = 0;
8756 int z;
8757 int nan;
8758
8759 int main ()
8760 {
8761 signal (SIGFPE, sigfpe_handler);
8762 /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
8763 #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
8764 signal (SIGTRAP, sigfpe_handler);
8765 #endif
8766 /* Linux/SPARC yields signal SIGILL. */
8767 #if defined (__sparc__) && defined (__linux__)
8768 signal (SIGILL, sigfpe_handler);
8769 #endif
8770
8771 z = x / y;
8772 nan = y / y;
8773 exit (1);
8774 }
8775 ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
8776 [
8777 # Guess based on the CPU.
8778 case "$host_cpu" in
8779 alpha* | i[34567]86 | m68k | s390*)
8780 gt_cv_int_divbyzero_sigfpe="guessing yes";;
8781 *)
8782 gt_cv_int_divbyzero_sigfpe="guessing no";;
8783 esac
8784 ])
8785 ])
8786 case "$gt_cv_int_divbyzero_sigfpe" in
8787 *yes) value=1;;
8788 *) value=0;;
8789 esac
8790 AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
8791 [Define if integer division by zero raises signal SIGFPE.])
8792 ])
8793
8794 # uintmax_t.m4 serial 9
8795 dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
8796 dnl This file is free software; the Free Software Foundation
8797 dnl gives unlimited permission to copy and/or distribute it,
8798 dnl with or without modifications, as long as this notice is preserved.
8799
8800 dnl From Paul Eggert.
8801
8802 AC_PREREQ(2.13)
8803
8804 # Define uintmax_t to 'unsigned long' or 'unsigned long long'
8805 # if it is not already defined in <stdint.h> or <inttypes.h>.
8806
8807 AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
8808 [
8809 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
8810 AC_REQUIRE([gl_AC_HEADER_STDINT_H])
8811 if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
8812 AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
8813 test $ac_cv_type_unsigned_long_long = yes \
8814 && ac_type='unsigned long long' \
8815 || ac_type='unsigned long'
8816 AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
8817 [Define to unsigned long or unsigned long long
8818 if <stdint.h> and <inttypes.h> don't define.])
8819 else
8820 AC_DEFINE(HAVE_UINTMAX_T, 1,
8821 [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
8822 fi
8823 ])
8824
8825 # ulonglong.m4 serial 4
8826 dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
8827 dnl This file is free software; the Free Software Foundation
8828 dnl gives unlimited permission to copy and/or distribute it,
8829 dnl with or without modifications, as long as this notice is preserved.
8830
8831 dnl From Paul Eggert.
8832
8833 # Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
8834
8835 AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
8836 [
8837 AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
8838 [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
8839 [unsigned long long ullmax = (unsigned long long) -1;
8840 return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
8841 ac_cv_type_unsigned_long_long=yes,
8842 ac_cv_type_unsigned_long_long=no)])
8843 if test $ac_cv_type_unsigned_long_long = yes; then
8844 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
8845 [Define if you have the 'unsigned long long' type.])
8846 fi
8847 ])
8848
8849 # inttypes.m4 serial 1 (gettext-0.11.4)
8850 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
8851 dnl This file is free software; the Free Software Foundation
8852 dnl gives unlimited permission to copy and/or distribute it,
8853 dnl with or without modifications, as long as this notice is preserved.
8854
8855 dnl From Paul Eggert.
8856
8857 # Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
8858 # <sys/types.h>.
8859
8860 AC_DEFUN([gt_HEADER_INTTYPES_H],
8861 [
8862 AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
8863 [
8864 AC_TRY_COMPILE(
8865 [#include <sys/types.h>
8866 #include <inttypes.h>],
8867 [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
8868 ])
8869 if test $gt_cv_header_inttypes_h = yes; then
8870 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
8871 [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
8872 fi
8873 ])
8874
8875 # inttypes-pri.m4 serial 1 (gettext-0.11.4)
8876 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
8877 dnl This file is free software; the Free Software Foundation
8878 dnl gives unlimited permission to copy and/or distribute it,
8879 dnl with or without modifications, as long as this notice is preserved.
8880
8881 dnl From Bruno Haible.
8882
8883 # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
8884 # macros to non-string values. This is the case on AIX 4.3.3.
8885
8886 AC_DEFUN([gt_INTTYPES_PRI],
8887 [
8888 AC_REQUIRE([gt_HEADER_INTTYPES_H])
8889 if test $gt_cv_header_inttypes_h = yes; then
8890 AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
8891 gt_cv_inttypes_pri_broken,
8892 [
8893 AC_TRY_COMPILE([#include <inttypes.h>
8894 #ifdef PRId32
8895 char *p = PRId32;
8896 #endif
8897 ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
8898 ])
8899 fi
8900 if test "$gt_cv_inttypes_pri_broken" = yes; then
8901 AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
8902 [Define if <inttypes.h> exists and defines unusable PRI* macros.])
8903 fi
8904 ])
8905
8906 # xsize.m4 serial 3
8907 dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
8908 dnl This file is free software; the Free Software Foundation
8909 dnl gives unlimited permission to copy and/or distribute it,
8910 dnl with or without modifications, as long as this notice is preserved.
8911
8912 AC_DEFUN([gl_XSIZE],
8913 [
8914 dnl Prerequisites of lib/xsize.h.
8915 AC_REQUIRE([gl_SIZE_MAX])
8916 AC_REQUIRE([AC_C_INLINE])
8917 AC_CHECK_HEADERS(stdint.h)
8918 ])
8919
8920 # size_max.m4 serial 2
8921 dnl Copyright (C) 2003 Free Software Foundation, Inc.
8922 dnl This file is free software; the Free Software Foundation
8923 dnl gives unlimited permission to copy and/or distribute it,
8924 dnl with or without modifications, as long as this notice is preserved.
8925
8926 dnl From Bruno Haible.
8927
8928 AC_DEFUN([gl_SIZE_MAX],
8929 [
8930 AC_CHECK_HEADERS(stdint.h)
8931 dnl First test whether the system already has SIZE_MAX.
8932 AC_MSG_CHECKING([for SIZE_MAX])
8933 result=
8934 AC_EGREP_CPP([Found it], [
8935 #include <limits.h>
8936 #if HAVE_STDINT_H
8937 #include <stdint.h>
8938 #endif
8939 #ifdef SIZE_MAX
8940 Found it
8941 #endif
8942 ], result=yes)
8943 if test -z "$result"; then
8944 dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
8945 dnl than the type 'unsigned long'.
8946 dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
8947 dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
8948 _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
8949 [#include <stddef.h>], result=?)
8950 _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
8951 [#include <stddef.h>], result=?)
8952 _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
8953 [#include <stddef.h>], result=?)
8954 if test "$fits_in_uint" = 1; then
8955 dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
8956 dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
8957 AC_TRY_COMPILE([#include <stddef.h>
8958 extern size_t foo;
8959 extern unsigned long foo;
8960 ], [], fits_in_uint=0)
8961 fi
8962 if test -z "$result"; then
8963 if test "$fits_in_uint" = 1; then
8964 result="$res_hi$res_lo"U
8965 else
8966 result="$res_hi$res_lo"UL
8967 fi
8968 else
8969 dnl Shouldn't happen, but who knows...
8970 result='~(size_t)0'
8971 fi
8972 fi
8973 AC_MSG_RESULT([$result])
8974 if test "$result" != yes; then
8975 AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
8976 [Define as the maximum value of type 'size_t', if the system doesn't define it.])
8977 fi
8978 ])
8979
8980 # codeset.m4 serial AM1 (gettext-0.10.40)
8981 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
8982 dnl This file is free software; the Free Software Foundation
8983 dnl gives unlimited permission to copy and/or distribute it,
8984 dnl with or without modifications, as long as this notice is preserved.
8985
8986 dnl From Bruno Haible.
8987
8988 AC_DEFUN([AM_LANGINFO_CODESET],
8989 [
8990 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
8991 [AC_TRY_LINK([#include <langinfo.h>],
8992 [char* cs = nl_langinfo(CODESET);],
8993 am_cv_langinfo_codeset=yes,
8994 am_cv_langinfo_codeset=no)
8995 ])
8996 if test $am_cv_langinfo_codeset = yes; then
8997 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
8998 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
8999 fi
9000 ])
9001
9002 # lcmessage.m4 serial 4 (gettext-0.14.2)
9003 dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc.
9004 dnl This file is free software; the Free Software Foundation
9005 dnl gives unlimited permission to copy and/or distribute it,
9006 dnl with or without modifications, as long as this notice is preserved.
9007 dnl
9008 dnl This file can can be used in projects which are not available under
9009 dnl the GNU General Public License or the GNU Library General Public
9010 dnl License but which still want to provide support for the GNU gettext
9011 dnl functionality.
9012 dnl Please note that the actual code of the GNU gettext library is covered
9013 dnl by the GNU Library General Public License, and the rest of the GNU
9014 dnl gettext package package is covered by the GNU General Public License.
9015 dnl They are *not* in the public domain.
9016
9017 dnl Authors:
9018 dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
9019
9020 # Check whether LC_MESSAGES is available in <locale.h>.
9021
9022 AC_DEFUN([gt_LC_MESSAGES],
9023 [
9024 AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES,
9025 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
9026 gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)])
9027 if test $gt_cv_val_LC_MESSAGES = yes; then
9028 AC_DEFINE(HAVE_LC_MESSAGES, 1,
9029 [Define if your <locale.h> file defines LC_MESSAGES.])
9030 fi
9031 ])
9032
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=2
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='$CC -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_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4414 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4415 IFS="$lt_save_ifs"
4416 test -z "$ac_dir" && ac_dir=.
4417 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
4418 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4419 # Check to see if the nm accepts a BSD-compat flag.
4420 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4421 # nm: unknown option "B" ignored
4422 # Tru64's nm complains that /dev/null is an invalid object file
4423 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4424 */dev/null* | *'Invalid file or object type'*)
4425 lt_cv_path_NM="$tmp_nm -B"
4426 break
4427 ;;
4428 *)
4429 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4430 */dev/null*)
4431 lt_cv_path_NM="$tmp_nm -p"
4432 break
4433 ;;
4434 *)
4435 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4436 continue # so that we can try to find one that supports BSD flags
4437 ;;
4438 esac
4439 esac
4440 fi
4441 done
4442 IFS="$lt_save_ifs"
4443 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4444 fi
4445 fi
4446 echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
4447 echo "${ECHO_T}$lt_cv_path_NM" >&6
4448 NM="$lt_cv_path_NM"
4449
4450 echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
4451 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
4452 if test "${lt_cv_deplibs_check_method+set}" = set; then
4453 echo $ECHO_N "(cached) $ECHO_C" >&6
4454 else
4455 lt_cv_file_magic_cmd='$MAGIC_CMD'
4456 lt_cv_file_magic_test_file=
4457 lt_cv_deplibs_check_method='unknown'
4458 # Need to set the preceding variable on all platforms that support
4459 # interlibrary dependencies.
4460 # 'none' -- dependencies not supported.
4461 # `unknown' -- same as none, but documents that we really don't know.
4462 # 'pass_all' -- all dependencies passed with no checks.
4463 # 'test_compile' -- check by making test program.
4464 # 'file_magic [[regex]]' -- check by looking for files in library path
4465 # which responds to the $file_magic_cmd with a given extended regex.
4466 # If you have `file' or equivalent on your system and you're not sure
4467 # whether `pass_all' will *always* work, you probably want this one.
4468
4469 case $host_os in
4470 aix4* | aix5*)
4471 lt_cv_deplibs_check_method=pass_all
4472 ;;
4473
4474 beos*)
4475 lt_cv_deplibs_check_method=pass_all
4476 ;;
4477
4478 bsdi[45]*)
4479 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
4480 lt_cv_file_magic_cmd='/usr/bin/file -L'
4481 lt_cv_file_magic_test_file=/shlib/libc.so
4482 ;;
4483
4484 cygwin*)
4485 # func_win32_libid is a shell function defined in ltmain.sh
4486 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4487 lt_cv_file_magic_cmd='func_win32_libid'
4488 ;;
4489
4490 mingw* | pw32*)
4491 # Base MSYS/MinGW do not provide the 'file' command needed by
4492 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
4493 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4494 lt_cv_file_magic_cmd='$OBJDUMP -f'
4495 ;;
4496
4497 darwin* | rhapsody*)
4498 lt_cv_deplibs_check_method=pass_all
4499 ;;
4500
4501 freebsd* | kfreebsd*-gnu | dragonfly*)
4502 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4503 case $host_cpu in
4504 i*86 )
4505 # Not sure whether the presence of OpenBSD here was a mistake.
4506 # Let's accept both of them until this is cleared up.
4507 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
4508 lt_cv_file_magic_cmd=/usr/bin/file
4509 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4510 ;;
4511 esac
4512 else
4513 lt_cv_deplibs_check_method=pass_all
4514 fi
4515 ;;
4516
4517 gnu*)
4518 lt_cv_deplibs_check_method=pass_all
4519 ;;
4520
4521 hpux10.20* | hpux11*)
4522 lt_cv_file_magic_cmd=/usr/bin/file
4523 case $host_cpu in
4524 ia64*)
4525 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
4526 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4527 ;;
4528 hppa*64*)
4529 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]'
4530 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4531 ;;
4532 *)
4533 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
4534 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4535 ;;
4536 esac
4537 ;;
4538
4539 irix5* | irix6* | nonstopux*)
4540 case $LD in
4541 *-32|*"-32 ") libmagic=32-bit;;
4542 *-n32|*"-n32 ") libmagic=N32;;
4543 *-64|*"-64 ") libmagic=64-bit;;
4544 *) libmagic=never-match;;
4545 esac
4546 lt_cv_deplibs_check_method=pass_all
4547 ;;
4548
4549 # This must be Linux ELF.
4550 linux*)
4551 lt_cv_deplibs_check_method=pass_all
4552 ;;
4553
4554 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
4555 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4556 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
4557 else
4558 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
4559 fi
4560 ;;
4561
4562 newos6*)
4563 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
4564 lt_cv_file_magic_cmd=/usr/bin/file
4565 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4566 ;;
4567
4568 nto-qnx*)
4569 lt_cv_deplibs_check_method=unknown
4570 ;;
4571
4572 openbsd*)
4573 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4574 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
4575 else
4576 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
4577 fi
4578 ;;
4579
4580 osf3* | osf4* | osf5*)
4581 lt_cv_deplibs_check_method=pass_all
4582 ;;
4583
4584 sco3.2v5*)
4585 lt_cv_deplibs_check_method=pass_all
4586 ;;
4587
4588 solaris*)
4589 lt_cv_deplibs_check_method=pass_all
4590 ;;
4591
4592 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4593 case $host_vendor in
4594 motorola)
4595 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]'
4596 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4597 ;;
4598 ncr)
4599 lt_cv_deplibs_check_method=pass_all
4600 ;;
4601 sequent)
4602 lt_cv_file_magic_cmd='/bin/file'
4603 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4604 ;;
4605 sni)
4606 lt_cv_file_magic_cmd='/bin/file'
4607 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4608 lt_cv_file_magic_test_file=/lib/libc.so
4609 ;;
4610 siemens)
4611 lt_cv_deplibs_check_method=pass_all
4612 ;;
4613 esac
4614 ;;
4615
4616 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
4617 lt_cv_deplibs_check_method=pass_all
4618 ;;
4619 esac
4620
4621 fi
4622 echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
4623 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
4624 file_magic_cmd=$lt_cv_file_magic_cmd
4625 deplibs_check_method=$lt_cv_deplibs_check_method
4626 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4627
4628
4629
4630
4631 # If no C compiler was specified, use CC.
4632 LTCC=${LTCC-"$CC"}
4633
4634 # Allow CC to be a program name with arguments.
4635 compiler=$CC
4636
4637 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4638 if test "${enable_libtool_lock+set}" = set; then
4639 enableval="$enable_libtool_lock"
4640
4641 fi;
4642 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4643
4644 # Some flags need to be propagated to the compiler or linker for good
4645 # libtool support.
4646 case $host in
4647 ia64-*-hpux*)
4648 # Find out which ABI we are using.
4649 echo 'int i;' > conftest.$ac_ext
4650 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4651 (eval $ac_compile) 2>&5
4652 ac_status=$?
4653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4654 (exit $ac_status); }; then
4655 case `/usr/bin/file conftest.$ac_objext` in
4656 *ELF-32*)
4657 HPUX_IA64_MODE="32"
4658 ;;
4659 *ELF-64*)
4660 HPUX_IA64_MODE="64"
4661 ;;
4662 esac
4663 fi
4664 rm -rf conftest*
4665 ;;
4666 *-*-irix6*)
4667 # Find out which ABI we are using.
4668 echo '#line 4669 "configure"' > conftest.$ac_ext
4669 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4670 (eval $ac_compile) 2>&5
4671 ac_status=$?
4672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4673 (exit $ac_status); }; then
4674 if test "$lt_cv_prog_gnu_ld" = yes; then
4675 case `/usr/bin/file conftest.$ac_objext` in
4676 *32-bit*)
4677 LD="${LD-ld} -melf32bsmip"
4678 ;;
4679 *N32*)
4680 LD="${LD-ld} -melf32bmipn32"
4681 ;;
4682 *64-bit*)
4683 LD="${LD-ld} -melf64bmip"
4684 ;;
4685 esac
4686 else
4687 case `/usr/bin/file conftest.$ac_objext` in
4688 *32-bit*)
4689 LD="${LD-ld} -32"
4690 ;;
4691 *N32*)
4692 LD="${LD-ld} -n32"
4693 ;;
4694 *64-bit*)
4695 LD="${LD-ld} -64"
4696 ;;
4697 esac
4698 fi
4699 fi
4700 rm -rf conftest*
4701 ;;
4702
4703 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
4704 # Find out which ABI we are using.
4705 echo 'int i;' > conftest.$ac_ext
4706 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4707 (eval $ac_compile) 2>&5
4708 ac_status=$?
4709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4710 (exit $ac_status); }; then
4711 case `/usr/bin/file conftest.o` in
4712 *32-bit*)
4713 case $host in
4714 x86_64-*linux*)
4715 LD="${LD-ld} -m elf_i386"
4716 ;;
4717 ppc64-*linux*|powerpc64-*linux*)
4718 LD="${LD-ld} -m elf32ppclinux"
4719 ;;
4720 s390x-*linux*)
4721 LD="${LD-ld} -m elf_s390"
4722 ;;
4723 sparc64-*linux*)
4724 LD="${LD-ld} -m elf32_sparc"
4725 ;;
4726 esac
4727 ;;
4728 *64-bit*)
4729 case $host in
4730 x86_64-*linux*)
4731 LD="${LD-ld} -m elf_x86_64"
4732 ;;
4733 ppc*-*linux*|powerpc*-*linux*)
4734 LD="${LD-ld} -m elf64ppc"
4735 ;;
4736 s390*-*linux*)
4737 LD="${LD-ld} -m elf64_s390"
4738 ;;
4739 sparc*-*linux*)
4740 LD="${LD-ld} -m elf64_sparc"
4741 ;;
4742 esac
4743 ;;
4744 esac
4745 fi
4746 rm -rf conftest*
4747 ;;
4748
4749 *-*-sco3.2v5*)
4750 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4751 SAVE_CFLAGS="$CFLAGS"
4752 CFLAGS="$CFLAGS -belf"
4753 echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
4754 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
4755 if test "${lt_cv_cc_needs_belf+set}" = set; then
4756 echo $ECHO_N "(cached) $ECHO_C" >&6
4757 else
4758 ac_ext=c
4759 ac_cpp='$CPP $CPPFLAGS'
4760 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4761 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4762 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4763
4764 cat >conftest.$ac_ext <<_ACEOF
4765 /* confdefs.h. */
4766 _ACEOF
4767 cat confdefs.h >>conftest.$ac_ext
4768 cat >>conftest.$ac_ext <<_ACEOF
4769 /* end confdefs.h. */
4770
4771 int
4772 main ()
4773 {
4774
4775 ;
4776 return 0;
4777 }
4778 _ACEOF
4779 rm -f conftest.$ac_objext conftest$ac_exeext
4780 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4781 (eval $ac_link) 2>conftest.er1
4782 ac_status=$?
4783 grep -v '^ *+' conftest.er1 >conftest.err
4784 rm -f conftest.er1
4785 cat conftest.err >&5
4786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4787 (exit $ac_status); } &&
4788 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4790 (eval $ac_try) 2>&5
4791 ac_status=$?
4792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4793 (exit $ac_status); }; } &&
4794 { ac_try='test -s conftest$ac_exeext'
4795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4796 (eval $ac_try) 2>&5
4797 ac_status=$?
4798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4799 (exit $ac_status); }; }; then
4800 lt_cv_cc_needs_belf=yes
4801 else
4802 echo "$as_me: failed program was:" >&5
4803 sed 's/^/| /' conftest.$ac_ext >&5
4804
4805 lt_cv_cc_needs_belf=no
4806 fi
4807 rm -f conftest.err conftest.$ac_objext \
4808 conftest$ac_exeext conftest.$ac_ext
4809 ac_ext=c
4810 ac_cpp='$CPP $CPPFLAGS'
4811 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4812 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4813 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4814
4815 fi
4816 echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
4817 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
4818 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4819 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4820 CFLAGS="$SAVE_CFLAGS"
4821 fi
4822 ;;
4823
4824 esac
4825
4826 need_locks="$enable_libtool_lock"
4827
4828
4829 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4840 inttypes.h stdint.h unistd.h
4841 do
4842 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4843 echo "$as_me:$LINENO: checking for $ac_header" >&5
4844 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4845 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4846 echo $ECHO_N "(cached) $ECHO_C" >&6
4847 else
4848 cat >conftest.$ac_ext <<_ACEOF
4849 /* confdefs.h. */
4850 _ACEOF
4851 cat confdefs.h >>conftest.$ac_ext
4852 cat >>conftest.$ac_ext <<_ACEOF
4853 /* end confdefs.h. */
4854 $ac_includes_default
4855
4856 #include <$ac_header>
4857 _ACEOF
4858 rm -f conftest.$ac_objext
4859 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4860 (eval $ac_compile) 2>conftest.er1
4861 ac_status=$?
4862 grep -v '^ *+' conftest.er1 >conftest.err
4863 rm -f conftest.er1
4864 cat conftest.err >&5
4865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4866 (exit $ac_status); } &&
4867 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4869 (eval $ac_try) 2>&5
4870 ac_status=$?
4871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4872 (exit $ac_status); }; } &&
4873 { ac_try='test -s conftest.$ac_objext'
4874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4875 (eval $ac_try) 2>&5
4876 ac_status=$?
4877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4878 (exit $ac_status); }; }; then
4879 eval "$as_ac_Header=yes"
4880 else
4881 echo "$as_me: failed program was:" >&5
4882 sed 's/^/| /' conftest.$ac_ext >&5
4883
4884 eval "$as_ac_Header=no"
4885 fi
4886 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4887 fi
4888 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4889 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4890 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4891 cat >>confdefs.h <<_ACEOF
4892 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4893 _ACEOF
4894
4895 fi
4896
4897 done
4898
4899
4900
4901 for ac_header in dlfcn.h
4902 do
4903 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4904 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4905 echo "$as_me:$LINENO: checking for $ac_header" >&5
4906 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4907 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4908 echo $ECHO_N "(cached) $ECHO_C" >&6
4909 fi
4910 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4911 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4912 else
4913 # Is the header compilable?
4914 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4915 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4916 cat >conftest.$ac_ext <<_ACEOF
4917 /* confdefs.h. */
4918 _ACEOF
4919 cat confdefs.h >>conftest.$ac_ext
4920 cat >>conftest.$ac_ext <<_ACEOF
4921 /* end confdefs.h. */
4922 $ac_includes_default
4923 #include <$ac_header>
4924 _ACEOF
4925 rm -f conftest.$ac_objext
4926 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4927 (eval $ac_compile) 2>conftest.er1
4928 ac_status=$?
4929 grep -v '^ *+' conftest.er1 >conftest.err
4930 rm -f conftest.er1
4931 cat conftest.err >&5
4932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4933 (exit $ac_status); } &&
4934 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4936 (eval $ac_try) 2>&5
4937 ac_status=$?
4938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4939 (exit $ac_status); }; } &&
4940 { ac_try='test -s conftest.$ac_objext'
4941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4942 (eval $ac_try) 2>&5
4943 ac_status=$?
4944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4945 (exit $ac_status); }; }; then
4946 ac_header_compiler=yes
4947 else
4948 echo "$as_me: failed program was:" >&5
4949 sed 's/^/| /' conftest.$ac_ext >&5
4950
4951 ac_header_compiler=no
4952 fi
4953 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4954 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4955 echo "${ECHO_T}$ac_header_compiler" >&6
4956
4957 # Is the header present?
4958 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4959 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4960 cat >conftest.$ac_ext <<_ACEOF
4961 /* confdefs.h. */
4962 _ACEOF
4963 cat confdefs.h >>conftest.$ac_ext
4964 cat >>conftest.$ac_ext <<_ACEOF
4965 /* end confdefs.h. */
4966 #include <$ac_header>
4967 _ACEOF
4968 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4969 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4970 ac_status=$?
4971 grep -v '^ *+' conftest.er1 >conftest.err
4972 rm -f conftest.er1
4973 cat conftest.err >&5
4974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4975 (exit $ac_status); } >/dev/null; then
4976 if test -s conftest.err; then
4977 ac_cpp_err=$ac_c_preproc_warn_flag
4978 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4979 else
4980 ac_cpp_err=
4981 fi
4982 else
4983 ac_cpp_err=yes
4984 fi
4985 if test -z "$ac_cpp_err"; then
4986 ac_header_preproc=yes
4987 else
4988 echo "$as_me: failed program was:" >&5
4989 sed 's/^/| /' conftest.$ac_ext >&5
4990
4991 ac_header_preproc=no
4992 fi
4993 rm -f conftest.err conftest.$ac_ext
4994 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4995 echo "${ECHO_T}$ac_header_preproc" >&6
4996
4997 # So? What about this header?
4998 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4999 yes:no: )
5000 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5001 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5002 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5003 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5004 ac_header_preproc=yes
5005 ;;
5006 no:yes:* )
5007 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5008 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5009 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5010 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5011 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5012 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5013 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5014 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5015 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5016 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5017 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5018 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5019 (
5020 cat <<\_ASBOX
5021 ## ------------------------------------------ ##
5022 ## Report this to the AC_PACKAGE_NAME lists. ##
5023 ## ------------------------------------------ ##
5024 _ASBOX
5025 ) |
5026 sed "s/^/$as_me: WARNING: /" >&2
5027 ;;
5028 esac
5029 echo "$as_me:$LINENO: checking for $ac_header" >&5
5030 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5031 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5032 echo $ECHO_N "(cached) $ECHO_C" >&6
5033 else
5034 eval "$as_ac_Header=\$ac_header_preproc"
5035 fi
5036 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5037 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5038
5039 fi
5040 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5041 cat >>confdefs.h <<_ACEOF
5042 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5043 _ACEOF
5044
5045 fi
5046
5047 done
5048
5049 ac_ext=cc
5050 ac_cpp='$CXXCPP $CPPFLAGS'
5051 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5052 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5053 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5054 if test -n "$ac_tool_prefix"; then
5055 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
5056 do
5057 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5058 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5059 echo "$as_me:$LINENO: checking for $ac_word" >&5
5060 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5061 if test "${ac_cv_prog_CXX+set}" = set; then
5062 echo $ECHO_N "(cached) $ECHO_C" >&6
5063 else
5064 if test -n "$CXX"; then
5065 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5066 else
5067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5068 for as_dir in $PATH
5069 do
5070 IFS=$as_save_IFS
5071 test -z "$as_dir" && as_dir=.
5072 for ac_exec_ext in '' $ac_executable_extensions; do
5073 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5074 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
5075 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5076 break 2
5077 fi
5078 done
5079 done
5080
5081 fi
5082 fi
5083 CXX=$ac_cv_prog_CXX
5084 if test -n "$CXX"; then
5085 echo "$as_me:$LINENO: result: $CXX" >&5
5086 echo "${ECHO_T}$CXX" >&6
5087 else
5088 echo "$as_me:$LINENO: result: no" >&5
5089 echo "${ECHO_T}no" >&6
5090 fi
5091
5092 test -n "$CXX" && break
5093 done
5094 fi
5095 if test -z "$CXX"; then
5096 ac_ct_CXX=$CXX
5097 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
5098 do
5099 # Extract the first word of "$ac_prog", so it can be a program name with args.
5100 set dummy $ac_prog; ac_word=$2
5101 echo "$as_me:$LINENO: checking for $ac_word" >&5
5102 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5103 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
5104 echo $ECHO_N "(cached) $ECHO_C" >&6
5105 else
5106 if test -n "$ac_ct_CXX"; then
5107 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5108 else
5109 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5110 for as_dir in $PATH
5111 do
5112 IFS=$as_save_IFS
5113 test -z "$as_dir" && as_dir=.
5114 for ac_exec_ext in '' $ac_executable_extensions; do
5115 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5116 ac_cv_prog_ac_ct_CXX="$ac_prog"
5117 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5118 break 2
5119 fi
5120 done
5121 done
5122
5123 fi
5124 fi
5125 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5126 if test -n "$ac_ct_CXX"; then
5127 echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
5128 echo "${ECHO_T}$ac_ct_CXX" >&6
5129 else
5130 echo "$as_me:$LINENO: result: no" >&5
5131 echo "${ECHO_T}no" >&6
5132 fi
5133
5134 test -n "$ac_ct_CXX" && break
5135 done
5136 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
5137
5138 CXX=$ac_ct_CXX
5139 fi
5140
5141
5142 # Provide some information about the compiler.
5143 echo "$as_me:$LINENO:" \
5144 "checking for C++ compiler version" >&5
5145 ac_compiler=`set X $ac_compile; echo $2`
5146 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
5147 (eval $ac_compiler --version </dev/null >&5) 2>&5
5148 ac_status=$?
5149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5150 (exit $ac_status); }
5151 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
5152 (eval $ac_compiler -v </dev/null >&5) 2>&5
5153 ac_status=$?
5154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5155 (exit $ac_status); }
5156 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
5157 (eval $ac_compiler -V </dev/null >&5) 2>&5
5158 ac_status=$?
5159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5160 (exit $ac_status); }
5161
5162 echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
5163 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
5164 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
5165 echo $ECHO_N "(cached) $ECHO_C" >&6
5166 else
5167 cat >conftest.$ac_ext <<_ACEOF
5168 /* confdefs.h. */
5169 _ACEOF
5170 cat confdefs.h >>conftest.$ac_ext
5171 cat >>conftest.$ac_ext <<_ACEOF
5172 /* end confdefs.h. */
5173
5174 int
5175 main ()
5176 {
5177 #ifndef __GNUC__
5178 choke me
5179 #endif
5180
5181 ;
5182 return 0;
5183 }
5184 _ACEOF
5185 rm -f conftest.$ac_objext
5186 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5187 (eval $ac_compile) 2>conftest.er1
5188 ac_status=$?
5189 grep -v '^ *+' conftest.er1 >conftest.err
5190 rm -f conftest.er1
5191 cat conftest.err >&5
5192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5193 (exit $ac_status); } &&
5194 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
5195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5196 (eval $ac_try) 2>&5
5197 ac_status=$?
5198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5199 (exit $ac_status); }; } &&
5200 { ac_try='test -s conftest.$ac_objext'
5201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5202 (eval $ac_try) 2>&5
5203 ac_status=$?
5204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5205 (exit $ac_status); }; }; then
5206 ac_compiler_gnu=yes
5207 else
5208 echo "$as_me: failed program was:" >&5
5209 sed 's/^/| /' conftest.$ac_ext >&5
5210
5211 ac_compiler_gnu=no
5212 fi
5213 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5214 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
5215
5216 fi
5217 echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
5218 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
5219 GXX=`test $ac_compiler_gnu = yes && echo yes`
5220 ac_test_CXXFLAGS=${CXXFLAGS+set}
5221 ac_save_CXXFLAGS=$CXXFLAGS
5222 CXXFLAGS="-g"
5223 echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
5224 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
5225 if test "${ac_cv_prog_cxx_g+set}" = set; then
5226 echo $ECHO_N "(cached) $ECHO_C" >&6
5227 else
5228 cat >conftest.$ac_ext <<_ACEOF
5229 /* confdefs.h. */
5230 _ACEOF
5231 cat confdefs.h >>conftest.$ac_ext
5232 cat >>conftest.$ac_ext <<_ACEOF
5233 /* end confdefs.h. */
5234
5235 int
5236 main ()
5237 {
5238
5239 ;
5240 return 0;
5241 }
5242 _ACEOF
5243 rm -f conftest.$ac_objext
5244 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5245 (eval $ac_compile) 2>conftest.er1
5246 ac_status=$?
5247 grep -v '^ *+' conftest.er1 >conftest.err
5248 rm -f conftest.er1
5249 cat conftest.err >&5
5250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5251 (exit $ac_status); } &&
5252 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
5253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5254 (eval $ac_try) 2>&5
5255 ac_status=$?
5256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5257 (exit $ac_status); }; } &&
5258 { ac_try='test -s conftest.$ac_objext'
5259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5260 (eval $ac_try) 2>&5
5261 ac_status=$?
5262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5263 (exit $ac_status); }; }; then
5264 ac_cv_prog_cxx_g=yes
5265 else
5266 echo "$as_me: failed program was:" >&5
5267 sed 's/^/| /' conftest.$ac_ext >&5
5268
5269 ac_cv_prog_cxx_g=no
5270 fi
5271 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5272 fi
5273 echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
5274 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
5275 if test "$ac_test_CXXFLAGS" = set; then
5276 CXXFLAGS=$ac_save_CXXFLAGS
5277 elif test $ac_cv_prog_cxx_g = yes; then
5278 if test "$GXX" = yes; then
5279 CXXFLAGS="-g -O2"
5280 else
5281 CXXFLAGS="-g"
5282 fi
5283 else
5284 if test "$GXX" = yes; then
5285 CXXFLAGS="-O2"
5286 else
5287 CXXFLAGS=
5288 fi
5289 fi
5290 for ac_declaration in \
5291 '' \
5292 'extern "C" void std::exit (int) throw (); using std::exit;' \
5293 'extern "C" void std::exit (int); using std::exit;' \
5294 'extern "C" void exit (int) throw ();' \
5295 'extern "C" void exit (int);' \
5296 'void exit (int);'
5297 do
5298 cat >conftest.$ac_ext <<_ACEOF
5299 /* confdefs.h. */
5300 _ACEOF
5301 cat confdefs.h >>conftest.$ac_ext
5302 cat >>conftest.$ac_ext <<_ACEOF
5303 /* end confdefs.h. */
5304 $ac_declaration
5305 #include <stdlib.h>
5306 int
5307 main ()
5308 {
5309 exit (42);
5310 ;
5311 return 0;
5312 }
5313 _ACEOF
5314 rm -f conftest.$ac_objext
5315 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5316 (eval $ac_compile) 2>conftest.er1
5317 ac_status=$?
5318 grep -v '^ *+' conftest.er1 >conftest.err
5319 rm -f conftest.er1
5320 cat conftest.err >&5
5321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5322 (exit $ac_status); } &&
5323 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
5324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5325 (eval $ac_try) 2>&5
5326 ac_status=$?
5327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5328 (exit $ac_status); }; } &&
5329 { ac_try='test -s conftest.$ac_objext'
5330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5331 (eval $ac_try) 2>&5
5332 ac_status=$?
5333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5334 (exit $ac_status); }; }; then
5335 :
5336 else
5337 echo "$as_me: failed program was:" >&5
5338 sed 's/^/| /' conftest.$ac_ext >&5
5339
5340 continue
5341 fi
5342 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5343 cat >conftest.$ac_ext <<_ACEOF
5344 /* confdefs.h. */
5345 _ACEOF
5346 cat confdefs.h >>conftest.$ac_ext
5347 cat >>conftest.$ac_ext <<_ACEOF
5348 /* end confdefs.h. */
5349 $ac_declaration
5350 int
5351 main ()
5352 {
5353 exit (42);
5354 ;
5355 return 0;
5356 }
5357 _ACEOF
5358 rm -f conftest.$ac_objext
5359 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5360 (eval $ac_compile) 2>conftest.er1
5361 ac_status=$?
5362 grep -v '^ *+' conftest.er1 >conftest.err
5363 rm -f conftest.er1
5364 cat conftest.err >&5
5365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5366 (exit $ac_status); } &&
5367 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
5368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5369 (eval $ac_try) 2>&5
5370 ac_status=$?
5371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5372 (exit $ac_status); }; } &&
5373 { ac_try='test -s conftest.$ac_objext'
5374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5375 (eval $ac_try) 2>&5
5376 ac_status=$?
5377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5378 (exit $ac_status); }; }; then
5379 break
5380 else
5381 echo "$as_me: failed program was:" >&5
5382 sed 's/^/| /' conftest.$ac_ext >&5
5383
5384 fi
5385 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5386 done
5387 rm -f conftest*
5388 if test -n "$ac_declaration"; then
5389 echo '#ifdef __cplusplus' >>confdefs.h
5390 echo $ac_declaration >>confdefs.h
5391 echo '#endif' >>confdefs.h
5392 fi
5393
5394 ac_ext=cc
5395 ac_cpp='$CXXCPP $CPPFLAGS'
5396 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5397 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5398 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5399
5400
5401
5402 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5403 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5404 (test "X$CXX" != "Xg++"))) ; then
5405 ac_ext=cc
5406 ac_cpp='$CXXCPP $CPPFLAGS'
5407 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5408 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5409 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5410 echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
5411 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
5412 if test -z "$CXXCPP"; then
5413 if test "${ac_cv_prog_CXXCPP+set}" = set; then
5414 echo $ECHO_N "(cached) $ECHO_C" >&6
5415 else
5416 # Double quotes because CXXCPP needs to be expanded
5417 for CXXCPP in "$CXX -E" "/lib/cpp"
5418 do
5419 ac_preproc_ok=false
5420 for ac_cxx_preproc_warn_flag in '' yes
5421 do
5422 # Use a header file that comes with gcc, so configuring glibc
5423 # with a fresh cross-compiler works.
5424 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5425 # <limits.h> exists even on freestanding compilers.
5426 # On the NeXT, cc -E runs the code through the compiler's parser,
5427 # not just through cpp. "Syntax error" is here to catch this case.
5428 cat >conftest.$ac_ext <<_ACEOF
5429 /* confdefs.h. */
5430 _ACEOF
5431 cat confdefs.h >>conftest.$ac_ext
5432 cat >>conftest.$ac_ext <<_ACEOF
5433 /* end confdefs.h. */
5434 #ifdef __STDC__
5435 # include <limits.h>
5436 #else
5437 # include <assert.h>
5438 #endif
5439 Syntax error
5440 _ACEOF
5441 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5442 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5443 ac_status=$?
5444 grep -v '^ *+' conftest.er1 >conftest.err
5445 rm -f conftest.er1
5446 cat conftest.err >&5
5447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5448 (exit $ac_status); } >/dev/null; then
5449 if test -s conftest.err; then
5450 ac_cpp_err=$ac_cxx_preproc_warn_flag
5451 ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
5452 else
5453 ac_cpp_err=
5454 fi
5455 else
5456 ac_cpp_err=yes
5457 fi
5458 if test -z "$ac_cpp_err"; then
5459 :
5460 else
5461 echo "$as_me: failed program was:" >&5
5462 sed 's/^/| /' conftest.$ac_ext >&5
5463
5464 # Broken: fails on valid input.
5465 continue
5466 fi
5467 rm -f conftest.err conftest.$ac_ext
5468
5469 # OK, works on sane cases. Now check whether non-existent headers
5470 # can be detected and how.
5471 cat >conftest.$ac_ext <<_ACEOF
5472 /* confdefs.h. */
5473 _ACEOF
5474 cat confdefs.h >>conftest.$ac_ext
5475 cat >>conftest.$ac_ext <<_ACEOF
5476 /* end confdefs.h. */
5477 #include <ac_nonexistent.h>
5478 _ACEOF
5479 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5480 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5481 ac_status=$?
5482 grep -v '^ *+' conftest.er1 >conftest.err
5483 rm -f conftest.er1
5484 cat conftest.err >&5
5485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5486 (exit $ac_status); } >/dev/null; then
5487 if test -s conftest.err; then
5488 ac_cpp_err=$ac_cxx_preproc_warn_flag
5489 ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
5490 else
5491 ac_cpp_err=
5492 fi
5493 else
5494 ac_cpp_err=yes
5495 fi
5496 if test -z "$ac_cpp_err"; then
5497 # Broken: success on invalid input.
5498 continue
5499 else
5500 echo "$as_me: failed program was:" >&5
5501 sed 's/^/| /' conftest.$ac_ext >&5
5502
5503 # Passes both tests.
5504 ac_preproc_ok=:
5505 break
5506 fi
5507 rm -f conftest.err conftest.$ac_ext
5508
5509 done
5510 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5511 rm -f conftest.err conftest.$ac_ext
5512 if $ac_preproc_ok; then
5513 break
5514 fi
5515
5516 done
5517 ac_cv_prog_CXXCPP=$CXXCPP
5518
5519 fi
5520 CXXCPP=$ac_cv_prog_CXXCPP
5521 else
5522 ac_cv_prog_CXXCPP=$CXXCPP
5523 fi
5524 echo "$as_me:$LINENO: result: $CXXCPP" >&5
5525 echo "${ECHO_T}$CXXCPP" >&6
5526 ac_preproc_ok=false
5527 for ac_cxx_preproc_warn_flag in '' yes
5528 do
5529 # Use a header file that comes with gcc, so configuring glibc
5530 # with a fresh cross-compiler works.
5531 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5532 # <limits.h> exists even on freestanding compilers.
5533 # On the NeXT, cc -E runs the code through the compiler's parser,
5534 # not just through cpp. "Syntax error" is here to catch this case.
5535 cat >conftest.$ac_ext <<_ACEOF
5536 /* confdefs.h. */
5537 _ACEOF
5538 cat confdefs.h >>conftest.$ac_ext
5539 cat >>conftest.$ac_ext <<_ACEOF
5540 /* end confdefs.h. */
5541 #ifdef __STDC__
5542 # include <limits.h>
5543 #else
5544 # include <assert.h>
5545 #endif
5546 Syntax error
5547 _ACEOF
5548 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5549 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5550 ac_status=$?
5551 grep -v '^ *+' conftest.er1 >conftest.err
5552 rm -f conftest.er1
5553 cat conftest.err >&5
5554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5555 (exit $ac_status); } >/dev/null; then
5556 if test -s conftest.err; then
5557 ac_cpp_err=$ac_cxx_preproc_warn_flag
5558 ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
5559 else
5560 ac_cpp_err=
5561 fi
5562 else
5563 ac_cpp_err=yes
5564 fi
5565 if test -z "$ac_cpp_err"; then
5566 :
5567 else
5568 echo "$as_me: failed program was:" >&5
5569 sed 's/^/| /' conftest.$ac_ext >&5
5570
5571 # Broken: fails on valid input.
5572 continue
5573 fi
5574 rm -f conftest.err conftest.$ac_ext
5575
5576 # OK, works on sane cases. Now check whether non-existent headers
5577 # can be detected and how.
5578 cat >conftest.$ac_ext <<_ACEOF
5579 /* confdefs.h. */
5580 _ACEOF
5581 cat confdefs.h >>conftest.$ac_ext
5582 cat >>conftest.$ac_ext <<_ACEOF
5583 /* end confdefs.h. */
5584 #include <ac_nonexistent.h>
5585 _ACEOF
5586 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5587 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5588 ac_status=$?
5589 grep -v '^ *+' conftest.er1 >conftest.err
5590 rm -f conftest.er1
5591 cat conftest.err >&5
5592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5593 (exit $ac_status); } >/dev/null; then
5594 if test -s conftest.err; then
5595 ac_cpp_err=$ac_cxx_preproc_warn_flag
5596 ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
5597 else
5598 ac_cpp_err=
5599 fi
5600 else
5601 ac_cpp_err=yes
5602 fi
5603 if test -z "$ac_cpp_err"; then
5604 # Broken: success on invalid input.
5605 continue
5606 else
5607 echo "$as_me: failed program was:" >&5
5608 sed 's/^/| /' conftest.$ac_ext >&5
5609
5610 # Passes both tests.
5611 ac_preproc_ok=:
5612 break
5613 fi
5614 rm -f conftest.err conftest.$ac_ext
5615
5616 done
5617 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5618 rm -f conftest.err conftest.$ac_ext
5619 if $ac_preproc_ok; then
5620 :
5621 else
5622 { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
5623 See \`config.log' for more details." >&5
5624 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
5625 See \`config.log' for more details." >&2;}
5626 { (exit 1); exit 1; }; }
5627 fi
5628
5629 ac_ext=cc
5630 ac_cpp='$CXXCPP $CPPFLAGS'
5631 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5632 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5633 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5634
5635 fi
5636
5637
5638 ac_ext=f
5639 ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
5640 ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5641 ac_compiler_gnu=$ac_cv_f77_compiler_gnu
5642 if test -n "$ac_tool_prefix"; then
5643 for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
5644 do
5645 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5646 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5647 echo "$as_me:$LINENO: checking for $ac_word" >&5
5648 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5649 if test "${ac_cv_prog_F77+set}" = set; then
5650 echo $ECHO_N "(cached) $ECHO_C" >&6
5651 else
5652 if test -n "$F77"; then
5653 ac_cv_prog_F77="$F77" # Let the user override the test.
5654 else
5655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5656 for as_dir in $PATH
5657 do
5658 IFS=$as_save_IFS
5659 test -z "$as_dir" && as_dir=.
5660 for ac_exec_ext in '' $ac_executable_extensions; do
5661 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5662 ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
5663 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5664 break 2
5665 fi
5666 done
5667 done
5668
5669 fi
5670 fi
5671 F77=$ac_cv_prog_F77
5672 if test -n "$F77"; then
5673 echo "$as_me:$LINENO: result: $F77" >&5
5674 echo "${ECHO_T}$F77" >&6
5675 else
5676 echo "$as_me:$LINENO: result: no" >&5
5677 echo "${ECHO_T}no" >&6
5678 fi
5679
5680 test -n "$F77" && break
5681 done
5682 fi
5683 if test -z "$F77"; then
5684 ac_ct_F77=$F77
5685 for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
5686 do
5687 # Extract the first word of "$ac_prog", so it can be a program name with args.
5688 set dummy $ac_prog; ac_word=$2
5689 echo "$as_me:$LINENO: checking for $ac_word" >&5
5690 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5691 if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
5692 echo $ECHO_N "(cached) $ECHO_C" >&6
5693 else
5694 if test -n "$ac_ct_F77"; then
5695 ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
5696 else
5697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5698 for as_dir in $PATH
5699 do
5700 IFS=$as_save_IFS
5701 test -z "$as_dir" && as_dir=.
5702 for ac_exec_ext in '' $ac_executable_extensions; do
5703 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5704 ac_cv_prog_ac_ct_F77="$ac_prog"
5705 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5706 break 2
5707 fi
5708 done
5709 done
5710
5711 fi
5712 fi
5713 ac_ct_F77=$ac_cv_prog_ac_ct_F77
5714 if test -n "$ac_ct_F77"; then
5715 echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
5716 echo "${ECHO_T}$ac_ct_F77" >&6
5717 else
5718 echo "$as_me:$LINENO: result: no" >&5
5719 echo "${ECHO_T}no" >&6
5720 fi
5721
5722 test -n "$ac_ct_F77" && break
5723 done
5724
5725 F77=$ac_ct_F77
5726 fi
5727
5728
5729 # Provide some information about the compiler.
5730 echo "$as_me:5731:" \
5731 "checking for Fortran 77 compiler version" >&5
5732 ac_compiler=`set X $ac_compile; echo $2`
5733 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
5734 (eval $ac_compiler --version </dev/null >&5) 2>&5
5735 ac_status=$?
5736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5737 (exit $ac_status); }
5738 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
5739 (eval $ac_compiler -v </dev/null >&5) 2>&5
5740 ac_status=$?
5741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5742 (exit $ac_status); }
5743 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
5744 (eval $ac_compiler -V </dev/null >&5) 2>&5
5745 ac_status=$?
5746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5747 (exit $ac_status); }
5748 rm -f a.out
5749
5750 # If we don't use `.F' as extension, the preprocessor is not run on the
5751 # input file. (Note that this only needs to work for GNU compilers.)
5752 ac_save_ext=$ac_ext
5753 ac_ext=F
5754 echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
5755 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
5756 if test "${ac_cv_f77_compiler_gnu+set}" = set; then
5757 echo $ECHO_N "(cached) $ECHO_C" >&6
5758 else
5759 cat >conftest.$ac_ext <<_ACEOF
5760 program main
5761 #ifndef __GNUC__
5762 choke me
5763 #endif
5764
5765 end
5766 _ACEOF
5767 rm -f conftest.$ac_objext
5768 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5769 (eval $ac_compile) 2>conftest.er1
5770 ac_status=$?
5771 grep -v '^ *+' conftest.er1 >conftest.err
5772 rm -f conftest.er1
5773 cat conftest.err >&5
5774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5775 (exit $ac_status); } &&
5776 { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
5777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5778 (eval $ac_try) 2>&5
5779 ac_status=$?
5780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5781 (exit $ac_status); }; } &&
5782 { ac_try='test -s conftest.$ac_objext'
5783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5784 (eval $ac_try) 2>&5
5785 ac_status=$?
5786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5787 (exit $ac_status); }; }; then
5788 ac_compiler_gnu=yes
5789 else
5790 echo "$as_me: failed program was:" >&5
5791 sed 's/^/| /' conftest.$ac_ext >&5
5792
5793 ac_compiler_gnu=no
5794 fi
5795 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5796 ac_cv_f77_compiler_gnu=$ac_compiler_gnu
5797
5798 fi
5799 echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
5800 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
5801 ac_ext=$ac_save_ext
5802 ac_test_FFLAGS=${FFLAGS+set}
5803 ac_save_FFLAGS=$FFLAGS
5804 FFLAGS=
5805 echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
5806 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
5807 if test "${ac_cv_prog_f77_g+set}" = set; then
5808 echo $ECHO_N "(cached) $ECHO_C" >&6
5809 else
5810 FFLAGS=-g
5811 cat >conftest.$ac_ext <<_ACEOF
5812 program main
5813
5814 end
5815 _ACEOF
5816 rm -f conftest.$ac_objext
5817 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5818 (eval $ac_compile) 2>conftest.er1
5819 ac_status=$?
5820 grep -v '^ *+' conftest.er1 >conftest.err
5821 rm -f conftest.er1
5822 cat conftest.err >&5
5823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5824 (exit $ac_status); } &&
5825 { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
5826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5827 (eval $ac_try) 2>&5
5828 ac_status=$?
5829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5830 (exit $ac_status); }; } &&
5831 { ac_try='test -s conftest.$ac_objext'
5832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5833 (eval $ac_try) 2>&5
5834 ac_status=$?
5835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5836 (exit $ac_status); }; }; then
5837 ac_cv_prog_f77_g=yes
5838 else
5839 echo "$as_me: failed program was:" >&5
5840 sed 's/^/| /' conftest.$ac_ext >&5
5841
5842 ac_cv_prog_f77_g=no
5843 fi
5844 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5845
5846 fi
5847 echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
5848 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
5849 if test "$ac_test_FFLAGS" = set; then
5850 FFLAGS=$ac_save_FFLAGS
5851 elif test $ac_cv_prog_f77_g = yes; then
5852 if test "x$ac_cv_f77_compiler_gnu" = xyes; then
5853 FFLAGS="-g -O2"
5854 else
5855 FFLAGS="-g"
5856 fi
5857 else
5858 if test "x$ac_cv_f77_compiler_gnu" = xyes; then
5859 FFLAGS="-O2"
5860 else
5861 FFLAGS=
5862 fi
5863 fi
5864
5865 G77=`test $ac_compiler_gnu = yes && echo yes`
5866 ac_ext=c
5867 ac_cpp='$CPP $CPPFLAGS'
5868 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5869 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5870 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5871
5872
5873
5874 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
5875
5876 # find the maximum length of command line arguments
5877 echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
5878 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
5879 if test "${lt_cv_sys_max_cmd_len+set}" = set; then
5880 echo $ECHO_N "(cached) $ECHO_C" >&6
5881 else
5882 i=0
5883 teststring="ABCD"
5884
5885 case $build_os in
5886 msdosdjgpp*)
5887 # On DJGPP, this test can blow up pretty badly due to problems in libc
5888 # (any single argument exceeding 2000 bytes causes a buffer overrun
5889 # during glob expansion). Even if it were fixed, the result of this
5890 # check would be larger than it should be.
5891 lt_cv_sys_max_cmd_len=12288; # 12K is about right
5892 ;;
5893
5894 gnu*)
5895 # Under GNU Hurd, this test is not required because there is
5896 # no limit to the length of command line arguments.
5897 # Libtool will interpret -1 as no limit whatsoever
5898 lt_cv_sys_max_cmd_len=-1;
5899 ;;
5900
5901 cygwin* | mingw*)
5902 # On Win9x/ME, this test blows up -- it succeeds, but takes
5903 # about 5 minutes as the teststring grows exponentially.
5904 # Worse, since 9x/ME are not pre-emptively multitasking,
5905 # you end up with a "frozen" computer, even though with patience
5906 # the test eventually succeeds (with a max line length of 256k).
5907 # Instead, let's just punt: use the minimum linelength reported by
5908 # all of the supported platforms: 8192 (on NT/2K/XP).
5909 lt_cv_sys_max_cmd_len=8192;
5910 ;;
5911
5912 amigaos*)
5913 # On AmigaOS with pdksh, this test takes hours, literally.
5914 # So we just punt and use a minimum line length of 8192.
5915 lt_cv_sys_max_cmd_len=8192;
5916 ;;
5917
5918 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
5919 # This has been around since 386BSD, at least. Likely further.
5920 if test -x /sbin/sysctl; then
5921 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
5922 elif test -x /usr/sbin/sysctl; then
5923 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
5924 else
5925 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
5926 fi
5927 # And add a safety zone
5928 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5929 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5930 ;;
5931 osf*)
5932 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
5933 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
5934 # nice to cause kernel panics so lets avoid the loop below.
5935 # First set a reasonable default.
5936 lt_cv_sys_max_cmd_len=16384
5937 #
5938 if test -x /sbin/sysconfig; then
5939 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
5940 *1*) lt_cv_sys_max_cmd_len=-1 ;;
5941 esac
5942 fi
5943 ;;
5944 *)
5945 # If test is not a shell built-in, we'll probably end up computing a
5946 # maximum length that is only half of the actual maximum length, but
5947 # we can't tell.
5948 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
5949 while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
5950 = "XX$teststring") >/dev/null 2>&1 &&
5951 new_result=`expr "X$teststring" : ".*" 2>&1` &&
5952 lt_cv_sys_max_cmd_len=$new_result &&
5953 test $i != 17 # 1/2 MB should be enough
5954 do
5955 i=`expr $i + 1`
5956 teststring=$teststring$teststring
5957 done
5958 teststring=
5959 # Add a significant safety factor because C++ compilers can tack on massive
5960 # amounts of additional arguments before passing them to the linker.
5961 # It appears as though 1/2 is a usable value.
5962 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
5963 ;;
5964 esac
5965
5966 fi
5967
5968 if test -n $lt_cv_sys_max_cmd_len ; then
5969 echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
5970 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
5971 else
5972 echo "$as_me:$LINENO: result: none" >&5
5973 echo "${ECHO_T}none" >&6
5974 fi
5975
5976
5977
5978
5979 # Check for command to grab the raw symbol name followed by C symbol from nm.
5980 echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
5981 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
5982 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
5983 echo $ECHO_N "(cached) $ECHO_C" >&6
5984 else
5985
5986 # These are sane defaults that work on at least a few old systems.
5987 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5988
5989 # Character class describing NM global symbol codes.
5990 symcode='[BCDEGRST]'
5991
5992 # Regexp to match symbols that can be accessed directly from C.
5993 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
5994
5995 # Transform an extracted symbol line into a proper C declaration
5996 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5997
5998 # Transform an extracted symbol line into symbol name and symbol address
5999 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'"
6000
6001 # Define system-specific variables.
6002 case $host_os in
6003 aix*)
6004 symcode='[BCDT]'
6005 ;;
6006 cygwin* | mingw* | pw32*)
6007 symcode='[ABCDGISTW]'
6008 ;;
6009 hpux*) # Its linker distinguishes data from code symbols
6010 if test "$host_cpu" = ia64; then
6011 symcode='[ABCDEGRST]'
6012 fi
6013 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6014 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'"
6015 ;;
6016 linux*)
6017 if test "$host_cpu" = ia64; then
6018 symcode='[ABCDGIRSTW]'
6019 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6020 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'"
6021 fi
6022 ;;
6023 irix* | nonstopux*)
6024 symcode='[BCDEGRST]'
6025 ;;
6026 osf*)
6027 symcode='[BCDEGQRST]'
6028 ;;
6029 solaris* | sysv5*)
6030 symcode='[BDRT]'
6031 ;;
6032 sysv4)
6033 symcode='[DFNSTU]'
6034 ;;
6035 esac
6036
6037 # Handle CRLF in mingw tool chain
6038 opt_cr=
6039 case $build_os in
6040 mingw*)
6041 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6042 ;;
6043 esac
6044
6045 # If we're using GNU nm, then use its standard symbol codes.
6046 case `$NM -V 2>&1` in
6047 *GNU* | *'with BFD'*)
6048 symcode='[ABCDGIRSTW]' ;;
6049 esac
6050
6051 # Try without a prefix undercore, then with it.
6052 for ac_symprfx in "" "_"; do
6053
6054 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6055 symxfrm="\\1 $ac_symprfx\\2 \\2"
6056
6057 # Write the raw and C identifiers.
6058 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6059
6060 # Check to see that the pipe works correctly.
6061 pipe_works=no
6062
6063 rm -f conftest*
6064 cat > conftest.$ac_ext <<EOF
6065 #ifdef __cplusplus
6066 extern "C" {
6067 #endif
6068 char nm_test_var;
6069 void nm_test_func(){}
6070 #ifdef __cplusplus
6071 }
6072 #endif
6073 int main(){nm_test_var='a';nm_test_func();return(0);}
6074 EOF
6075
6076 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6077 (eval $ac_compile) 2>&5
6078 ac_status=$?
6079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6080 (exit $ac_status); }; then
6081 # Now try to grab the symbols.
6082 nlist=conftest.nm
6083 if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
6084 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
6085 ac_status=$?
6086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6087 (exit $ac_status); } && test -s "$nlist"; then
6088 # Try sorting and uniquifying the output.
6089 if sort "$nlist" | uniq > "$nlist"T; then
6090 mv -f "$nlist"T "$nlist"
6091 else
6092 rm -f "$nlist"T
6093 fi
6094
6095 # Make sure that we snagged all the symbols we need.
6096 if grep ' nm_test_var$' "$nlist" >/dev/null; then
6097 if grep ' nm_test_func$' "$nlist" >/dev/null; then
6098 cat <<EOF > conftest.$ac_ext
6099 #ifdef __cplusplus
6100 extern "C" {
6101 #endif
6102
6103 EOF
6104 # Now generate the symbol file.
6105 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6106
6107 cat <<EOF >> conftest.$ac_ext
6108 #if defined (__STDC__) && __STDC__
6109 # define lt_ptr_t void *
6110 #else
6111 # define lt_ptr_t char *
6112 # define const
6113 #endif
6114
6115 /* The mapping between symbol names and symbols. */
6116 const struct {
6117 const char *name;
6118 lt_ptr_t address;
6119 }
6120 lt_preloaded_symbols[] =
6121 {
6122 EOF
6123 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6124 cat <<\EOF >> conftest.$ac_ext
6125 {0, (lt_ptr_t) 0}
6126 };
6127
6128 #ifdef __cplusplus
6129 }
6130 #endif
6131 EOF
6132 # Now try linking the two files.
6133 mv conftest.$ac_objext conftstm.$ac_objext
6134 lt_save_LIBS="$LIBS"
6135 lt_save_CFLAGS="$CFLAGS"
6136 LIBS="conftstm.$ac_objext"
6137 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
6138 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6139 (eval $ac_link) 2>&5
6140 ac_status=$?
6141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6142 (exit $ac_status); } && test -s conftest${ac_exeext}; then
6143 pipe_works=yes
6144 fi
6145 LIBS="$lt_save_LIBS"
6146 CFLAGS="$lt_save_CFLAGS"
6147 else
6148 echo "cannot find nm_test_func in $nlist" >&5
6149 fi
6150 else
6151 echo "cannot find nm_test_var in $nlist" >&5
6152 fi
6153 else
6154 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
6155 fi
6156 else
6157 echo "$progname: failed program was:" >&5
6158 cat conftest.$ac_ext >&5
6159 fi
6160 rm -f conftest* conftst*
6161
6162 # Do not use the global_symbol_pipe unless it works.
6163 if test "$pipe_works" = yes; then
6164 break
6165 else
6166 lt_cv_sys_global_symbol_pipe=
6167 fi
6168 done
6169
6170 fi
6171
6172 if test -z "$lt_cv_sys_global_symbol_pipe"; then
6173 lt_cv_sys_global_symbol_to_cdecl=
6174 fi
6175 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6176 echo "$as_me:$LINENO: result: failed" >&5
6177 echo "${ECHO_T}failed" >&6
6178 else
6179 echo "$as_me:$LINENO: result: ok" >&5
6180 echo "${ECHO_T}ok" >&6
6181 fi
6182
6183 echo "$as_me:$LINENO: checking for objdir" >&5
6184 echo $ECHO_N "checking for objdir... $ECHO_C" >&6
6185 if test "${lt_cv_objdir+set}" = set; then
6186 echo $ECHO_N "(cached) $ECHO_C" >&6
6187 else
6188 rm -f .libs 2>/dev/null
6189 mkdir .libs 2>/dev/null
6190 if test -d .libs; then
6191 lt_cv_objdir=.libs
6192 else
6193 # MS-DOS does not allow filenames that begin with a dot.
6194 lt_cv_objdir=_libs
6195 fi
6196 rmdir .libs 2>/dev/null
6197 fi
6198 echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
6199 echo "${ECHO_T}$lt_cv_objdir" >&6
6200 objdir=$lt_cv_objdir
6201
6202
6203
6204
6205
6206 case $host_os in
6207 aix3*)
6208 # AIX sometimes has problems with the GCC collect2 program. For some
6209 # reason, if we set the COLLECT_NAMES environment variable, the problems
6210 # vanish in a puff of smoke.
6211 if test "X${COLLECT_NAMES+set}" != Xset; then
6212 COLLECT_NAMES=
6213 export COLLECT_NAMES
6214 fi
6215 ;;
6216 esac
6217
6218 # Sed substitution that helps us do robust quoting. It backslashifies
6219 # metacharacters that are still active within double-quoted strings.
6220 Xsed='sed -e 1s/^X//'
6221 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
6222
6223 # Same as above, but do not quote variable references.
6224 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
6225
6226 # Sed substitution to delay expansion of an escaped shell variable in a
6227 # double_quote_subst'ed string.
6228 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6229
6230 # Sed substitution to avoid accidental globbing in evaled expressions
6231 no_glob_subst='s/\*/\\\*/g'
6232
6233 # Constants:
6234 rm="rm -f"
6235
6236 # Global variables:
6237 default_ofile=libtool
6238 can_build_shared=yes
6239
6240 # All known linkers require a `.a' archive for static linking (except MSVC,
6241 # which needs '.lib').
6242 libext=a
6243 ltmain="$ac_aux_dir/ltmain.sh"
6244 ofile="$default_ofile"
6245 with_gnu_ld="$lt_cv_prog_gnu_ld"
6246
6247 if test -n "$ac_tool_prefix"; then
6248 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6249 set dummy ${ac_tool_prefix}ar; ac_word=$2
6250 echo "$as_me:$LINENO: checking for $ac_word" >&5
6251 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6252 if test "${ac_cv_prog_AR+set}" = set; then
6253 echo $ECHO_N "(cached) $ECHO_C" >&6
6254 else
6255 if test -n "$AR"; then
6256 ac_cv_prog_AR="$AR" # Let the user override the test.
6257 else
6258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6259 for as_dir in $PATH
6260 do
6261 IFS=$as_save_IFS
6262 test -z "$as_dir" && as_dir=.
6263 for ac_exec_ext in '' $ac_executable_extensions; do
6264 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6265 ac_cv_prog_AR="${ac_tool_prefix}ar"
6266 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6267 break 2
6268 fi
6269 done
6270 done
6271
6272 fi
6273 fi
6274 AR=$ac_cv_prog_AR
6275 if test -n "$AR"; then
6276 echo "$as_me:$LINENO: result: $AR" >&5
6277 echo "${ECHO_T}$AR" >&6
6278 else
6279 echo "$as_me:$LINENO: result: no" >&5
6280 echo "${ECHO_T}no" >&6
6281 fi
6282
6283 fi
6284 if test -z "$ac_cv_prog_AR"; then
6285 ac_ct_AR=$AR
6286 # Extract the first word of "ar", so it can be a program name with args.
6287 set dummy ar; ac_word=$2
6288 echo "$as_me:$LINENO: checking for $ac_word" >&5
6289 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6290 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
6291 echo $ECHO_N "(cached) $ECHO_C" >&6
6292 else
6293 if test -n "$ac_ct_AR"; then
6294 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6295 else
6296 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6297 for as_dir in $PATH
6298 do
6299 IFS=$as_save_IFS
6300 test -z "$as_dir" && as_dir=.
6301 for ac_exec_ext in '' $ac_executable_extensions; do
6302 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6303 ac_cv_prog_ac_ct_AR="ar"
6304 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6305 break 2
6306 fi
6307 done
6308 done
6309
6310 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
6311 fi
6312 fi
6313 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6314 if test -n "$ac_ct_AR"; then
6315 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
6316 echo "${ECHO_T}$ac_ct_AR" >&6
6317 else
6318 echo "$as_me:$LINENO: result: no" >&5
6319 echo "${ECHO_T}no" >&6
6320 fi
6321
6322 AR=$ac_ct_AR
6323 else
6324 AR="$ac_cv_prog_AR"
6325 fi
6326
6327 if test -n "$ac_tool_prefix"; then
6328 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6329 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6330 echo "$as_me:$LINENO: checking for $ac_word" >&5
6331 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6332 if test "${ac_cv_prog_RANLIB+set}" = set; then
6333 echo $ECHO_N "(cached) $ECHO_C" >&6
6334 else
6335 if test -n "$RANLIB"; then
6336 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6337 else
6338 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6339 for as_dir in $PATH
6340 do
6341 IFS=$as_save_IFS
6342 test -z "$as_dir" && as_dir=.
6343 for ac_exec_ext in '' $ac_executable_extensions; do
6344 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6345 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6346 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6347 break 2
6348 fi
6349 done
6350 done
6351
6352 fi
6353 fi
6354 RANLIB=$ac_cv_prog_RANLIB
6355 if test -n "$RANLIB"; then
6356 echo "$as_me:$LINENO: result: $RANLIB" >&5
6357 echo "${ECHO_T}$RANLIB" >&6
6358 else
6359 echo "$as_me:$LINENO: result: no" >&5
6360 echo "${ECHO_T}no" >&6
6361 fi
6362
6363 fi
6364 if test -z "$ac_cv_prog_RANLIB"; then
6365 ac_ct_RANLIB=$RANLIB
6366 # Extract the first word of "ranlib", so it can be a program name with args.
6367 set dummy ranlib; ac_word=$2
6368 echo "$as_me:$LINENO: checking for $ac_word" >&5
6369 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6370 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6371 echo $ECHO_N "(cached) $ECHO_C" >&6
6372 else
6373 if test -n "$ac_ct_RANLIB"; then
6374 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6375 else
6376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6377 for as_dir in $PATH
6378 do
6379 IFS=$as_save_IFS
6380 test -z "$as_dir" && as_dir=.
6381 for ac_exec_ext in '' $ac_executable_extensions; do
6382 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6383 ac_cv_prog_ac_ct_RANLIB="ranlib"
6384 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6385 break 2
6386 fi
6387 done
6388 done
6389
6390 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6391 fi
6392 fi
6393 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6394 if test -n "$ac_ct_RANLIB"; then
6395 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6396 echo "${ECHO_T}$ac_ct_RANLIB" >&6
6397 else
6398 echo "$as_me:$LINENO: result: no" >&5
6399 echo "${ECHO_T}no" >&6
6400 fi
6401
6402 RANLIB=$ac_ct_RANLIB
6403 else
6404 RANLIB="$ac_cv_prog_RANLIB"
6405 fi
6406
6407 if test -n "$ac_tool_prefix"; then
6408 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6409 set dummy ${ac_tool_prefix}strip; ac_word=$2
6410 echo "$as_me:$LINENO: checking for $ac_word" >&5
6411 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6412 if test "${ac_cv_prog_STRIP+set}" = set; then
6413 echo $ECHO_N "(cached) $ECHO_C" >&6
6414 else
6415 if test -n "$STRIP"; then
6416 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6417 else
6418 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6419 for as_dir in $PATH
6420 do
6421 IFS=$as_save_IFS
6422 test -z "$as_dir" && as_dir=.
6423 for ac_exec_ext in '' $ac_executable_extensions; do
6424 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6425 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6426 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6427 break 2
6428 fi
6429 done
6430 done
6431
6432 fi
6433 fi
6434 STRIP=$ac_cv_prog_STRIP
6435 if test -n "$STRIP"; then
6436 echo "$as_me:$LINENO: result: $STRIP" >&5
6437 echo "${ECHO_T}$STRIP" >&6
6438 else
6439 echo "$as_me:$LINENO: result: no" >&5
6440 echo "${ECHO_T}no" >&6
6441 fi
6442
6443 fi
6444 if test -z "$ac_cv_prog_STRIP"; then
6445 ac_ct_STRIP=$STRIP
6446 # Extract the first word of "strip", so it can be a program name with args.
6447 set dummy strip; ac_word=$2
6448 echo "$as_me:$LINENO: checking for $ac_word" >&5
6449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6450 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6451 echo $ECHO_N "(cached) $ECHO_C" >&6
6452 else
6453 if test -n "$ac_ct_STRIP"; then
6454 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6455 else
6456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6457 for as_dir in $PATH
6458 do
6459 IFS=$as_save_IFS
6460 test -z "$as_dir" && as_dir=.
6461 for ac_exec_ext in '' $ac_executable_extensions; do
6462 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6463 ac_cv_prog_ac_ct_STRIP="strip"
6464 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6465 break 2
6466 fi
6467 done
6468 done
6469
6470 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
6471 fi
6472 fi
6473 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6474 if test -n "$ac_ct_STRIP"; then
6475 echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6476 echo "${ECHO_T}$ac_ct_STRIP" >&6
6477 else
6478 echo "$as_me:$LINENO: result: no" >&5
6479 echo "${ECHO_T}no" >&6
6480 fi
6481
6482 STRIP=$ac_ct_STRIP
6483 else
6484 STRIP="$ac_cv_prog_STRIP"
6485 fi
6486
6487
6488 old_CC="$CC"
6489 old_CFLAGS="$CFLAGS"
6490
6491 # Set sane defaults for various variables
6492 test -z "$AR" && AR=ar
6493 test -z "$AR_FLAGS" && AR_FLAGS=cru
6494 test -z "$AS" && AS=as
6495 test -z "$CC" && CC=cc
6496 test -z "$LTCC" && LTCC=$CC
6497 test -z "$DLLTOOL" && DLLTOOL=dlltool
6498 test -z "$LD" && LD=ld
6499 test -z "$LN_S" && LN_S="ln -s"
6500 test -z "$MAGIC_CMD" && MAGIC_CMD=file
6501 test -z "$NM" && NM=nm
6502 test -z "$SED" && SED=sed
6503 test -z "$OBJDUMP" && OBJDUMP=objdump
6504 test -z "$RANLIB" && RANLIB=:
6505 test -z "$STRIP" && STRIP=:
6506 test -z "$ac_objext" && ac_objext=o
6507
6508 # Determine commands to create old-style static archives.
6509 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
6510 old_postinstall_cmds='chmod 644 $oldlib'
6511 old_postuninstall_cmds=
6512
6513 if test -n "$RANLIB"; then
6514 case $host_os in
6515 openbsd*)
6516 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
6517 ;;
6518 *)
6519 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
6520 ;;
6521 esac
6522 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
6523 fi
6524
6525 for cc_temp in $compiler""; do
6526 case $cc_temp in
6527 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
6528 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
6529 \-*) ;;
6530 *) break;;
6531 esac
6532 done
6533 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
6534
6535
6536 # Only perform the check for file, if the check method requires it
6537 case $deplibs_check_method in
6538 file_magic*)
6539 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
6540 echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
6541 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
6542 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
6543 echo $ECHO_N "(cached) $ECHO_C" >&6
6544 else
6545 case $MAGIC_CMD in
6546 [\\/*] | ?:[\\/]*)
6547 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
6548 ;;
6549 *)
6550 lt_save_MAGIC_CMD="$MAGIC_CMD"
6551 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6552 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
6553 for ac_dir in $ac_dummy; do
6554 IFS="$lt_save_ifs"
6555 test -z "$ac_dir" && ac_dir=.
6556 if test -f $ac_dir/${ac_tool_prefix}file; then
6557 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
6558 if test -n "$file_magic_test_file"; then
6559 case $deplibs_check_method in
6560 "file_magic "*)
6561 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
6562 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
6563 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
6564 $EGREP "$file_magic_regex" > /dev/null; then
6565 :
6566 else
6567 cat <<EOF 1>&2
6568
6569 *** Warning: the command libtool uses to detect shared libraries,
6570 *** $file_magic_cmd, produces output that libtool cannot recognize.
6571 *** The result is that libtool may fail to recognize shared libraries
6572 *** as such. This will affect the creation of libtool libraries that
6573 *** depend on shared libraries, but programs linked with such libtool
6574 *** libraries will work regardless of this problem. Nevertheless, you
6575 *** may want to report the problem to your system manager and/or to
6576 *** bug-libtool@gnu.org
6577
6578 EOF
6579 fi ;;
6580 esac
6581 fi
6582 break
6583 fi
6584 done
6585 IFS="$lt_save_ifs"
6586 MAGIC_CMD="$lt_save_MAGIC_CMD"
6587 ;;
6588 esac
6589 fi
6590
6591 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
6592 if test -n "$MAGIC_CMD"; then
6593 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
6594 echo "${ECHO_T}$MAGIC_CMD" >&6
6595 else
6596 echo "$as_me:$LINENO: result: no" >&5
6597 echo "${ECHO_T}no" >&6
6598 fi
6599
6600 if test -z "$lt_cv_path_MAGIC_CMD"; then
6601 if test -n "$ac_tool_prefix"; then
6602 echo "$as_me:$LINENO: checking for file" >&5
6603 echo $ECHO_N "checking for file... $ECHO_C" >&6
6604 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
6605 echo $ECHO_N "(cached) $ECHO_C" >&6
6606 else
6607 case $MAGIC_CMD in
6608 [\\/*] | ?:[\\/]*)
6609 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
6610 ;;
6611 *)
6612 lt_save_MAGIC_CMD="$MAGIC_CMD"
6613 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6614 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
6615 for ac_dir in $ac_dummy; do
6616 IFS="$lt_save_ifs"
6617 test -z "$ac_dir" && ac_dir=.
6618 if test -f $ac_dir/file; then
6619 lt_cv_path_MAGIC_CMD="$ac_dir/file"
6620 if test -n "$file_magic_test_file"; then
6621 case $deplibs_check_method in
6622 "file_magic "*)
6623 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
6624 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
6625 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
6626 $EGREP "$file_magic_regex" > /dev/null; then
6627 :
6628 else
6629 cat <<EOF 1>&2
6630
6631 *** Warning: the command libtool uses to detect shared libraries,
6632 *** $file_magic_cmd, produces output that libtool cannot recognize.
6633 *** The result is that libtool may fail to recognize shared libraries
6634 *** as such. This will affect the creation of libtool libraries that
6635 *** depend on shared libraries, but programs linked with such libtool
6636 *** libraries will work regardless of this problem. Nevertheless, you
6637 *** may want to report the problem to your system manager and/or to
6638 *** bug-libtool@gnu.org
6639
6640 EOF
6641 fi ;;
6642 esac
6643 fi
6644 break
6645 fi
6646 done
6647 IFS="$lt_save_ifs"
6648 MAGIC_CMD="$lt_save_MAGIC_CMD"
6649 ;;
6650 esac
6651 fi
6652
6653 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
6654 if test -n "$MAGIC_CMD"; then
6655 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
6656 echo "${ECHO_T}$MAGIC_CMD" >&6
6657 else
6658 echo "$as_me:$LINENO: result: no" >&5
6659 echo "${ECHO_T}no" >&6
6660 fi
6661
6662 else
6663 MAGIC_CMD=:
6664 fi
6665 fi
6666
6667 fi
6668 ;;
6669 esac
6670
6671 enable_dlopen=no
6672 enable_win32_dll=no
6673
6674 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
6675 if test "${enable_libtool_lock+set}" = set; then
6676 enableval="$enable_libtool_lock"
6677
6678 fi;
6679 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6680
6681
6682 # Check whether --with-pic or --without-pic was given.
6683 if test "${with_pic+set}" = set; then
6684 withval="$with_pic"
6685 pic_mode="$withval"
6686 else
6687 pic_mode=default
6688 fi;
6689 test -z "$pic_mode" && pic_mode=default
6690
6691 # Use C for the default configuration in the libtool script
6692 tagname=
6693 lt_save_CC="$CC"
6694 ac_ext=c
6695 ac_cpp='$CPP $CPPFLAGS'
6696 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6697 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6698 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6699
6700
6701 # Source file extension for C test sources.
6702 ac_ext=c
6703
6704 # Object file extension for compiled C test sources.
6705 objext=o
6706 objext=$objext
6707
6708 # Code to be used in simple compile tests
6709 lt_simple_compile_test_code="int some_variable = 0;\n"
6710
6711 # Code to be used in simple link tests
6712 lt_simple_link_test_code='int main(){return(0);}\n'
6713
6714
6715 # If no C compiler was specified, use CC.
6716 LTCC=${LTCC-"$CC"}
6717
6718 # Allow CC to be a program name with arguments.
6719 compiler=$CC
6720
6721
6722 # save warnings/boilerplate of simple test code
6723 ac_outfile=conftest.$ac_objext
6724 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
6725 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
6726 _lt_compiler_boilerplate=`cat conftest.err`
6727 $rm conftest*
6728
6729 ac_outfile=conftest.$ac_objext
6730 printf "$lt_simple_link_test_code" >conftest.$ac_ext
6731 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
6732 _lt_linker_boilerplate=`cat conftest.err`
6733 $rm conftest*
6734
6735
6736 #
6737 # Check for any special shared library compilation flags.
6738 #
6739 lt_prog_cc_shlib=
6740 if test "$GCC" = no; then
6741 case $host_os in
6742 sco3.2v5*)
6743 lt_prog_cc_shlib='-belf'
6744 ;;
6745 esac
6746 fi
6747 if test -n "$lt_prog_cc_shlib"; then
6748 { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
6749 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
6750 if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then :
6751 else
6752 { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
6753 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
6754 lt_cv_prog_cc_can_build_shared=no
6755 fi
6756 fi
6757
6758
6759 #
6760 # Check to make sure the static flag actually works.
6761 #
6762 echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
6763 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
6764 if test "${lt_prog_compiler_static_works+set}" = set; then
6765 echo $ECHO_N "(cached) $ECHO_C" >&6
6766 else
6767 lt_prog_compiler_static_works=no
6768 save_LDFLAGS="$LDFLAGS"
6769 LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
6770 printf "$lt_simple_link_test_code" > conftest.$ac_ext
6771 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6772 # The linker can only warn and ignore the option if not recognized
6773 # So say no if there are warnings
6774 if test -s conftest.err; then
6775 # Append any errors to the config.log.
6776 cat conftest.err 1>&5
6777 $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
6778 $SED '/^$/d' conftest.err >conftest.er2
6779 if diff conftest.exp conftest.er2 >/dev/null; then
6780 lt_prog_compiler_static_works=yes
6781 fi
6782 else
6783 lt_prog_compiler_static_works=yes
6784 fi
6785 fi
6786 $rm conftest*
6787 LDFLAGS="$save_LDFLAGS"
6788
6789 fi
6790 echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
6791 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
6792
6793 if test x"$lt_prog_compiler_static_works" = xyes; then
6794 :
6795 else
6796 lt_prog_compiler_static=
6797 fi
6798
6799
6800
6801
6802 lt_prog_compiler_no_builtin_flag=
6803
6804 if test "$GCC" = yes; then
6805 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
6806
6807
6808 echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
6809 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
6810 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
6811 echo $ECHO_N "(cached) $ECHO_C" >&6
6812 else
6813 lt_cv_prog_compiler_rtti_exceptions=no
6814 ac_outfile=conftest.$ac_objext
6815 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6816 lt_compiler_flag="-fno-rtti -fno-exceptions"
6817 # Insert the option either (1) after the last *FLAGS variable, or
6818 # (2) before a word containing "conftest.", or (3) at the end.
6819 # Note that $ac_compile itself does not contain backslashes and begins
6820 # with a dollar sign (not a hyphen), so the echo should work correctly.
6821 # The option is referenced via a variable to avoid confusing sed.
6822 lt_compile=`echo "$ac_compile" | $SED \
6823 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
6824 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
6825 -e 's:$: $lt_compiler_flag:'`
6826 (eval echo "\"\$as_me:6827: $lt_compile\"" >&5)
6827 (eval "$lt_compile" 2>conftest.err)
6828 ac_status=$?
6829 cat conftest.err >&5
6830 echo "$as_me:6831: \$? = $ac_status" >&5
6831 if (exit $ac_status) && test -s "$ac_outfile"; then
6832 # The compiler can only warn and ignore the option if not recognized
6833 # So say no if there are warnings other than the usual output.
6834 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
6835 $SED '/^$/d' conftest.err >conftest.er2
6836 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
6837 lt_cv_prog_compiler_rtti_exceptions=yes
6838 fi
6839 fi
6840 $rm conftest*
6841
6842 fi
6843 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
6844 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
6845
6846 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
6847 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
6848 else
6849 :
6850 fi
6851
6852 fi
6853
6854 lt_prog_compiler_wl=
6855 lt_prog_compiler_pic=
6856 lt_prog_compiler_static=
6857
6858 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
6859 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
6860
6861 if test "$GCC" = yes; then
6862 lt_prog_compiler_wl='-Wl,'
6863 lt_prog_compiler_static='-static'
6864
6865 case $host_os in
6866 aix*)
6867 # All AIX code is PIC.
6868 if test "$host_cpu" = ia64; then
6869 # AIX 5 now supports IA64 processor
6870 lt_prog_compiler_static='-Bstatic'
6871 fi
6872 ;;
6873
6874 amigaos*)
6875 # FIXME: we need at least 68020 code to build shared libraries, but
6876 # adding the `-m68020' flag to GCC prevents building anything better,
6877 # like `-m68040'.
6878 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
6879 ;;
6880
6881 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6882 # PIC is the default for these OSes.
6883 ;;
6884
6885 mingw* | pw32* | os2*)
6886 # This hack is so that the source file can tell whether it is being
6887 # built for inclusion in a dll (and should export symbols for example).
6888 lt_prog_compiler_pic='-DDLL_EXPORT'
6889 ;;
6890
6891 darwin* | rhapsody*)
6892 # PIC is the default on this platform
6893 # Common symbols not allowed in MH_DYLIB files
6894 lt_prog_compiler_pic='-fno-common'
6895 ;;
6896
6897 msdosdjgpp*)
6898 # Just because we use GCC doesn't mean we suddenly get shared libraries
6899 # on systems that don't support them.
6900 lt_prog_compiler_can_build_shared=no
6901 enable_shared=no
6902 ;;
6903
6904 sysv4*MP*)
6905 if test -d /usr/nec; then
6906 lt_prog_compiler_pic=-Kconform_pic
6907 fi
6908 ;;
6909
6910 hpux*)
6911 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6912 # not for PA HP-UX.
6913 case $host_cpu in
6914 hppa*64*|ia64*)
6915 # +Z the default
6916 ;;
6917 *)
6918 lt_prog_compiler_pic='-fPIC'
6919 ;;
6920 esac
6921 ;;
6922
6923 *)
6924 lt_prog_compiler_pic='-fPIC'
6925 ;;
6926 esac
6927 else
6928 # PORTME Check for flag to pass linker flags through the system compiler.
6929 case $host_os in
6930 aix*)
6931 lt_prog_compiler_wl='-Wl,'
6932 if test "$host_cpu" = ia64; then
6933 # AIX 5 now supports IA64 processor
6934 lt_prog_compiler_static='-Bstatic'
6935 else
6936 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
6937 fi
6938 ;;
6939 darwin*)
6940 # PIC is the default on this platform
6941 # Common symbols not allowed in MH_DYLIB files
6942 case $cc_basename in
6943 xlc*)
6944 lt_prog_compiler_pic='-qnocommon'
6945 lt_prog_compiler_wl='-Wl,'
6946 ;;
6947 esac
6948 ;;
6949
6950 mingw* | pw32* | os2*)
6951 # This hack is so that the source file can tell whether it is being
6952 # built for inclusion in a dll (and should export symbols for example).
6953 lt_prog_compiler_pic='-DDLL_EXPORT'
6954 ;;
6955
6956 hpux9* | hpux10* | hpux11*)
6957 lt_prog_compiler_wl='-Wl,'
6958 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6959 # not for PA HP-UX.
6960 case $host_cpu in
6961 hppa*64*|ia64*)
6962 # +Z the default
6963 ;;
6964 *)
6965 lt_prog_compiler_pic='+Z'
6966 ;;
6967 esac
6968 # Is there a better lt_prog_compiler_static that works with the bundled CC?
6969 lt_prog_compiler_static='${wl}-a ${wl}archive'
6970 ;;
6971
6972 irix5* | irix6* | nonstopux*)
6973 lt_prog_compiler_wl='-Wl,'
6974 # PIC (with -KPIC) is the default.
6975 lt_prog_compiler_static='-non_shared'
6976 ;;
6977
6978 newsos6)
6979 lt_prog_compiler_pic='-KPIC'
6980 lt_prog_compiler_static='-Bstatic'
6981 ;;
6982
6983 linux*)
6984 case $cc_basename in
6985 icc* | ecc*)
6986 lt_prog_compiler_wl='-Wl,'
6987 lt_prog_compiler_pic='-KPIC'
6988 lt_prog_compiler_static='-static'
6989 ;;
6990 pgcc* | pgf77* | pgf90* | pgf95*)
6991 # Portland Group compilers (*not* the Pentium gcc compiler,
6992 # which looks to be a dead project)
6993 lt_prog_compiler_wl='-Wl,'
6994 lt_prog_compiler_pic='-fpic'
6995 lt_prog_compiler_static='-Bstatic'
6996 ;;
6997 ccc*)
6998 lt_prog_compiler_wl='-Wl,'
6999 # All Alpha code is PIC.
7000 lt_prog_compiler_static='-non_shared'
7001 ;;
7002 esac
7003 ;;
7004
7005 osf3* | osf4* | osf5*)
7006 lt_prog_compiler_wl='-Wl,'
7007 # All OSF/1 code is PIC.
7008 lt_prog_compiler_static='-non_shared'
7009 ;;
7010
7011 sco3.2v5*)
7012 lt_prog_compiler_pic='-Kpic'
7013 lt_prog_compiler_static='-dn'
7014 ;;
7015
7016 solaris*)
7017 lt_prog_compiler_pic='-KPIC'
7018 lt_prog_compiler_static='-Bstatic'
7019 case $cc_basename in
7020 f77* | f90* | f95*)
7021 lt_prog_compiler_wl='-Qoption ld ';;
7022 *)
7023 lt_prog_compiler_wl='-Wl,';;
7024 esac
7025 ;;
7026
7027 sunos4*)
7028 lt_prog_compiler_wl='-Qoption ld '
7029 lt_prog_compiler_pic='-PIC'
7030 lt_prog_compiler_static='-Bstatic'
7031 ;;
7032
7033 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7034 lt_prog_compiler_wl='-Wl,'
7035 lt_prog_compiler_pic='-KPIC'
7036 lt_prog_compiler_static='-Bstatic'
7037 ;;
7038
7039 sysv4*MP*)
7040 if test -d /usr/nec ;then
7041 lt_prog_compiler_pic='-Kconform_pic'
7042 lt_prog_compiler_static='-Bstatic'
7043 fi
7044 ;;
7045
7046 unicos*)
7047 lt_prog_compiler_wl='-Wl,'
7048 lt_prog_compiler_can_build_shared=no
7049 ;;
7050
7051 uts4*)
7052 lt_prog_compiler_pic='-pic'
7053 lt_prog_compiler_static='-Bstatic'
7054 ;;
7055
7056 *)
7057 lt_prog_compiler_can_build_shared=no
7058 ;;
7059 esac
7060 fi
7061
7062 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
7063 echo "${ECHO_T}$lt_prog_compiler_pic" >&6
7064
7065 #
7066 # Check to make sure the PIC flag actually works.
7067 #
7068 if test -n "$lt_prog_compiler_pic"; then
7069
7070 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
7071 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
7072 if test "${lt_prog_compiler_pic_works+set}" = set; then
7073 echo $ECHO_N "(cached) $ECHO_C" >&6
7074 else
7075 lt_prog_compiler_pic_works=no
7076 ac_outfile=conftest.$ac_objext
7077 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7078 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
7079 # Insert the option either (1) after the last *FLAGS variable, or
7080 # (2) before a word containing "conftest.", or (3) at the end.
7081 # Note that $ac_compile itself does not contain backslashes and begins
7082 # with a dollar sign (not a hyphen), so the echo should work correctly.
7083 # The option is referenced via a variable to avoid confusing sed.
7084 lt_compile=`echo "$ac_compile" | $SED \
7085 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7086 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7087 -e 's:$: $lt_compiler_flag:'`
7088 (eval echo "\"\$as_me:7089: $lt_compile\"" >&5)
7089 (eval "$lt_compile" 2>conftest.err)
7090 ac_status=$?
7091 cat conftest.err >&5
7092 echo "$as_me:7093: \$? = $ac_status" >&5
7093 if (exit $ac_status) && test -s "$ac_outfile"; then
7094 # The compiler can only warn and ignore the option if not recognized
7095 # So say no if there are warnings other than the usual output.
7096 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
7097 $SED '/^$/d' conftest.err >conftest.er2
7098 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
7099 lt_prog_compiler_pic_works=yes
7100 fi
7101 fi
7102 $rm conftest*
7103
7104 fi
7105 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
7106 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
7107
7108 if test x"$lt_prog_compiler_pic_works" = xyes; then
7109 case $lt_prog_compiler_pic in
7110 "" | " "*) ;;
7111 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
7112 esac
7113 else
7114 lt_prog_compiler_pic=
7115 lt_prog_compiler_can_build_shared=no
7116 fi
7117
7118 fi
7119 case $host_os in
7120 # For platforms which do not support PIC, -DPIC is meaningless:
7121 *djgpp*)
7122 lt_prog_compiler_pic=
7123 ;;
7124 *)
7125 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
7126 ;;
7127 esac
7128
7129 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
7130 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
7131 if test "${lt_cv_prog_compiler_c_o+set}" = set; then
7132 echo $ECHO_N "(cached) $ECHO_C" >&6
7133 else
7134 lt_cv_prog_compiler_c_o=no
7135 $rm -r conftest 2>/dev/null
7136 mkdir conftest
7137 cd conftest
7138 mkdir out
7139 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7140
7141 lt_compiler_flag="-o out/conftest2.$ac_objext"
7142 # Insert the option either (1) after the last *FLAGS variable, or
7143 # (2) before a word containing "conftest.", or (3) at the end.
7144 # Note that $ac_compile itself does not contain backslashes and begins
7145 # with a dollar sign (not a hyphen), so the echo should work correctly.
7146 lt_compile=`echo "$ac_compile" | $SED \
7147 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7148 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7149 -e 's:$: $lt_compiler_flag:'`
7150 (eval echo "\"\$as_me:7151: $lt_compile\"" >&5)
7151 (eval "$lt_compile" 2>out/conftest.err)
7152 ac_status=$?
7153 cat out/conftest.err >&5
7154 echo "$as_me:7155: \$? = $ac_status" >&5
7155 if (exit $ac_status) && test -s out/conftest2.$ac_objext
7156 then
7157 # The compiler can only warn and ignore the option if not recognized
7158 # So say no if there are warnings
7159 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
7160 $SED '/^$/d' out/conftest.err >out/conftest.er2
7161 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
7162 lt_cv_prog_compiler_c_o=yes
7163 fi
7164 fi
7165 chmod u+w . 2>&5
7166 $rm conftest*
7167 # SGI C++ compiler will create directory out/ii_files/ for
7168 # template instantiation
7169 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
7170 $rm out/* && rmdir out
7171 cd ..
7172 rmdir conftest
7173 $rm conftest*
7174
7175 fi
7176 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
7177 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
7178
7179
7180 hard_links="nottested"
7181 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
7182 # do not overwrite the value of need_locks provided by the user
7183 echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
7184 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
7185 hard_links=yes
7186 $rm conftest*
7187 ln conftest.a conftest.b 2>/dev/null && hard_links=no
7188 touch conftest.a
7189 ln conftest.a conftest.b 2>&5 || hard_links=no
7190 ln conftest.a conftest.b 2>/dev/null && hard_links=no
7191 echo "$as_me:$LINENO: result: $hard_links" >&5
7192 echo "${ECHO_T}$hard_links" >&6
7193 if test "$hard_links" = no; then
7194 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
7195 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
7196 need_locks=warn
7197 fi
7198 else
7199 need_locks=no
7200 fi
7201
7202 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
7203 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
7204
7205 runpath_var=
7206 allow_undefined_flag=
7207 enable_shared_with_static_runtimes=no
7208 archive_cmds=
7209 archive_expsym_cmds=
7210 old_archive_From_new_cmds=
7211 old_archive_from_expsyms_cmds=
7212 export_dynamic_flag_spec=
7213 whole_archive_flag_spec=
7214 thread_safe_flag_spec=
7215 hardcode_libdir_flag_spec=
7216 hardcode_libdir_flag_spec_ld=
7217 hardcode_libdir_separator=
7218 hardcode_direct=no
7219 hardcode_minus_L=no
7220 hardcode_shlibpath_var=unsupported
7221 link_all_deplibs=unknown
7222 hardcode_automatic=no
7223 module_cmds=
7224 module_expsym_cmds=
7225 always_export_symbols=no
7226 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7227 # include_expsyms should be a list of space-separated symbols to be *always*
7228 # included in the symbol list
7229 include_expsyms=
7230 # exclude_expsyms can be an extended regexp of symbols to exclude
7231 # it will be wrapped by ` (' and `)$', so one must not match beginning or
7232 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
7233 # as well as any symbol that contains `d'.
7234 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
7235 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
7236 # platforms (ab)use it in PIC code, but their linkers get confused if
7237 # the symbol is explicitly referenced. Since portable code cannot
7238 # rely on this symbol name, it's probably fine to never include it in
7239 # preloaded symbol tables.
7240 extract_expsyms_cmds=
7241 # Just being paranoid about ensuring that cc_basename is set.
7242 for cc_temp in $compiler""; do
7243 case $cc_temp in
7244 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7245 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7246 \-*) ;;
7247 *) break;;
7248 esac
7249 done
7250 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
7251
7252 case $host_os in
7253 cygwin* | mingw* | pw32*)
7254 # FIXME: the MSVC++ port hasn't been tested in a loooong time
7255 # When not using gcc, we currently assume that we are using
7256 # Microsoft Visual C++.
7257 if test "$GCC" != yes; then
7258 with_gnu_ld=no
7259 fi
7260 ;;
7261 openbsd*)
7262 with_gnu_ld=no
7263 ;;
7264 esac
7265
7266 ld_shlibs=yes
7267 if test "$with_gnu_ld" = yes; then
7268 # If archive_cmds runs LD, not CC, wlarc should be empty
7269 wlarc='${wl}'
7270
7271 # Set some defaults for GNU ld with shared library support. These
7272 # are reset later if shared libraries are not supported. Putting them
7273 # here allows them to be overridden if necessary.
7274 runpath_var=LD_RUN_PATH
7275 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
7276 export_dynamic_flag_spec='${wl}--export-dynamic'
7277 # ancient GNU ld didn't support --whole-archive et. al.
7278 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
7279 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7280 else
7281 whole_archive_flag_spec=
7282 fi
7283 supports_anon_versioning=no
7284 case `$LD -v 2>/dev/null` in
7285 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
7286 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
7287 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
7288 *\ 2.11.*) ;; # other 2.11 versions
7289 *) supports_anon_versioning=yes ;;
7290 esac
7291
7292 # See if GNU ld supports shared libraries.
7293 case $host_os in
7294 aix3* | aix4* | aix5*)
7295 # On AIX/PPC, the GNU linker is very broken
7296 if test "$host_cpu" != ia64; then
7297 ld_shlibs=no
7298 cat <<EOF 1>&2
7299
7300 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
7301 *** to be unable to reliably create shared libraries on AIX.
7302 *** Therefore, libtool is disabling shared libraries support. If you
7303 *** really care for shared libraries, you may want to modify your PATH
7304 *** so that a non-GNU linker is found, and then restart.
7305
7306 EOF
7307 fi
7308 ;;
7309
7310 amigaos*)
7311 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)'
7312 hardcode_libdir_flag_spec='-L$libdir'
7313 hardcode_minus_L=yes
7314
7315 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
7316 # that the semantics of dynamic libraries on AmigaOS, at least up
7317 # to version 4, is to share data among multiple programs linked
7318 # with the same dynamic library. Since this doesn't match the
7319 # behavior of shared libraries on other platforms, we can't use
7320 # them.
7321 ld_shlibs=no
7322 ;;
7323
7324 beos*)
7325 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7326 allow_undefined_flag=unsupported
7327 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7328 # support --undefined. This deserves some investigation. FIXME
7329 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7330 else
7331 ld_shlibs=no
7332 fi
7333 ;;
7334
7335 cygwin* | mingw* | pw32*)
7336 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
7337 # as there is no search path for DLLs.
7338 hardcode_libdir_flag_spec='-L$libdir'
7339 allow_undefined_flag=unsupported
7340 always_export_symbols=no
7341 enable_shared_with_static_runtimes=yes
7342 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
7343
7344 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
7345 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
7346 # If the export-symbols file already is a .def file (1st line
7347 # is EXPORTS), use it as is; otherwise, prepend...
7348 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7349 cp $export_symbols $output_objdir/$soname.def;
7350 else
7351 echo EXPORTS > $output_objdir/$soname.def;
7352 cat $export_symbols >> $output_objdir/$soname.def;
7353 fi~
7354 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
7355 else
7356 ld_shlibs=no
7357 fi
7358 ;;
7359
7360 linux*)
7361 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7362 tmp_addflag=
7363 case $cc_basename,$host_cpu in
7364 pgcc*) # Portland Group C compiler
7365 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'
7366 tmp_addflag=' $pic_flag'
7367 ;;
7368 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
7369 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'
7370 tmp_addflag=' $pic_flag -Mnomain' ;;
7371 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
7372 tmp_addflag=' -i_dynamic' ;;
7373 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
7374 tmp_addflag=' -i_dynamic -nofor_main' ;;
7375 ifc* | ifort*) # Intel Fortran compiler
7376 tmp_addflag=' -nofor_main' ;;
7377 esac
7378 archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7379
7380 if test $supports_anon_versioning = yes; then
7381 archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
7382 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7383 $echo "local: *; };" >> $output_objdir/$libname.ver~
7384 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7385 fi
7386 link_all_deplibs=no
7387 else
7388 ld_shlibs=no
7389 fi
7390 ;;
7391
7392 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
7393 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7394 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7395 wlarc=
7396 else
7397 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7398 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7399 fi
7400 ;;
7401
7402 solaris* | sysv5*)
7403 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
7404 ld_shlibs=no
7405 cat <<EOF 1>&2
7406
7407 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
7408 *** create shared libraries on Solaris systems. Therefore, libtool
7409 *** is disabling shared libraries support. We urge you to upgrade GNU
7410 *** binutils to release 2.9.1 or newer. Another option is to modify
7411 *** your PATH or compiler configuration so that the native linker is
7412 *** used, and then restart.
7413
7414 EOF
7415 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7416 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7417 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7418 else
7419 ld_shlibs=no
7420 fi
7421 ;;
7422
7423 sunos4*)
7424 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7425 wlarc=
7426 hardcode_direct=yes
7427 hardcode_shlibpath_var=no
7428 ;;
7429
7430 *)
7431 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7432 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7433 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7434 else
7435 ld_shlibs=no
7436 fi
7437 ;;
7438 esac
7439
7440 if test "$ld_shlibs" = no; then
7441 runpath_var=
7442 hardcode_libdir_flag_spec=
7443 export_dynamic_flag_spec=
7444 whole_archive_flag_spec=
7445 fi
7446 else
7447 # PORTME fill in a description of your system's linker (not GNU ld)
7448 case $host_os in
7449 aix3*)
7450 allow_undefined_flag=unsupported
7451 always_export_symbols=yes
7452 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'
7453 # Note: this linker hardcodes the directories in LIBPATH if there
7454 # are no directories specified by -L.
7455 hardcode_minus_L=yes
7456 if test "$GCC" = yes && test -z "$link_static_flag"; then
7457 # Neither direct hardcoding nor static linking is supported with a
7458 # broken collect2.
7459 hardcode_direct=unsupported
7460 fi
7461 ;;
7462
7463 aix4* | aix5*)
7464 if test "$host_cpu" = ia64; then
7465 # On IA64, the linker does run time linking by default, so we don't
7466 # have to do anything special.
7467 aix_use_runtimelinking=no
7468 exp_sym_flag='-Bexport'
7469 no_entry_flag=""
7470 else
7471 # If we're using GNU nm, then we don't want the "-C" option.
7472 # -C means demangle to AIX nm, but means don't demangle with GNU nm
7473 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7474 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'
7475 else
7476 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'
7477 fi
7478 aix_use_runtimelinking=no
7479
7480 # Test if we are trying to use run time linking or normal
7481 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7482 # need to do runtime linking.
7483 case $host_os in aix4.[23]|aix4.[23].*|aix5*)
7484 for ld_flag in $LDFLAGS; do
7485 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7486 aix_use_runtimelinking=yes
7487 break
7488 fi
7489 done
7490 esac
7491
7492 exp_sym_flag='-bexport'
7493 no_entry_flag='-bnoentry'
7494 fi
7495
7496 # When large executables or shared objects are built, AIX ld can
7497 # have problems creating the table of contents. If linking a library
7498 # or program results in "error TOC overflow" add -mminimal-toc to
7499 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7500 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7501
7502 archive_cmds=''
7503 hardcode_direct=yes
7504 hardcode_libdir_separator=':'
7505 link_all_deplibs=yes
7506
7507 if test "$GCC" = yes; then
7508 case $host_os in aix4.[012]|aix4.[012].*)
7509 # We only want to do this on AIX 4.2 and lower, the check
7510 # below for broken collect2 doesn't work under 4.3+
7511 collect2name=`${CC} -print-prog-name=collect2`
7512 if test -f "$collect2name" && \
7513 strings "$collect2name" | grep resolve_lib_name >/dev/null
7514 then
7515 # We have reworked collect2
7516 hardcode_direct=yes
7517 else
7518 # We have old collect2
7519 hardcode_direct=unsupported
7520 # It fails to find uninstalled libraries when the uninstalled
7521 # path is not listed in the libpath. Setting hardcode_minus_L
7522 # to unsupported forces relinking
7523 hardcode_minus_L=yes
7524 hardcode_libdir_flag_spec='-L$libdir'
7525 hardcode_libdir_separator=
7526 fi
7527 esac
7528 shared_flag='-shared'
7529 if test "$aix_use_runtimelinking" = yes; then
7530 shared_flag="$shared_flag "'${wl}-G'
7531 fi
7532 else
7533 # not using gcc
7534 if test "$host_cpu" = ia64; then
7535 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7536 # chokes on -Wl,-G. The following line is correct:
7537 shared_flag='-G'
7538 else
7539 if test "$aix_use_runtimelinking" = yes; then
7540 shared_flag='${wl}-G'
7541 else
7542 shared_flag='${wl}-bM:SRE'
7543 fi
7544 fi
7545 fi
7546
7547 # It seems that -bexpall does not export symbols beginning with
7548 # underscore (_), so it is better to generate a list of symbols to export.
7549 always_export_symbols=yes
7550 if test "$aix_use_runtimelinking" = yes; then
7551 # Warning - without using the other runtime loading flags (-brtl),
7552 # -berok will link without error, but may produce a broken library.
7553 allow_undefined_flag='-berok'
7554 # Determine the default libpath from the value encoded in an empty executable.
7555 cat >conftest.$ac_ext <<_ACEOF
7556 /* confdefs.h. */
7557 _ACEOF
7558 cat confdefs.h >>conftest.$ac_ext
7559 cat >>conftest.$ac_ext <<_ACEOF
7560 /* end confdefs.h. */
7561
7562 int
7563 main ()
7564 {
7565
7566 ;
7567 return 0;
7568 }
7569 _ACEOF
7570 rm -f conftest.$ac_objext conftest$ac_exeext
7571 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7572 (eval $ac_link) 2>conftest.er1
7573 ac_status=$?
7574 grep -v '^ *+' conftest.er1 >conftest.err
7575 rm -f conftest.er1
7576 cat conftest.err >&5
7577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7578 (exit $ac_status); } &&
7579 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7581 (eval $ac_try) 2>&5
7582 ac_status=$?
7583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7584 (exit $ac_status); }; } &&
7585 { ac_try='test -s conftest$ac_exeext'
7586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7587 (eval $ac_try) 2>&5
7588 ac_status=$?
7589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7590 (exit $ac_status); }; }; then
7591
7592 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
7593 }'`
7594 # Check for a 64-bit object if we didn't find anything.
7595 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; }
7596 }'`; fi
7597 else
7598 echo "$as_me: failed program was:" >&5
7599 sed 's/^/| /' conftest.$ac_ext >&5
7600
7601 fi
7602 rm -f conftest.err conftest.$ac_objext \
7603 conftest$ac_exeext conftest.$ac_ext
7604 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
7605
7606 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
7607 archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7608 else
7609 if test "$host_cpu" = ia64; then
7610 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
7611 allow_undefined_flag="-z nodefs"
7612 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
7613 else
7614 # Determine the default libpath from the value encoded in an empty executable.
7615 cat >conftest.$ac_ext <<_ACEOF
7616 /* confdefs.h. */
7617 _ACEOF
7618 cat confdefs.h >>conftest.$ac_ext
7619 cat >>conftest.$ac_ext <<_ACEOF
7620 /* end confdefs.h. */
7621
7622 int
7623 main ()
7624 {
7625
7626 ;
7627 return 0;
7628 }
7629 _ACEOF
7630 rm -f conftest.$ac_objext conftest$ac_exeext
7631 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7632 (eval $ac_link) 2>conftest.er1
7633 ac_status=$?
7634 grep -v '^ *+' conftest.er1 >conftest.err
7635 rm -f conftest.er1
7636 cat conftest.err >&5
7637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7638 (exit $ac_status); } &&
7639 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7641 (eval $ac_try) 2>&5
7642 ac_status=$?
7643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7644 (exit $ac_status); }; } &&
7645 { ac_try='test -s conftest$ac_exeext'
7646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7647 (eval $ac_try) 2>&5
7648 ac_status=$?
7649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7650 (exit $ac_status); }; }; then
7651
7652 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
7653 }'`
7654 # Check for a 64-bit object if we didn't find anything.
7655 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; }
7656 }'`; fi
7657 else
7658 echo "$as_me: failed program was:" >&5
7659 sed 's/^/| /' conftest.$ac_ext >&5
7660
7661 fi
7662 rm -f conftest.err conftest.$ac_objext \
7663 conftest$ac_exeext conftest.$ac_ext
7664 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
7665
7666 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
7667 # Warning - without using the other run time loading flags,
7668 # -berok will link without error, but may produce a broken library.
7669 no_undefined_flag=' ${wl}-bernotok'
7670 allow_undefined_flag=' ${wl}-berok'
7671 # -bexpall does not export symbols beginning with underscore (_)
7672 always_export_symbols=yes
7673 # Exported symbols can be pulled into shared objects from archives
7674 whole_archive_flag_spec=' '
7675 archive_cmds_need_lc=yes
7676 # This is similar to how AIX traditionally builds its shared libraries.
7677 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7678 fi
7679 fi
7680 ;;
7681
7682 amigaos*)
7683 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)'
7684 hardcode_libdir_flag_spec='-L$libdir'
7685 hardcode_minus_L=yes
7686 # see comment about different semantics on the GNU ld section
7687 ld_shlibs=no
7688 ;;
7689
7690 bsdi[45]*)
7691 export_dynamic_flag_spec=-rdynamic
7692 ;;
7693
7694 cygwin* | mingw* | pw32*)
7695 # When not using gcc, we currently assume that we are using
7696 # Microsoft Visual C++.
7697 # hardcode_libdir_flag_spec is actually meaningless, as there is
7698 # no search path for DLLs.
7699 hardcode_libdir_flag_spec=' '
7700 allow_undefined_flag=unsupported
7701 # Tell ltmain to make .lib files, not .a files.
7702 libext=lib
7703 # Tell ltmain to make .dll files, not .so files.
7704 shrext_cmds=".dll"
7705 # FIXME: Setting linknames here is a bad hack.
7706 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
7707 # The linker will automatically build a .lib file if we build a DLL.
7708 old_archive_From_new_cmds='true'
7709 # FIXME: Should let the user specify the lib program.
7710 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
7711 fix_srcfile_path='`cygpath -w "$srcfile"`'
7712 enable_shared_with_static_runtimes=yes
7713 ;;
7714
7715 darwin* | rhapsody*)
7716 case $host_os in
7717 rhapsody* | darwin1.[012])
7718 allow_undefined_flag='${wl}-undefined ${wl}suppress'
7719 ;;
7720 *) # Darwin 1.3 on
7721 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
7722 allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7723 else
7724 case ${MACOSX_DEPLOYMENT_TARGET} in
7725 10.[012])
7726 allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7727 ;;
7728 10.*)
7729 allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
7730 ;;
7731 esac
7732 fi
7733 ;;
7734 esac
7735 archive_cmds_need_lc=no
7736 hardcode_direct=no
7737 hardcode_automatic=yes
7738 hardcode_shlibpath_var=unsupported
7739 whole_archive_flag_spec=''
7740 link_all_deplibs=yes
7741 if test "$GCC" = yes ; then
7742 output_verbose_link_cmd='echo'
7743 archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
7744 module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7745 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7746 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}'
7747 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}'
7748 else
7749 case $cc_basename in
7750 xlc*)
7751 output_verbose_link_cmd='echo'
7752 archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
7753 module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7754 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7755 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}'
7756 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}'
7757 ;;
7758 *)
7759 ld_shlibs=no
7760 ;;
7761 esac
7762 fi
7763 ;;
7764
7765 dgux*)
7766 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7767 hardcode_libdir_flag_spec='-L$libdir'
7768 hardcode_shlibpath_var=no
7769 ;;
7770
7771 freebsd1*)
7772 ld_shlibs=no
7773 ;;
7774
7775 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7776 # support. Future versions do this automatically, but an explicit c++rt0.o
7777 # does not break anything, and helps significantly (at the cost of a little
7778 # extra space).
7779 freebsd2.2*)
7780 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7781 hardcode_libdir_flag_spec='-R$libdir'
7782 hardcode_direct=yes
7783 hardcode_shlibpath_var=no
7784 ;;
7785
7786 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7787 freebsd2*)
7788 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7789 hardcode_direct=yes
7790 hardcode_minus_L=yes
7791 hardcode_shlibpath_var=no
7792 ;;
7793
7794 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7795 freebsd* | kfreebsd*-gnu | dragonfly*)
7796 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7797 hardcode_libdir_flag_spec='-R$libdir'
7798 hardcode_direct=yes
7799 hardcode_shlibpath_var=no
7800 ;;
7801
7802 hpux9*)
7803 if test "$GCC" = yes; then
7804 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'
7805 else
7806 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'
7807 fi
7808 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
7809 hardcode_libdir_separator=:
7810 hardcode_direct=yes
7811
7812 # hardcode_minus_L: Not really in the search PATH,
7813 # but as the default location of the library.
7814 hardcode_minus_L=yes
7815 export_dynamic_flag_spec='${wl}-E'
7816 ;;
7817
7818 hpux10* | hpux11*)
7819 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7820 case $host_cpu in
7821 hppa*64*|ia64*)
7822 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7823 ;;
7824 *)
7825 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7826 ;;
7827 esac
7828 else
7829 case $host_cpu in
7830 hppa*64*|ia64*)
7831 archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
7832 ;;
7833 *)
7834 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7835 ;;
7836 esac
7837 fi
7838 if test "$with_gnu_ld" = no; then
7839 case $host_cpu in
7840 hppa*64*)
7841 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
7842 hardcode_libdir_flag_spec_ld='+b $libdir'
7843 hardcode_libdir_separator=:
7844 hardcode_direct=no
7845 hardcode_shlibpath_var=no
7846 ;;
7847 ia64*)
7848 hardcode_libdir_flag_spec='-L$libdir'
7849 hardcode_direct=no
7850 hardcode_shlibpath_var=no
7851
7852 # hardcode_minus_L: Not really in the search PATH,
7853 # but as the default location of the library.
7854 hardcode_minus_L=yes
7855 ;;
7856 *)
7857 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
7858 hardcode_libdir_separator=:
7859 hardcode_direct=yes
7860 export_dynamic_flag_spec='${wl}-E'
7861
7862 # hardcode_minus_L: Not really in the search PATH,
7863 # but as the default location of the library.
7864 hardcode_minus_L=yes
7865 ;;
7866 esac
7867 fi
7868 ;;
7869
7870 irix5* | irix6* | nonstopux*)
7871 if test "$GCC" = yes; then
7872 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'
7873 else
7874 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'
7875 hardcode_libdir_flag_spec_ld='-rpath $libdir'
7876 fi
7877 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
7878 hardcode_libdir_separator=:
7879 link_all_deplibs=yes
7880 ;;
7881
7882 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
7883 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7884 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
7885 else
7886 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
7887 fi
7888 hardcode_libdir_flag_spec='-R$libdir'
7889 hardcode_direct=yes
7890 hardcode_shlibpath_var=no
7891 ;;
7892
7893 newsos6)
7894 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7895 hardcode_direct=yes
7896 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
7897 hardcode_libdir_separator=:
7898 hardcode_shlibpath_var=no
7899 ;;
7900
7901 openbsd*)
7902 hardcode_direct=yes
7903 hardcode_shlibpath_var=no
7904 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7905 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7906 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7907 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
7908 export_dynamic_flag_spec='${wl}-E'
7909 else
7910 case $host_os in
7911 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
7912 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7913 hardcode_libdir_flag_spec='-R$libdir'
7914 ;;
7915 *)
7916 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7917 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
7918 ;;
7919 esac
7920 fi
7921 ;;
7922
7923 os2*)
7924 hardcode_libdir_flag_spec='-L$libdir'
7925 hardcode_minus_L=yes
7926 allow_undefined_flag=unsupported
7927 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'
7928 old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7929 ;;
7930
7931 osf3*)
7932 if test "$GCC" = yes; then
7933 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
7934 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'
7935 else
7936 allow_undefined_flag=' -expect_unresolved \*'
7937 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'
7938 fi
7939 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
7940 hardcode_libdir_separator=:
7941 ;;
7942
7943 osf4* | osf5*) # as osf3* with the addition of -msym flag
7944 if test "$GCC" = yes; then
7945 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
7946 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'
7947 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
7948 else
7949 allow_undefined_flag=' -expect_unresolved \*'
7950 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'
7951 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
7952 $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'
7953
7954 # Both c and cxx compiler support -rpath directly
7955 hardcode_libdir_flag_spec='-rpath $libdir'
7956 fi
7957 hardcode_libdir_separator=:
7958 ;;
7959
7960 sco3.2v5*)
7961 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7962 hardcode_shlibpath_var=no
7963 export_dynamic_flag_spec='${wl}-Bexport'
7964 runpath_var=LD_RUN_PATH
7965 hardcode_runpath_var=yes
7966 ;;
7967
7968 solaris*)
7969 no_undefined_flag=' -z text'
7970 if test "$GCC" = yes; then
7971 wlarc='${wl}'
7972 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7973 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7974 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
7975 else
7976 wlarc=''
7977 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7978 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7979 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7980 fi
7981 hardcode_libdir_flag_spec='-R$libdir'
7982 hardcode_shlibpath_var=no
7983 case $host_os in
7984 solaris2.[0-5] | solaris2.[0-5].*) ;;
7985 *)
7986 # The compiler driver will combine linker options so we
7987 # cannot just pass the convience library names through
7988 # without $wl, iff we do not link with $LD.
7989 # Luckily, gcc supports the same syntax we need for Sun Studio.
7990 # Supported since Solaris 2.6 (maybe 2.5.1?)
7991 case $wlarc in
7992 '')
7993 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
7994 *)
7995 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' ;;
7996 esac ;;
7997 esac
7998 link_all_deplibs=yes
7999 ;;
8000
8001 sunos4*)
8002 if test "x$host_vendor" = xsequent; then
8003 # Use $CC to link under sequent, because it throws in some extra .o
8004 # files that make .init and .fini sections work.
8005 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8006 else
8007 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8008 fi
8009 hardcode_libdir_flag_spec='-L$libdir'
8010 hardcode_direct=yes
8011 hardcode_minus_L=yes
8012 hardcode_shlibpath_var=no
8013 ;;
8014
8015 sysv4)
8016 case $host_vendor in
8017 sni)
8018 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8019 hardcode_direct=yes # is this really true???
8020 ;;
8021 siemens)
8022 ## LD is ld it makes a PLAMLIB
8023 ## CC just makes a GrossModule.
8024 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8025 reload_cmds='$CC -r -o $output$reload_objs'
8026 hardcode_direct=no
8027 ;;
8028 motorola)
8029 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8030 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
8031 ;;
8032 esac
8033 runpath_var='LD_RUN_PATH'
8034 hardcode_shlibpath_var=no
8035 ;;
8036
8037 sysv4.3*)
8038 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8039 hardcode_shlibpath_var=no
8040 export_dynamic_flag_spec='-Bexport'
8041 ;;
8042
8043 sysv4*MP*)
8044 if test -d /usr/nec; then
8045 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8046 hardcode_shlibpath_var=no
8047 runpath_var=LD_RUN_PATH
8048 hardcode_runpath_var=yes
8049 ld_shlibs=yes
8050 fi
8051 ;;
8052
8053 sysv4.2uw2*)
8054 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8055 hardcode_direct=yes
8056 hardcode_minus_L=no
8057 hardcode_shlibpath_var=no
8058 hardcode_runpath_var=yes
8059 runpath_var=LD_RUN_PATH
8060 ;;
8061
8062 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
8063 no_undefined_flag='${wl}-z ${wl}text'
8064 if test "$GCC" = yes; then
8065 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8066 else
8067 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8068 fi
8069 runpath_var='LD_RUN_PATH'
8070 hardcode_shlibpath_var=no
8071 ;;
8072
8073 sysv5*)
8074 no_undefined_flag=' -z text'
8075 # $CC -shared without GNU ld will not create a library from C++
8076 # object files and a static libstdc++, better avoid it by now
8077 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8078 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8079 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8080 hardcode_libdir_flag_spec=
8081 hardcode_shlibpath_var=no
8082 runpath_var='LD_RUN_PATH'
8083 ;;
8084
8085 uts4*)
8086 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8087 hardcode_libdir_flag_spec='-L$libdir'
8088 hardcode_shlibpath_var=no
8089 ;;
8090
8091 *)
8092 ld_shlibs=no
8093 ;;
8094 esac
8095 fi
8096
8097 echo "$as_me:$LINENO: result: $ld_shlibs" >&5
8098 echo "${ECHO_T}$ld_shlibs" >&6
8099 test "$ld_shlibs" = no && can_build_shared=no
8100
8101 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
8102 if test "$GCC" = yes; then
8103 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
8104 fi
8105
8106 #
8107 # Do we need to explicitly link libc?
8108 #
8109 case "x$archive_cmds_need_lc" in
8110 x|xyes)
8111 # Assume -lc should be added
8112 archive_cmds_need_lc=yes
8113
8114 if test "$enable_shared" = yes && test "$GCC" = yes; then
8115 case $archive_cmds in
8116 *'~'*)
8117 # FIXME: we may have to deal with multi-command sequences.
8118 ;;
8119 '$CC '*)
8120 # Test whether the compiler implicitly links with -lc since on some
8121 # systems, -lgcc has to come before -lc. If gcc already passes -lc
8122 # to ld, don't add -lc before -lgcc.
8123 echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
8124 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
8125 $rm conftest*
8126 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8127
8128 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8129 (eval $ac_compile) 2>&5
8130 ac_status=$?
8131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8132 (exit $ac_status); } 2>conftest.err; then
8133 soname=conftest
8134 lib=conftest
8135 libobjs=conftest.$ac_objext
8136 deplibs=
8137 wl=$lt_prog_compiler_wl
8138 compiler_flags=-v
8139 linker_flags=-v
8140 verstring=
8141 output_objdir=.
8142 libname=conftest
8143 lt_save_allow_undefined_flag=$allow_undefined_flag
8144 allow_undefined_flag=
8145 if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
8146 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
8147 ac_status=$?
8148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8149 (exit $ac_status); }
8150 then
8151 archive_cmds_need_lc=no
8152 else
8153 archive_cmds_need_lc=yes
8154 fi
8155 allow_undefined_flag=$lt_save_allow_undefined_flag
8156 else
8157 cat conftest.err 1>&5
8158 fi
8159 $rm conftest*
8160 echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
8161 echo "${ECHO_T}$archive_cmds_need_lc" >&6
8162 ;;
8163 esac
8164 fi
8165 ;;
8166 esac
8167
8168 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
8169 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
8170 library_names_spec=
8171 libname_spec='lib$name'
8172 soname_spec=
8173 shrext_cmds=".so"
8174 postinstall_cmds=
8175 postuninstall_cmds=
8176 finish_cmds=
8177 finish_eval=
8178 shlibpath_var=
8179 shlibpath_overrides_runpath=unknown
8180 version_type=none
8181 dynamic_linker="$host_os ld.so"
8182 sys_lib_dlsearch_path_spec="/lib /usr/lib"
8183 if test "$GCC" = yes; then
8184 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
8185 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
8186 # if the path contains ";" then we assume it to be the separator
8187 # otherwise default to the standard path separator (i.e. ":") - it is
8188 # assumed that no part of a normal pathname contains ";" but that should
8189 # okay in the real world where ";" in dirpaths is itself problematic.
8190 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
8191 else
8192 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
8193 fi
8194 else
8195 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
8196 fi
8197 need_lib_prefix=unknown
8198 hardcode_into_libs=no
8199
8200 # when you set need_version to no, make sure it does not cause -set_version
8201 # flags to be left without arguments
8202 need_version=unknown
8203
8204 case $host_os in
8205 aix3*)
8206 version_type=linux
8207 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
8208 shlibpath_var=LIBPATH
8209
8210 # AIX 3 has no versioning support, so we append a major version to the name.
8211 soname_spec='${libname}${release}${shared_ext}$major'
8212 ;;
8213
8214 aix4* | aix5*)
8215 version_type=linux
8216 need_lib_prefix=no
8217 need_version=no
8218 hardcode_into_libs=yes
8219 if test "$host_cpu" = ia64; then
8220 # AIX 5 supports IA64
8221 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
8222 shlibpath_var=LD_LIBRARY_PATH
8223 else
8224 # With GCC up to 2.95.x, collect2 would create an import file
8225 # for dependence libraries. The import file would start with
8226 # the line `#! .'. This would cause the generated library to
8227 # depend on `.', always an invalid library. This was fixed in
8228 # development snapshots of GCC prior to 3.0.
8229 case $host_os in
8230 aix4 | aix4.[01] | aix4.[01].*)
8231 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
8232 echo ' yes '
8233 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
8234 :
8235 else
8236 can_build_shared=no
8237 fi
8238 ;;
8239 esac
8240 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
8241 # soname into executable. Probably we can add versioning support to
8242 # collect2, so additional links can be useful in future.
8243 if test "$aix_use_runtimelinking" = yes; then
8244 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
8245 # instead of lib<name>.a to let people know that these are not
8246 # typical AIX shared libraries.
8247 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8248 else
8249 # We preserve .a as extension for shared libraries through AIX4.2
8250 # and later when we are not doing run time linking.
8251 library_names_spec='${libname}${release}.a $libname.a'
8252 soname_spec='${libname}${release}${shared_ext}$major'
8253 fi
8254 shlibpath_var=LIBPATH
8255 fi
8256 ;;
8257
8258 amigaos*)
8259 library_names_spec='$libname.ixlibrary $libname.a'
8260 # Create ${libname}_ixlibrary.a entries in /sys/libs.
8261 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'
8262 ;;
8263
8264 beos*)
8265 library_names_spec='${libname}${shared_ext}'
8266 dynamic_linker="$host_os ld.so"
8267 shlibpath_var=LIBRARY_PATH
8268 ;;
8269
8270 bsdi[45]*)
8271 version_type=linux
8272 need_version=no
8273 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8274 soname_spec='${libname}${release}${shared_ext}$major'
8275 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
8276 shlibpath_var=LD_LIBRARY_PATH
8277 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
8278 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
8279 # the default ld.so.conf also contains /usr/contrib/lib and
8280 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
8281 # libtool to hard-code these into programs
8282 ;;
8283
8284 cygwin* | mingw* | pw32*)
8285 version_type=windows
8286 shrext_cmds=".dll"
8287 need_version=no
8288 need_lib_prefix=no
8289
8290 case $GCC,$host_os in
8291 yes,cygwin* | yes,mingw* | yes,pw32*)
8292 library_names_spec='$libname.dll.a'
8293 # DLL is installed to $(libdir)/../bin by postinstall_cmds
8294 postinstall_cmds='base_file=`basename \${file}`~
8295 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
8296 dldir=$destdir/`dirname \$dlpath`~
8297 test -d \$dldir || mkdir -p \$dldir~
8298 $install_prog $dir/$dlname \$dldir/$dlname~
8299 chmod a+x \$dldir/$dlname'
8300 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
8301 dlpath=$dir/\$dldll~
8302 $rm \$dlpath'
8303 shlibpath_overrides_runpath=yes
8304
8305 case $host_os in
8306 cygwin*)
8307 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
8308 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
8309 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
8310 ;;
8311 mingw*)
8312 # MinGW DLLs use traditional 'lib' prefix
8313 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
8314 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
8315 if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
8316 # It is most probably a Windows format PATH printed by
8317 # mingw gcc, but we are running on Cygwin. Gcc prints its search
8318 # path with ; separators, and with drive letters. We can handle the
8319 # drive letters (cygwin fileutils understands them), so leave them,
8320 # especially as we might pass files found there to a mingw objdump,
8321 # which wouldn't understand a cygwinified path. Ahh.
8322 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
8323 else
8324 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
8325 fi
8326 ;;
8327 pw32*)
8328 # pw32 DLLs use 'pw' prefix rather than 'lib'
8329 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
8330 ;;
8331 esac
8332 ;;
8333
8334 *)
8335 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
8336 ;;
8337 esac
8338 dynamic_linker='Win32 ld.exe'
8339 # FIXME: first we should search . and the directory the executable is in
8340 shlibpath_var=PATH
8341 ;;
8342
8343 darwin* | rhapsody*)
8344 dynamic_linker="$host_os dyld"
8345 version_type=darwin
8346 need_lib_prefix=no
8347 need_version=no
8348 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
8349 soname_spec='${libname}${release}${major}$shared_ext'
8350 shlibpath_overrides_runpath=yes
8351 shlibpath_var=DYLD_LIBRARY_PATH
8352 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
8353 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
8354 if test "$GCC" = yes; then
8355 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"`
8356 else
8357 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
8358 fi
8359 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
8360 ;;
8361
8362 dgux*)
8363 version_type=linux
8364 need_lib_prefix=no
8365 need_version=no
8366 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
8367 soname_spec='${libname}${release}${shared_ext}$major'
8368 shlibpath_var=LD_LIBRARY_PATH
8369 ;;
8370
8371 freebsd1*)
8372 dynamic_linker=no
8373 ;;
8374
8375 kfreebsd*-gnu)
8376 version_type=linux
8377 need_lib_prefix=no
8378 need_version=no
8379 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
8380 soname_spec='${libname}${release}${shared_ext}$major'
8381 shlibpath_var=LD_LIBRARY_PATH
8382 shlibpath_overrides_runpath=no
8383 hardcode_into_libs=yes
8384 dynamic_linker='GNU ld.so'
8385 ;;
8386
8387 freebsd* | dragonfly*)
8388 # DragonFly does not have aout. When/if they implement a new
8389 # versioning mechanism, adjust this.
8390 if test -x /usr/bin/objformat; then
8391 objformat=`/usr/bin/objformat`
8392 else
8393 case $host_os in
8394 freebsd[123]*) objformat=aout ;;
8395 *) objformat=elf ;;
8396 esac
8397 fi
8398 version_type=freebsd-$objformat
8399 case $version_type in
8400 freebsd-elf*)
8401 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
8402 need_version=no
8403 need_lib_prefix=no
8404 ;;
8405 freebsd-*)
8406 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
8407 need_version=yes
8408 ;;
8409 esac
8410 shlibpath_var=LD_LIBRARY_PATH
8411 case $host_os in
8412 freebsd2*)
8413 shlibpath_overrides_runpath=yes
8414 ;;
8415 freebsd3.[01]* | freebsdelf3.[01]*)
8416 shlibpath_overrides_runpath=yes
8417 hardcode_into_libs=yes
8418 ;;
8419 *) # from 3.2 on
8420 shlibpath_overrides_runpath=no
8421 hardcode_into_libs=yes
8422 ;;
8423 esac
8424 ;;
8425
8426 gnu*)
8427 version_type=linux
8428 need_lib_prefix=no
8429 need_version=no
8430 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
8431 soname_spec='${libname}${release}${shared_ext}$major'
8432 shlibpath_var=LD_LIBRARY_PATH
8433 hardcode_into_libs=yes
8434 ;;
8435
8436 hpux9* | hpux10* | hpux11*)
8437 # Give a soname corresponding to the major version so that dld.sl refuses to
8438 # link against other versions.
8439 version_type=sunos
8440 need_lib_prefix=no
8441 need_version=no
8442 case $host_cpu in
8443 ia64*)
8444 shrext_cmds='.so'
8445 hardcode_into_libs=yes
8446 dynamic_linker="$host_os dld.so"
8447 shlibpath_var=LD_LIBRARY_PATH
8448 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
8449 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8450 soname_spec='${libname}${release}${shared_ext}$major'
8451 if test "X$HPUX_IA64_MODE" = X32; then
8452 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
8453 else
8454 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
8455 fi
8456 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
8457 ;;
8458 hppa*64*)
8459 shrext_cmds='.sl'
8460 hardcode_into_libs=yes
8461 dynamic_linker="$host_os dld.sl"
8462 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
8463 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
8464 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8465 soname_spec='${libname}${release}${shared_ext}$major'
8466 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
8467 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
8468 ;;
8469 *)
8470 shrext_cmds='.sl'
8471 dynamic_linker="$host_os dld.sl"
8472 shlibpath_var=SHLIB_PATH
8473 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
8474 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8475 soname_spec='${libname}${release}${shared_ext}$major'
8476 ;;
8477 esac
8478 # HP-UX runs *really* slowly unless shared libraries are mode 555.
8479 postinstall_cmds='chmod 555 $lib'
8480 ;;
8481
8482 irix5* | irix6* | nonstopux*)
8483 case $host_os in
8484 nonstopux*) version_type=nonstopux ;;
8485 *)
8486 if test "$lt_cv_prog_gnu_ld" = yes; then
8487 version_type=linux
8488 else
8489 version_type=irix
8490 fi ;;
8491 esac
8492 need_lib_prefix=no
8493 need_version=no
8494 soname_spec='${libname}${release}${shared_ext}$major'
8495 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
8496 case $host_os in
8497 irix5* | nonstopux*)
8498 libsuff= shlibsuff=
8499 ;;
8500 *)
8501 case $LD in # libtool.m4 will add one of these switches to LD
8502 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
8503 libsuff= shlibsuff= libmagic=32-bit;;
8504 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
8505 libsuff=32 shlibsuff=N32 libmagic=N32;;
8506 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
8507 libsuff=64 shlibsuff=64 libmagic=64-bit;;
8508 *) libsuff= shlibsuff= libmagic=never-match;;
8509 esac
8510 ;;
8511 esac
8512 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
8513 shlibpath_overrides_runpath=no
8514 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
8515 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
8516 hardcode_into_libs=yes
8517 ;;
8518
8519 # No shared lib support for Linux oldld, aout, or coff.
8520 linux*oldld* | linux*aout* | linux*coff*)
8521 dynamic_linker=no
8522 ;;
8523
8524 # This must be Linux ELF.
8525 linux*)
8526 version_type=linux
8527 need_lib_prefix=no
8528 need_version=no
8529 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8530 soname_spec='${libname}${release}${shared_ext}$major'
8531 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
8532 shlibpath_var=LD_LIBRARY_PATH
8533 shlibpath_overrides_runpath=no
8534 # This implies no fast_install, which is unacceptable.
8535 # Some rework will be needed to allow for fast_install
8536 # before this can be enabled.
8537 hardcode_into_libs=yes
8538
8539 # Append ld.so.conf contents to the search path
8540 if test -f /etc/ld.so.conf; then
8541 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' ' '`
8542 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
8543 fi
8544
8545 # We used to test for /lib/ld.so.1 and disable shared libraries on
8546 # powerpc, because MkLinux only supported shared libraries with the
8547 # GNU dynamic linker. Since this was broken with cross compilers,
8548 # most powerpc-linux boxes support dynamic linking these days and
8549 # people can always --disable-shared, the test was removed, and we
8550 # assume the GNU/Linux dynamic linker is in use.
8551 dynamic_linker='GNU/Linux ld.so'
8552 ;;
8553
8554 netbsdelf*-gnu)
8555 version_type=linux
8556 need_lib_prefix=no
8557 need_version=no
8558 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
8559 soname_spec='${libname}${release}${shared_ext}$major'
8560 shlibpath_var=LD_LIBRARY_PATH
8561 shlibpath_overrides_runpath=no
8562 hardcode_into_libs=yes
8563 dynamic_linker='NetBSD ld.elf_so'
8564 ;;
8565
8566 knetbsd*-gnu)
8567 version_type=linux
8568 need_lib_prefix=no
8569 need_version=no
8570 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
8571 soname_spec='${libname}${release}${shared_ext}$major'
8572 shlibpath_var=LD_LIBRARY_PATH
8573 shlibpath_overrides_runpath=no
8574 hardcode_into_libs=yes
8575 dynamic_linker='GNU ld.so'
8576 ;;
8577
8578 netbsd*)
8579 version_type=sunos
8580 need_lib_prefix=no
8581 need_version=no
8582 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8583 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
8584 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
8585 dynamic_linker='NetBSD (a.out) ld.so'
8586 else
8587 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
8588 soname_spec='${libname}${release}${shared_ext}$major'
8589 dynamic_linker='NetBSD ld.elf_so'
8590 fi
8591 shlibpath_var=LD_LIBRARY_PATH
8592 shlibpath_overrides_runpath=yes
8593 hardcode_into_libs=yes
8594 ;;
8595
8596 newsos6)
8597 version_type=linux
8598 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8599 shlibpath_var=LD_LIBRARY_PATH
8600 shlibpath_overrides_runpath=yes
8601 ;;
8602
8603 nto-qnx*)
8604 version_type=linux
8605 need_lib_prefix=no
8606 need_version=no
8607 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8608 soname_spec='${libname}${release}${shared_ext}$major'
8609 shlibpath_var=LD_LIBRARY_PATH
8610 shlibpath_overrides_runpath=yes
8611 ;;
8612
8613 openbsd*)
8614 version_type=sunos
8615 need_lib_prefix=no
8616 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
8617 case $host_os in
8618 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
8619 *) need_version=no ;;
8620 esac
8621 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
8622 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
8623 shlibpath_var=LD_LIBRARY_PATH
8624 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8625 case $host_os in
8626 openbsd2.[89] | openbsd2.[89].*)
8627 shlibpath_overrides_runpath=no
8628 ;;
8629 *)
8630 shlibpath_overrides_runpath=yes
8631 ;;
8632 esac
8633 else
8634 shlibpath_overrides_runpath=yes
8635 fi
8636 ;;
8637
8638 os2*)
8639 libname_spec='$name'
8640 shrext_cmds=".dll"
8641 need_lib_prefix=no
8642 library_names_spec='$libname${shared_ext} $libname.a'
8643 dynamic_linker='OS/2 ld.exe'
8644 shlibpath_var=LIBPATH
8645 ;;
8646
8647 osf3* | osf4* | osf5*)
8648 version_type=osf
8649 need_lib_prefix=no
8650 need_version=no
8651 soname_spec='${libname}${release}${shared_ext}$major'
8652 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8653 shlibpath_var=LD_LIBRARY_PATH
8654 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
8655 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
8656 ;;
8657
8658 sco3.2v5*)
8659 version_type=osf
8660 soname_spec='${libname}${release}${shared_ext}$major'
8661 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8662 shlibpath_var=LD_LIBRARY_PATH
8663 ;;
8664
8665 solaris*)
8666 version_type=linux
8667 need_lib_prefix=no
8668 need_version=no
8669 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8670 soname_spec='${libname}${release}${shared_ext}$major'
8671 shlibpath_var=LD_LIBRARY_PATH
8672 shlibpath_overrides_runpath=yes
8673 hardcode_into_libs=yes
8674 # ldd complains unless libraries are executable
8675 postinstall_cmds='chmod +x $lib'
8676 ;;
8677
8678 sunos4*)
8679 version_type=sunos
8680 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
8681 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
8682 shlibpath_var=LD_LIBRARY_PATH
8683 shlibpath_overrides_runpath=yes
8684 if test "$with_gnu_ld" = yes; then
8685 need_lib_prefix=no
8686 fi
8687 need_version=yes
8688 ;;
8689
8690 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
8691 version_type=linux
8692 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8693 soname_spec='${libname}${release}${shared_ext}$major'
8694 shlibpath_var=LD_LIBRARY_PATH
8695 case $host_vendor in
8696 sni)
8697 shlibpath_overrides_runpath=no
8698 need_lib_prefix=no
8699 export_dynamic_flag_spec='${wl}-Blargedynsym'
8700 runpath_var=LD_RUN_PATH
8701 ;;
8702 siemens)
8703 need_lib_prefix=no
8704 ;;
8705 motorola)
8706 need_lib_prefix=no
8707 need_version=no
8708 shlibpath_overrides_runpath=no
8709 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
8710 ;;
8711 esac
8712 ;;
8713
8714 sysv4*MP*)
8715 if test -d /usr/nec ;then
8716 version_type=linux
8717 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
8718 soname_spec='$libname${shared_ext}.$major'
8719 shlibpath_var=LD_LIBRARY_PATH
8720 fi
8721 ;;
8722
8723 uts4*)
8724 version_type=linux
8725 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8726 soname_spec='${libname}${release}${shared_ext}$major'
8727 shlibpath_var=LD_LIBRARY_PATH
8728 ;;
8729
8730 *)
8731 dynamic_linker=no
8732 ;;
8733 esac
8734 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
8735 echo "${ECHO_T}$dynamic_linker" >&6
8736 test "$dynamic_linker" = no && can_build_shared=no
8737
8738 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
8739 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
8740 hardcode_action=
8741 if test -n "$hardcode_libdir_flag_spec" || \
8742 test -n "$runpath_var" || \
8743 test "X$hardcode_automatic" = "Xyes" ; then
8744
8745 # We can hardcode non-existant directories.
8746 if test "$hardcode_direct" != no &&
8747 # If the only mechanism to avoid hardcoding is shlibpath_var, we
8748 # have to relink, otherwise we might link with an installed library
8749 # when we should be linking with a yet-to-be-installed one
8750 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
8751 test "$hardcode_minus_L" != no; then
8752 # Linking always hardcodes the temporary library directory.
8753 hardcode_action=relink
8754 else
8755 # We can link without hardcoding, and we can hardcode nonexisting dirs.
8756 hardcode_action=immediate
8757 fi
8758 else
8759 # We cannot hardcode anything, or else we can only hardcode existing
8760 # directories.
8761 hardcode_action=unsupported
8762 fi
8763 echo "$as_me:$LINENO: result: $hardcode_action" >&5
8764 echo "${ECHO_T}$hardcode_action" >&6
8765
8766 if test "$hardcode_action" = relink; then
8767 # Fast installation is not supported
8768 enable_fast_install=no
8769 elif test "$shlibpath_overrides_runpath" = yes ||
8770 test "$enable_shared" = no; then
8771 # Fast installation is not necessary
8772 enable_fast_install=needless
8773 fi
8774
8775 striplib=
8776 old_striplib=
8777 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
8778 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
8779 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
8780 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
8781 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
8782 echo "$as_me:$LINENO: result: yes" >&5
8783 echo "${ECHO_T}yes" >&6
8784 else
8785 # FIXME - insert some real tests, host_os isn't really good enough
8786 case $host_os in
8787 darwin*)
8788 if test -n "$STRIP" ; then
8789 striplib="$STRIP -x"
8790 echo "$as_me:$LINENO: result: yes" >&5
8791 echo "${ECHO_T}yes" >&6
8792 else
8793 echo "$as_me:$LINENO: result: no" >&5
8794 echo "${ECHO_T}no" >&6
8795 fi
8796 ;;
8797 *)
8798 echo "$as_me:$LINENO: result: no" >&5
8799 echo "${ECHO_T}no" >&6
8800 ;;
8801 esac
8802 fi
8803
8804 if test "x$enable_dlopen" != xyes; then
8805 enable_dlopen=unknown
8806 enable_dlopen_self=unknown
8807 enable_dlopen_self_static=unknown
8808 else
8809 lt_cv_dlopen=no
8810 lt_cv_dlopen_libs=
8811
8812 case $host_os in
8813 beos*)
8814 lt_cv_dlopen="load_add_on"
8815 lt_cv_dlopen_libs=
8816 lt_cv_dlopen_self=yes
8817 ;;
8818
8819 mingw* | pw32*)
8820 lt_cv_dlopen="LoadLibrary"
8821 lt_cv_dlopen_libs=
8822 ;;
8823
8824 cygwin*)
8825 lt_cv_dlopen="dlopen"
8826 lt_cv_dlopen_libs=
8827 ;;
8828
8829 darwin*)
8830 # if libdl is installed we need to link against it
8831 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8832 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8833 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8834 echo $ECHO_N "(cached) $ECHO_C" >&6
8835 else
8836 ac_check_lib_save_LIBS=$LIBS
8837 LIBS="-ldl $LIBS"
8838 cat >conftest.$ac_ext <<_ACEOF
8839 /* confdefs.h. */
8840 _ACEOF
8841 cat confdefs.h >>conftest.$ac_ext
8842 cat >>conftest.$ac_ext <<_ACEOF
8843 /* end confdefs.h. */
8844
8845 /* Override any gcc2 internal prototype to avoid an error. */
8846 #ifdef __cplusplus
8847 extern "C"
8848 #endif
8849 /* We use char because int might match the return type of a gcc2
8850 builtin and then its argument prototype would still apply. */
8851 char dlopen ();
8852 int
8853 main ()
8854 {
8855 dlopen ();
8856 ;
8857 return 0;
8858 }
8859 _ACEOF
8860 rm -f conftest.$ac_objext conftest$ac_exeext
8861 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8862 (eval $ac_link) 2>conftest.er1
8863 ac_status=$?
8864 grep -v '^ *+' conftest.er1 >conftest.err
8865 rm -f conftest.er1
8866 cat conftest.err >&5
8867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8868 (exit $ac_status); } &&
8869 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8871 (eval $ac_try) 2>&5
8872 ac_status=$?
8873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8874 (exit $ac_status); }; } &&
8875 { ac_try='test -s conftest$ac_exeext'
8876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8877 (eval $ac_try) 2>&5
8878 ac_status=$?
8879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8880 (exit $ac_status); }; }; then
8881 ac_cv_lib_dl_dlopen=yes
8882 else
8883 echo "$as_me: failed program was:" >&5
8884 sed 's/^/| /' conftest.$ac_ext >&5
8885
8886 ac_cv_lib_dl_dlopen=no
8887 fi
8888 rm -f conftest.err conftest.$ac_objext \
8889 conftest$ac_exeext conftest.$ac_ext
8890 LIBS=$ac_check_lib_save_LIBS
8891 fi
8892 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8893 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8894 if test $ac_cv_lib_dl_dlopen = yes; then
8895 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
8896 else
8897
8898 lt_cv_dlopen="dyld"
8899 lt_cv_dlopen_libs=
8900 lt_cv_dlopen_self=yes
8901
8902 fi
8903
8904 ;;
8905
8906 *)
8907 echo "$as_me:$LINENO: checking for shl_load" >&5
8908 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
8909 if test "${ac_cv_func_shl_load+set}" = set; then
8910 echo $ECHO_N "(cached) $ECHO_C" >&6
8911 else
8912 cat >conftest.$ac_ext <<_ACEOF
8913 /* confdefs.h. */
8914 _ACEOF
8915 cat confdefs.h >>conftest.$ac_ext
8916 cat >>conftest.$ac_ext <<_ACEOF
8917 /* end confdefs.h. */
8918 /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
8919 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8920 #define shl_load innocuous_shl_load
8921
8922 /* System header to define __stub macros and hopefully few prototypes,
8923 which can conflict with char shl_load (); below.
8924 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8925 <limits.h> exists even on freestanding compilers. */
8926
8927 #ifdef __STDC__
8928 # include <limits.h>
8929 #else
8930 # include <assert.h>
8931 #endif
8932
8933 #undef shl_load
8934
8935 /* Override any gcc2 internal prototype to avoid an error. */
8936 #ifdef __cplusplus
8937 extern "C"
8938 {
8939 #endif
8940 /* We use char because int might match the return type of a gcc2
8941 builtin and then its argument prototype would still apply. */
8942 char shl_load ();
8943 /* The GNU C library defines this for functions which it implements
8944 to always fail with ENOSYS. Some functions are actually named
8945 something starting with __ and the normal name is an alias. */
8946 #if defined (__stub_shl_load) || defined (__stub___shl_load)
8947 choke me
8948 #else
8949 char (*f) () = shl_load;
8950 #endif
8951 #ifdef __cplusplus
8952 }
8953 #endif
8954
8955 int
8956 main ()
8957 {
8958 return f != shl_load;
8959 ;
8960 return 0;
8961 }
8962 _ACEOF
8963 rm -f conftest.$ac_objext conftest$ac_exeext
8964 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8965 (eval $ac_link) 2>conftest.er1
8966 ac_status=$?
8967 grep -v '^ *+' conftest.er1 >conftest.err
8968 rm -f conftest.er1
8969 cat conftest.err >&5
8970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8971 (exit $ac_status); } &&
8972 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8974 (eval $ac_try) 2>&5
8975 ac_status=$?
8976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8977 (exit $ac_status); }; } &&
8978 { ac_try='test -s conftest$ac_exeext'
8979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8980 (eval $ac_try) 2>&5
8981 ac_status=$?
8982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8983 (exit $ac_status); }; }; then
8984 ac_cv_func_shl_load=yes
8985 else
8986 echo "$as_me: failed program was:" >&5
8987 sed 's/^/| /' conftest.$ac_ext >&5
8988
8989 ac_cv_func_shl_load=no
8990 fi
8991 rm -f conftest.err conftest.$ac_objext \
8992 conftest$ac_exeext conftest.$ac_ext
8993 fi
8994 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
8995 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
8996 if test $ac_cv_func_shl_load = yes; then
8997 lt_cv_dlopen="shl_load"
8998 else
8999 echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9000 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9001 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9002 echo $ECHO_N "(cached) $ECHO_C" >&6
9003 else
9004 ac_check_lib_save_LIBS=$LIBS
9005 LIBS="-ldld $LIBS"
9006 cat >conftest.$ac_ext <<_ACEOF
9007 /* confdefs.h. */
9008 _ACEOF
9009 cat confdefs.h >>conftest.$ac_ext
9010 cat >>conftest.$ac_ext <<_ACEOF
9011 /* end confdefs.h. */
9012
9013 /* Override any gcc2 internal prototype to avoid an error. */
9014 #ifdef __cplusplus
9015 extern "C"
9016 #endif
9017 /* We use char because int might match the return type of a gcc2
9018 builtin and then its argument prototype would still apply. */
9019 char shl_load ();
9020 int
9021 main ()
9022 {
9023 shl_load ();
9024 ;
9025 return 0;
9026 }
9027 _ACEOF
9028 rm -f conftest.$ac_objext conftest$ac_exeext
9029 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9030 (eval $ac_link) 2>conftest.er1
9031 ac_status=$?
9032 grep -v '^ *+' conftest.er1 >conftest.err
9033 rm -f conftest.er1
9034 cat conftest.err >&5
9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9036 (exit $ac_status); } &&
9037 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9039 (eval $ac_try) 2>&5
9040 ac_status=$?
9041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9042 (exit $ac_status); }; } &&
9043 { ac_try='test -s conftest$ac_exeext'
9044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9045 (eval $ac_try) 2>&5
9046 ac_status=$?
9047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9048 (exit $ac_status); }; }; then
9049 ac_cv_lib_dld_shl_load=yes
9050 else
9051 echo "$as_me: failed program was:" >&5
9052 sed 's/^/| /' conftest.$ac_ext >&5
9053
9054 ac_cv_lib_dld_shl_load=no
9055 fi
9056 rm -f conftest.err conftest.$ac_objext \
9057 conftest$ac_exeext conftest.$ac_ext
9058 LIBS=$ac_check_lib_save_LIBS
9059 fi
9060 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9061 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9062 if test $ac_cv_lib_dld_shl_load = yes; then
9063 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
9064 else
9065 echo "$as_me:$LINENO: checking for dlopen" >&5
9066 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
9067 if test "${ac_cv_func_dlopen+set}" = set; then
9068 echo $ECHO_N "(cached) $ECHO_C" >&6
9069 else
9070 cat >conftest.$ac_ext <<_ACEOF
9071 /* confdefs.h. */
9072 _ACEOF
9073 cat confdefs.h >>conftest.$ac_ext
9074 cat >>conftest.$ac_ext <<_ACEOF
9075 /* end confdefs.h. */
9076 /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
9077 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9078 #define dlopen innocuous_dlopen
9079
9080 /* System header to define __stub macros and hopefully few prototypes,
9081 which can conflict with char dlopen (); below.
9082 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9083 <limits.h> exists even on freestanding compilers. */
9084
9085 #ifdef __STDC__
9086 # include <limits.h>
9087 #else
9088 # include <assert.h>
9089 #endif
9090
9091 #undef dlopen
9092
9093 /* Override any gcc2 internal prototype to avoid an error. */
9094 #ifdef __cplusplus
9095 extern "C"
9096 {
9097 #endif
9098 /* We use char because int might match the return type of a gcc2
9099 builtin and then its argument prototype would still apply. */
9100 char dlopen ();
9101 /* The GNU C library defines this for functions which it implements
9102 to always fail with ENOSYS. Some functions are actually named
9103 something starting with __ and the normal name is an alias. */
9104 #if defined (__stub_dlopen) || defined (__stub___dlopen)
9105 choke me
9106 #else
9107 char (*f) () = dlopen;
9108 #endif
9109 #ifdef __cplusplus
9110 }
9111 #endif
9112
9113 int
9114 main ()
9115 {
9116 return f != dlopen;
9117 ;
9118 return 0;
9119 }
9120 _ACEOF
9121 rm -f conftest.$ac_objext conftest$ac_exeext
9122 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9123 (eval $ac_link) 2>conftest.er1
9124 ac_status=$?
9125 grep -v '^ *+' conftest.er1 >conftest.err
9126 rm -f conftest.er1
9127 cat conftest.err >&5
9128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9129 (exit $ac_status); } &&
9130 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9132 (eval $ac_try) 2>&5
9133 ac_status=$?
9134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9135 (exit $ac_status); }; } &&
9136 { ac_try='test -s conftest$ac_exeext'
9137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9138 (eval $ac_try) 2>&5
9139 ac_status=$?
9140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9141 (exit $ac_status); }; }; then
9142 ac_cv_func_dlopen=yes
9143 else
9144 echo "$as_me: failed program was:" >&5
9145 sed 's/^/| /' conftest.$ac_ext >&5
9146
9147 ac_cv_func_dlopen=no
9148 fi
9149 rm -f conftest.err conftest.$ac_objext \
9150 conftest$ac_exeext conftest.$ac_ext
9151 fi
9152 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
9153 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
9154 if test $ac_cv_func_dlopen = yes; then
9155 lt_cv_dlopen="dlopen"
9156 else
9157 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9158 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9159 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9160 echo $ECHO_N "(cached) $ECHO_C" >&6
9161 else
9162 ac_check_lib_save_LIBS=$LIBS
9163 LIBS="-ldl $LIBS"
9164 cat >conftest.$ac_ext <<_ACEOF
9165 /* confdefs.h. */
9166 _ACEOF
9167 cat confdefs.h >>conftest.$ac_ext
9168 cat >>conftest.$ac_ext <<_ACEOF
9169 /* end confdefs.h. */
9170
9171 /* Override any gcc2 internal prototype to avoid an error. */
9172 #ifdef __cplusplus
9173 extern "C"
9174 #endif
9175 /* We use char because int might match the return type of a gcc2
9176 builtin and then its argument prototype would still apply. */
9177 char dlopen ();
9178 int
9179 main ()
9180 {
9181 dlopen ();
9182 ;
9183 return 0;
9184 }
9185 _ACEOF
9186 rm -f conftest.$ac_objext conftest$ac_exeext
9187 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9188 (eval $ac_link) 2>conftest.er1
9189 ac_status=$?
9190 grep -v '^ *+' conftest.er1 >conftest.err
9191 rm -f conftest.er1
9192 cat conftest.err >&5
9193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9194 (exit $ac_status); } &&
9195 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9197 (eval $ac_try) 2>&5
9198 ac_status=$?
9199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9200 (exit $ac_status); }; } &&
9201 { ac_try='test -s conftest$ac_exeext'
9202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9203 (eval $ac_try) 2>&5
9204 ac_status=$?
9205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9206 (exit $ac_status); }; }; then
9207 ac_cv_lib_dl_dlopen=yes
9208 else
9209 echo "$as_me: failed program was:" >&5
9210 sed 's/^/| /' conftest.$ac_ext >&5
9211
9212 ac_cv_lib_dl_dlopen=no
9213 fi
9214 rm -f conftest.err conftest.$ac_objext \
9215 conftest$ac_exeext conftest.$ac_ext
9216 LIBS=$ac_check_lib_save_LIBS
9217 fi
9218 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9219 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9220 if test $ac_cv_lib_dl_dlopen = yes; then
9221 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9222 else
9223 echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
9224 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
9225 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
9226 echo $ECHO_N "(cached) $ECHO_C" >&6
9227 else
9228 ac_check_lib_save_LIBS=$LIBS
9229 LIBS="-lsvld $LIBS"
9230 cat >conftest.$ac_ext <<_ACEOF
9231 /* confdefs.h. */
9232 _ACEOF
9233 cat confdefs.h >>conftest.$ac_ext
9234 cat >>conftest.$ac_ext <<_ACEOF
9235 /* end confdefs.h. */
9236
9237 /* Override any gcc2 internal prototype to avoid an error. */
9238 #ifdef __cplusplus
9239 extern "C"
9240 #endif
9241 /* We use char because int might match the return type of a gcc2
9242 builtin and then its argument prototype would still apply. */
9243 char dlopen ();
9244 int
9245 main ()
9246 {
9247 dlopen ();
9248 ;
9249 return 0;
9250 }
9251 _ACEOF
9252 rm -f conftest.$ac_objext conftest$ac_exeext
9253 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9254 (eval $ac_link) 2>conftest.er1
9255 ac_status=$?
9256 grep -v '^ *+' conftest.er1 >conftest.err
9257 rm -f conftest.er1
9258 cat conftest.err >&5
9259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9260 (exit $ac_status); } &&
9261 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9263 (eval $ac_try) 2>&5
9264 ac_status=$?
9265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9266 (exit $ac_status); }; } &&
9267 { ac_try='test -s conftest$ac_exeext'
9268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9269 (eval $ac_try) 2>&5
9270 ac_status=$?
9271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9272 (exit $ac_status); }; }; then
9273 ac_cv_lib_svld_dlopen=yes
9274 else
9275 echo "$as_me: failed program was:" >&5
9276 sed 's/^/| /' conftest.$ac_ext >&5
9277
9278 ac_cv_lib_svld_dlopen=no
9279 fi
9280 rm -f conftest.err conftest.$ac_objext \
9281 conftest$ac_exeext conftest.$ac_ext
9282 LIBS=$ac_check_lib_save_LIBS
9283 fi
9284 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
9285 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
9286 if test $ac_cv_lib_svld_dlopen = yes; then
9287 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
9288 else
9289 echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
9290 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
9291 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
9292 echo $ECHO_N "(cached) $ECHO_C" >&6
9293 else
9294 ac_check_lib_save_LIBS=$LIBS
9295 LIBS="-ldld $LIBS"
9296 cat >conftest.$ac_ext <<_ACEOF
9297 /* confdefs.h. */
9298 _ACEOF
9299 cat confdefs.h >>conftest.$ac_ext
9300 cat >>conftest.$ac_ext <<_ACEOF
9301 /* end confdefs.h. */
9302
9303 /* Override any gcc2 internal prototype to avoid an error. */
9304 #ifdef __cplusplus
9305 extern "C"
9306 #endif
9307 /* We use char because int might match the return type of a gcc2
9308 builtin and then its argument prototype would still apply. */
9309 char dld_link ();
9310 int
9311 main ()
9312 {
9313 dld_link ();
9314 ;
9315 return 0;
9316 }
9317 _ACEOF
9318 rm -f conftest.$ac_objext conftest$ac_exeext
9319 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9320 (eval $ac_link) 2>conftest.er1
9321 ac_status=$?
9322 grep -v '^ *+' conftest.er1 >conftest.err
9323 rm -f conftest.er1
9324 cat conftest.err >&5
9325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9326 (exit $ac_status); } &&
9327 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9329 (eval $ac_try) 2>&5
9330 ac_status=$?
9331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9332 (exit $ac_status); }; } &&
9333 { ac_try='test -s conftest$ac_exeext'
9334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9335 (eval $ac_try) 2>&5
9336 ac_status=$?
9337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9338 (exit $ac_status); }; }; then
9339 ac_cv_lib_dld_dld_link=yes
9340 else
9341 echo "$as_me: failed program was:" >&5
9342 sed 's/^/| /' conftest.$ac_ext >&5
9343
9344 ac_cv_lib_dld_dld_link=no
9345 fi
9346 rm -f conftest.err conftest.$ac_objext \
9347 conftest$ac_exeext conftest.$ac_ext
9348 LIBS=$ac_check_lib_save_LIBS
9349 fi
9350 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
9351 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
9352 if test $ac_cv_lib_dld_dld_link = yes; then
9353 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
9354 fi
9355
9356
9357 fi
9358
9359
9360 fi
9361
9362
9363 fi
9364
9365
9366 fi
9367
9368
9369 fi
9370
9371 ;;
9372 esac
9373
9374 if test "x$lt_cv_dlopen" != xno; then
9375 enable_dlopen=yes
9376 else
9377 enable_dlopen=no
9378 fi
9379
9380 case $lt_cv_dlopen in
9381 dlopen)
9382 save_CPPFLAGS="$CPPFLAGS"
9383 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
9384
9385 save_LDFLAGS="$LDFLAGS"
9386 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
9387
9388 save_LIBS="$LIBS"
9389 LIBS="$lt_cv_dlopen_libs $LIBS"
9390
9391 echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
9392 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
9393 if test "${lt_cv_dlopen_self+set}" = set; then
9394 echo $ECHO_N "(cached) $ECHO_C" >&6
9395 else
9396 if test "$cross_compiling" = yes; then :
9397 lt_cv_dlopen_self=cross
9398 else
9399 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
9400 lt_status=$lt_dlunknown
9401 cat > conftest.$ac_ext <<EOF
9402 #line 9403 "configure"
9403 #include "confdefs.h"
9404
9405 #if HAVE_DLFCN_H
9406 #include <dlfcn.h>
9407 #endif
9408
9409 #include <stdio.h>
9410
9411 #ifdef RTLD_GLOBAL
9412 # define LT_DLGLOBAL RTLD_GLOBAL
9413 #else
9414 # ifdef DL_GLOBAL
9415 # define LT_DLGLOBAL DL_GLOBAL
9416 # else
9417 # define LT_DLGLOBAL 0
9418 # endif
9419 #endif
9420
9421 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
9422 find out it does not work in some platform. */
9423 #ifndef LT_DLLAZY_OR_NOW
9424 # ifdef RTLD_LAZY
9425 # define LT_DLLAZY_OR_NOW RTLD_LAZY
9426 # else
9427 # ifdef DL_LAZY
9428 # define LT_DLLAZY_OR_NOW DL_LAZY
9429 # else
9430 # ifdef RTLD_NOW
9431 # define LT_DLLAZY_OR_NOW RTLD_NOW
9432 # else
9433 # ifdef DL_NOW
9434 # define LT_DLLAZY_OR_NOW DL_NOW
9435 # else
9436 # define LT_DLLAZY_OR_NOW 0
9437 # endif
9438 # endif
9439 # endif
9440 # endif
9441 #endif
9442
9443 #ifdef __cplusplus
9444 extern "C" void exit (int);
9445 #endif
9446
9447 void fnord() { int i=42;}
9448 int main ()
9449 {
9450 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
9451 int status = $lt_dlunknown;
9452
9453 if (self)
9454 {
9455 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
9456 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
9457 /* dlclose (self); */
9458 }
9459
9460 exit (status);
9461 }
9462 EOF
9463 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9464 (eval $ac_link) 2>&5
9465 ac_status=$?
9466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9467 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
9468 (./conftest; exit; ) >&5 2>/dev/null
9469 lt_status=$?
9470 case x$lt_status in
9471 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
9472 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
9473 x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
9474 esac
9475 else :
9476 # compilation failed
9477 lt_cv_dlopen_self=no
9478 fi
9479 fi
9480 rm -fr conftest*
9481
9482
9483 fi
9484 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
9485 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
9486
9487 if test "x$lt_cv_dlopen_self" = xyes; then
9488 LDFLAGS="$LDFLAGS $link_static_flag"
9489 echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
9490 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
9491 if test "${lt_cv_dlopen_self_static+set}" = set; then
9492 echo $ECHO_N "(cached) $ECHO_C" >&6
9493 else
9494 if test "$cross_compiling" = yes; then :
9495 lt_cv_dlopen_self_static=cross
9496 else
9497 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
9498 lt_status=$lt_dlunknown
9499 cat > conftest.$ac_ext <<EOF
9500 #line 9501 "configure"
9501 #include "confdefs.h"
9502
9503 #if HAVE_DLFCN_H
9504 #include <dlfcn.h>
9505 #endif
9506
9507 #include <stdio.h>
9508
9509 #ifdef RTLD_GLOBAL
9510 # define LT_DLGLOBAL RTLD_GLOBAL
9511 #else
9512 # ifdef DL_GLOBAL
9513 # define LT_DLGLOBAL DL_GLOBAL
9514 # else
9515 # define LT_DLGLOBAL 0
9516 # endif
9517 #endif
9518
9519 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
9520 find out it does not work in some platform. */
9521 #ifndef LT_DLLAZY_OR_NOW
9522 # ifdef RTLD_LAZY
9523 # define LT_DLLAZY_OR_NOW RTLD_LAZY
9524 # else
9525 # ifdef DL_LAZY
9526 # define LT_DLLAZY_OR_NOW DL_LAZY
9527 # else
9528 # ifdef RTLD_NOW
9529 # define LT_DLLAZY_OR_NOW RTLD_NOW
9530 # else
9531 # ifdef DL_NOW
9532 # define LT_DLLAZY_OR_NOW DL_NOW
9533 # else
9534 # define LT_DLLAZY_OR_NOW 0
9535 # endif
9536 # endif
9537 # endif
9538 # endif
9539 #endif
9540
9541 #ifdef __cplusplus
9542 extern "C" void exit (int);
9543 #endif
9544
9545 void fnord() { int i=42;}
9546 int main ()
9547 {
9548 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
9549 int status = $lt_dlunknown;
9550
9551 if (self)
9552 {
9553 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
9554 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
9555 /* dlclose (self); */
9556 }
9557
9558 exit (status);
9559 }
9560 EOF
9561 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9562 (eval $ac_link) 2>&5
9563 ac_status=$?
9564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9565 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
9566 (./conftest; exit; ) >&5 2>/dev/null
9567 lt_status=$?
9568 case x$lt_status in
9569 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
9570 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
9571 x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
9572 esac
9573 else :
9574 # compilation failed
9575 lt_cv_dlopen_self_static=no
9576 fi
9577 fi
9578 rm -fr conftest*
9579
9580
9581 fi
9582 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
9583 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
9584 fi
9585
9586 CPPFLAGS="$save_CPPFLAGS"
9587 LDFLAGS="$save_LDFLAGS"
9588 LIBS="$save_LIBS"
9589 ;;
9590 esac
9591
9592 case $lt_cv_dlopen_self in
9593 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
9594 *) enable_dlopen_self=unknown ;;
9595 esac
9596
9597 case $lt_cv_dlopen_self_static in
9598 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
9599 *) enable_dlopen_self_static=unknown ;;
9600 esac
9601 fi
9602
9603
9604 # Report which librarie types wil actually be built
9605 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
9606 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
9607 echo "$as_me:$LINENO: result: $can_build_shared" >&5
9608 echo "${ECHO_T}$can_build_shared" >&6
9609
9610 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
9611 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
9612 test "$can_build_shared" = "no" && enable_shared=no
9613
9614 # On AIX, shared libraries and static libraries use the same namespace, and
9615 # are all built from PIC.
9616 case $host_os in
9617 aix3*)
9618 test "$enable_shared" = yes && enable_static=no
9619 if test -n "$RANLIB"; then
9620 archive_cmds="$archive_cmds~\$RANLIB \$lib"
9621 postinstall_cmds='$RANLIB $lib'
9622 fi
9623 ;;
9624
9625 aix4* | aix5*)
9626 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9627 test "$enable_shared" = yes && enable_static=no
9628 fi
9629 ;;
9630 esac
9631 echo "$as_me:$LINENO: result: $enable_shared" >&5
9632 echo "${ECHO_T}$enable_shared" >&6
9633
9634 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
9635 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
9636 # Make sure either enable_shared or enable_static is yes.
9637 test "$enable_shared" = yes || enable_static=yes
9638 echo "$as_me:$LINENO: result: $enable_static" >&5
9639 echo "${ECHO_T}$enable_static" >&6
9640
9641 # The else clause should only fire when bootstrapping the
9642 # libtool distribution, otherwise you forgot to ship ltmain.sh
9643 # with your package, and you will get complaints that there are
9644 # no rules to generate ltmain.sh.
9645 if test -f "$ltmain"; then
9646 # See if we are running on zsh, and set the options which allow our commands through
9647 # without removal of \ escapes.
9648 if test -n "${ZSH_VERSION+set}" ; then
9649 setopt NO_GLOB_SUBST
9650 fi
9651 # Now quote all the things that may contain metacharacters while being
9652 # careful not to overquote the AC_SUBSTed values. We take copies of the
9653 # variables and quote the copies for generation of the libtool script.
9654 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
9655 SED SHELL STRIP \
9656 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
9657 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
9658 deplibs_check_method reload_flag reload_cmds need_locks \
9659 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
9660 lt_cv_sys_global_symbol_to_c_name_address \
9661 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
9662 old_postinstall_cmds old_postuninstall_cmds \
9663 compiler \
9664 CC \
9665 LD \
9666 lt_prog_compiler_wl \
9667 lt_prog_compiler_pic \
9668 lt_prog_compiler_static \
9669 lt_prog_compiler_no_builtin_flag \
9670 export_dynamic_flag_spec \
9671 thread_safe_flag_spec \
9672 whole_archive_flag_spec \
9673 enable_shared_with_static_runtimes \
9674 old_archive_cmds \
9675 old_archive_from_new_cmds \
9676 predep_objects \
9677 postdep_objects \
9678 predeps \
9679 postdeps \
9680 compiler_lib_search_path \
9681 archive_cmds \
9682 archive_expsym_cmds \
9683 postinstall_cmds \
9684 postuninstall_cmds \
9685 old_archive_from_expsyms_cmds \
9686 allow_undefined_flag \
9687 no_undefined_flag \
9688 export_symbols_cmds \
9689 hardcode_libdir_flag_spec \
9690 hardcode_libdir_flag_spec_ld \
9691 hardcode_libdir_separator \
9692 hardcode_automatic \
9693 module_cmds \
9694 module_expsym_cmds \
9695 lt_cv_prog_compiler_c_o \
9696 exclude_expsyms \
9697 include_expsyms; do
9698
9699 case $var in
9700 old_archive_cmds | \
9701 old_archive_from_new_cmds | \
9702 archive_cmds | \
9703 archive_expsym_cmds | \
9704 module_cmds | \
9705 module_expsym_cmds | \
9706 old_archive_from_expsyms_cmds | \
9707 export_symbols_cmds | \
9708 extract_expsyms_cmds | reload_cmds | finish_cmds | \
9709 postinstall_cmds | postuninstall_cmds | \
9710 old_postinstall_cmds | old_postuninstall_cmds | \
9711 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
9712 # Double-quote double-evaled strings.
9713 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
9714 ;;
9715 *)
9716 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
9717 ;;
9718 esac
9719 done
9720
9721 case $lt_echo in
9722 *'\$0 --fallback-echo"')
9723 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
9724 ;;
9725 esac
9726
9727 cfgfile="${ofile}T"
9728 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
9729 $rm -f "$cfgfile"
9730 { echo "$as_me:$LINENO: creating $ofile" >&5
9731 echo "$as_me: creating $ofile" >&6;}
9732
9733 cat <<__EOF__ >> "$cfgfile"
9734 #! $SHELL
9735
9736 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
9737 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
9738 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
9739 #
9740 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
9741 # Free Software Foundation, Inc.
9742 #
9743 # This file is part of GNU Libtool:
9744 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9745 #
9746 # This program is free software; you can redistribute it and/or modify
9747 # it under the terms of the GNU General Public License as published by
9748 # the Free Software Foundation; either version 2 of the License, or
9749 # (at your option) any later version.
9750 #
9751 # This program is distributed in the hope that it will be useful, but
9752 # WITHOUT ANY WARRANTY; without even the implied warranty of
9753 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9754 # General Public License for more details.
9755 #
9756 # You should have received a copy of the GNU General Public License
9757 # along with this program; if not, write to the Free Software
9758 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
9759 #
9760 # As a special exception to the GNU General Public License, if you
9761 # distribute this file as part of a program that contains a
9762 # configuration script generated by Autoconf, you may include it under
9763 # the same distribution terms that you use for the rest of that program.
9764
9765 # A sed program that does not truncate output.
9766 SED=$lt_SED
9767
9768 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
9769 Xsed="$SED -e 1s/^X//"
9770
9771 # The HP-UX ksh and POSIX shell print the target directory to stdout
9772 # if CDPATH is set.
9773 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
9774
9775 # The names of the tagged configurations supported by this script.
9776 available_tags=
9777
9778 # ### BEGIN LIBTOOL CONFIG
9779
9780 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9781
9782 # Shell to use when invoking shell scripts.
9783 SHELL=$lt_SHELL
9784
9785 # Whether or not to build shared libraries.
9786 build_libtool_libs=$enable_shared
9787
9788 # Whether or not to build static libraries.
9789 build_old_libs=$enable_static
9790
9791 # Whether or not to add -lc for building shared libraries.
9792 build_libtool_need_lc=$archive_cmds_need_lc
9793
9794 # Whether or not to disallow shared libs when runtime libs are static
9795 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
9796
9797 # Whether or not to optimize for fast installation.
9798 fast_install=$enable_fast_install
9799
9800 # The host system.
9801 host_alias=$host_alias
9802 host=$host
9803 host_os=$host_os
9804
9805 # The build system.
9806 build_alias=$build_alias
9807 build=$build
9808 build_os=$build_os
9809
9810 # An echo program that does not interpret backslashes.
9811 echo=$lt_echo
9812
9813 # The archiver.
9814 AR=$lt_AR
9815 AR_FLAGS=$lt_AR_FLAGS
9816
9817 # A C compiler.
9818 LTCC=$lt_LTCC
9819
9820 # A language-specific compiler.
9821 CC=$lt_compiler
9822
9823 # Is the compiler the GNU C compiler?
9824 with_gcc=$GCC
9825
9826 # An ERE matcher.
9827 EGREP=$lt_EGREP
9828
9829 # The linker used to build libraries.
9830 LD=$lt_LD
9831
9832 # Whether we need hard or soft links.
9833 LN_S=$lt_LN_S
9834
9835 # A BSD-compatible nm program.
9836 NM=$lt_NM
9837
9838 # A symbol stripping program
9839 STRIP=$lt_STRIP
9840
9841 # Used to examine libraries when file_magic_cmd begins "file"
9842 MAGIC_CMD=$MAGIC_CMD
9843
9844 # Used on cygwin: DLL creation program.
9845 DLLTOOL="$DLLTOOL"
9846
9847 # Used on cygwin: object dumper.
9848 OBJDUMP="$OBJDUMP"
9849
9850 # Used on cygwin: assembler.
9851 AS="$AS"
9852
9853 # The name of the directory that contains temporary libtool files.
9854 objdir=$objdir
9855
9856 # How to create reloadable object files.
9857 reload_flag=$lt_reload_flag
9858 reload_cmds=$lt_reload_cmds
9859
9860 # How to pass a linker flag through the compiler.
9861 wl=$lt_lt_prog_compiler_wl
9862
9863 # Object file suffix (normally "o").
9864 objext="$ac_objext"
9865
9866 # Old archive suffix (normally "a").
9867 libext="$libext"
9868
9869 # Shared library suffix (normally ".so").
9870 shrext_cmds='$shrext_cmds'
9871
9872 # Executable file suffix (normally "").
9873 exeext="$exeext"
9874
9875 # Additional compiler flags for building library objects.
9876 pic_flag=$lt_lt_prog_compiler_pic
9877 pic_mode=$pic_mode
9878
9879 # What is the maximum length of a command?
9880 max_cmd_len=$lt_cv_sys_max_cmd_len
9881
9882 # Does compiler simultaneously support -c and -o options?
9883 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
9884
9885 # Must we lock files when doing compilation?
9886 need_locks=$lt_need_locks
9887
9888 # Do we need the lib prefix for modules?
9889 need_lib_prefix=$need_lib_prefix
9890
9891 # Do we need a version for libraries?
9892 need_version=$need_version
9893
9894 # Whether dlopen is supported.
9895 dlopen_support=$enable_dlopen
9896
9897 # Whether dlopen of programs is supported.
9898 dlopen_self=$enable_dlopen_self
9899
9900 # Whether dlopen of statically linked programs is supported.
9901 dlopen_self_static=$enable_dlopen_self_static
9902
9903 # Compiler flag to prevent dynamic linking.
9904 link_static_flag=$lt_lt_prog_compiler_static
9905
9906 # Compiler flag to turn off builtin functions.
9907 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
9908
9909 # Compiler flag to allow reflexive dlopens.
9910 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
9911
9912 # Compiler flag to generate shared objects directly from archives.
9913 whole_archive_flag_spec=$lt_whole_archive_flag_spec
9914
9915 # Compiler flag to generate thread-safe objects.
9916 thread_safe_flag_spec=$lt_thread_safe_flag_spec
9917
9918 # Library versioning type.
9919 version_type=$version_type
9920
9921 # Format of library name prefix.
9922 libname_spec=$lt_libname_spec
9923
9924 # List of archive names. First name is the real one, the rest are links.
9925 # The last name is the one that the linker finds with -lNAME.
9926 library_names_spec=$lt_library_names_spec
9927
9928 # The coded name of the library, if different from the real name.
9929 soname_spec=$lt_soname_spec
9930
9931 # Commands used to build and install an old-style archive.
9932 RANLIB=$lt_RANLIB
9933 old_archive_cmds=$lt_old_archive_cmds
9934 old_postinstall_cmds=$lt_old_postinstall_cmds
9935 old_postuninstall_cmds=$lt_old_postuninstall_cmds
9936
9937 # Create an old-style archive from a shared archive.
9938 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
9939
9940 # Create a temporary old-style archive to link instead of a shared archive.
9941 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
9942
9943 # Commands used to build and install a shared archive.
9944 archive_cmds=$lt_archive_cmds
9945 archive_expsym_cmds=$lt_archive_expsym_cmds
9946 postinstall_cmds=$lt_postinstall_cmds
9947 postuninstall_cmds=$lt_postuninstall_cmds
9948
9949 # Commands used to build a loadable module (assumed same as above if empty)
9950 module_cmds=$lt_module_cmds
9951 module_expsym_cmds=$lt_module_expsym_cmds
9952
9953 # Commands to strip libraries.
9954 old_striplib=$lt_old_striplib
9955 striplib=$lt_striplib
9956
9957 # Dependencies to place before the objects being linked to create a
9958 # shared library.
9959 predep_objects=$lt_predep_objects
9960
9961 # Dependencies to place after the objects being linked to create a
9962 # shared library.
9963 postdep_objects=$lt_postdep_objects
9964
9965 # Dependencies to place before the objects being linked to create a
9966 # shared library.
9967 predeps=$lt_predeps
9968
9969 # Dependencies to place after the objects being linked to create a
9970 # shared library.
9971 postdeps=$lt_postdeps
9972
9973 # The library search path used internally by the compiler when linking
9974 # a shared library.
9975 compiler_lib_search_path=$lt_compiler_lib_search_path
9976
9977 # Method to check whether dependent libraries are shared objects.
9978 deplibs_check_method=$lt_deplibs_check_method
9979
9980 # Command to use when deplibs_check_method == file_magic.
9981 file_magic_cmd=$lt_file_magic_cmd
9982
9983 # Flag that allows shared libraries with undefined symbols to be built.
9984 allow_undefined_flag=$lt_allow_undefined_flag
9985
9986 # Flag that forces no undefined symbols.
9987 no_undefined_flag=$lt_no_undefined_flag
9988
9989 # Commands used to finish a libtool library installation in a directory.
9990 finish_cmds=$lt_finish_cmds
9991
9992 # Same as above, but a single script fragment to be evaled but not shown.
9993 finish_eval=$lt_finish_eval
9994
9995 # Take the output of nm and produce a listing of raw symbols and C names.
9996 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
9997
9998 # Transform the output of nm in a proper C declaration
9999 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
10000
10001 # Transform the output of nm in a C name address pair
10002 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
10003
10004 # This is the shared library runtime path variable.
10005 runpath_var=$runpath_var
10006
10007 # This is the shared library path variable.
10008 shlibpath_var=$shlibpath_var
10009
10010 # Is shlibpath searched before the hard-coded library search path?
10011 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
10012
10013 # How to hardcode a shared library path into an executable.
10014 hardcode_action=$hardcode_action
10015
10016 # Whether we should hardcode library paths into libraries.
10017 hardcode_into_libs=$hardcode_into_libs
10018
10019 # Flag to hardcode \$libdir into a binary during linking.
10020 # This must work even if \$libdir does not exist.
10021 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
10022
10023 # If ld is used when linking, flag to hardcode \$libdir into
10024 # a binary during linking. This must work even if \$libdir does
10025 # not exist.
10026 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
10027
10028 # Whether we need a single -rpath flag with a separated argument.
10029 hardcode_libdir_separator=$lt_hardcode_libdir_separator
10030
10031 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
10032 # resulting binary.
10033 hardcode_direct=$hardcode_direct
10034
10035 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
10036 # resulting binary.
10037 hardcode_minus_L=$hardcode_minus_L
10038
10039 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
10040 # the resulting binary.
10041 hardcode_shlibpath_var=$hardcode_shlibpath_var
10042
10043 # Set to yes if building a shared library automatically hardcodes DIR into the library
10044 # and all subsequent libraries and executables linked against it.
10045 hardcode_automatic=$hardcode_automatic
10046
10047 # Variables whose values should be saved in libtool wrapper scripts and
10048 # restored at relink time.
10049 variables_saved_for_relink="$variables_saved_for_relink"
10050
10051 # Whether libtool must link a program against all its dependency libraries.
10052 link_all_deplibs=$link_all_deplibs
10053
10054 # Compile-time system search path for libraries
10055 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
10056
10057 # Run-time system search path for libraries
10058 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
10059
10060 # Fix the shell variable \$srcfile for the compiler.
10061 fix_srcfile_path="$fix_srcfile_path"
10062
10063 # Set to yes if exported symbols are required.
10064 always_export_symbols=$always_export_symbols
10065
10066 # The commands to list exported symbols.
10067 export_symbols_cmds=$lt_export_symbols_cmds
10068
10069 # The commands to extract the exported symbol list from a shared archive.
10070 extract_expsyms_cmds=$lt_extract_expsyms_cmds
10071
10072 # Symbols that should not be listed in the preloaded symbols.
10073 exclude_expsyms=$lt_exclude_expsyms
10074
10075 # Symbols that must always be exported.
10076 include_expsyms=$lt_include_expsyms
10077
10078 # ### END LIBTOOL CONFIG
10079
10080 __EOF__
10081
10082
10083 case $host_os in
10084 aix3*)
10085 cat <<\EOF >> "$cfgfile"
10086
10087 # AIX sometimes has problems with the GCC collect2 program. For some
10088 # reason, if we set the COLLECT_NAMES environment variable, the problems
10089 # vanish in a puff of smoke.
10090 if test "X${COLLECT_NAMES+set}" != Xset; then
10091 COLLECT_NAMES=
10092 export COLLECT_NAMES
10093 fi
10094 EOF
10095 ;;
10096 esac
10097
10098 # We use sed instead of cat because bash on DJGPP gets confused if
10099 # if finds mixed CR/LF and LF-only lines. Since sed operates in
10100 # text mode, it properly converts lines to CR/LF. This bash problem
10101 # is reportedly fixed, but why not run on old versions too?
10102 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
10103
10104 mv -f "$cfgfile" "$ofile" || \
10105 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10106 chmod +x "$ofile"
10107
10108 else
10109 # If there is no Makefile yet, we rely on a make rule to execute
10110 # `config.status --recheck' to rerun these tests and create the
10111 # libtool script then.
10112 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
10113 if test -f "$ltmain_in"; then
10114 test -f Makefile && make "$ltmain"
10115 fi
10116 fi
10117
10118
10119 ac_ext=c
10120 ac_cpp='$CPP $CPPFLAGS'
10121 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10122 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10123 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10124
10125 CC="$lt_save_CC"
10126
10127
10128 # Check whether --with-tags or --without-tags was given.
10129 if test "${with_tags+set}" = set; then
10130 withval="$with_tags"
10131 tagnames="$withval"
10132 fi;
10133
10134 if test -f "$ltmain" && test -n "$tagnames"; then
10135 if test ! -f "${ofile}"; then
10136 { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
10137 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
10138 fi
10139
10140 if test -z "$LTCC"; then
10141 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
10142 if test -z "$LTCC"; then
10143 { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
10144 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
10145 else
10146 { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
10147 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
10148 fi
10149 fi
10150
10151 # Extract list of available tagged configurations in $ofile.
10152 # Note that this assumes the entire list is on one line.
10153 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
10154
10155 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10156 for tagname in $tagnames; do
10157 IFS="$lt_save_ifs"
10158 # Check whether tagname contains only valid characters
10159 case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
10160 "") ;;
10161 *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
10162 echo "$as_me: error: invalid tag name: $tagname" >&2;}
10163 { (exit 1); exit 1; }; }
10164 ;;
10165 esac
10166
10167 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
10168 then
10169 { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
10170 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
10171 { (exit 1); exit 1; }; }
10172 fi
10173
10174 # Update the list of available tags.
10175 if test -n "$tagname"; then
10176 echo appending configuration tag \"$tagname\" to $ofile
10177
10178 case $tagname in
10179 CXX)
10180 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
10181 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
10182 (test "X$CXX" != "Xg++"))) ; then
10183 ac_ext=cc
10184 ac_cpp='$CXXCPP $CPPFLAGS'
10185 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10186 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10187 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10188
10189
10190
10191
10192 archive_cmds_need_lc_CXX=no
10193 allow_undefined_flag_CXX=
10194 always_export_symbols_CXX=no
10195 archive_expsym_cmds_CXX=
10196 export_dynamic_flag_spec_CXX=
10197 hardcode_direct_CXX=no
10198 hardcode_libdir_flag_spec_CXX=
10199 hardcode_libdir_flag_spec_ld_CXX=
10200 hardcode_libdir_separator_CXX=
10201 hardcode_minus_L_CXX=no
10202 hardcode_automatic_CXX=no
10203 module_cmds_CXX=
10204 module_expsym_cmds_CXX=
10205 link_all_deplibs_CXX=unknown
10206 old_archive_cmds_CXX=$old_archive_cmds
10207 no_undefined_flag_CXX=
10208 whole_archive_flag_spec_CXX=
10209 enable_shared_with_static_runtimes_CXX=no
10210
10211 # Dependencies to place before and after the object being linked:
10212 predep_objects_CXX=
10213 postdep_objects_CXX=
10214 predeps_CXX=
10215 postdeps_CXX=
10216 compiler_lib_search_path_CXX=
10217
10218 # Source file extension for C++ test sources.
10219 ac_ext=cpp
10220
10221 # Object file extension for compiled C++ test sources.
10222 objext=o
10223 objext_CXX=$objext
10224
10225 # Code to be used in simple compile tests
10226 lt_simple_compile_test_code="int some_variable = 0;\n"
10227
10228 # Code to be used in simple link tests
10229 lt_simple_link_test_code='int main(int, char *) { return(0); }\n'
10230
10231 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
10232
10233 # If no C compiler was specified, use CC.
10234 LTCC=${LTCC-"$CC"}
10235
10236 # Allow CC to be a program name with arguments.
10237 compiler=$CC
10238
10239
10240 # save warnings/boilerplate of simple test code
10241 ac_outfile=conftest.$ac_objext
10242 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
10243 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
10244 _lt_compiler_boilerplate=`cat conftest.err`
10245 $rm conftest*
10246
10247 ac_outfile=conftest.$ac_objext
10248 printf "$lt_simple_link_test_code" >conftest.$ac_ext
10249 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
10250 _lt_linker_boilerplate=`cat conftest.err`
10251 $rm conftest*
10252
10253
10254 # Allow CC to be a program name with arguments.
10255 lt_save_CC=$CC
10256 lt_save_LD=$LD
10257 lt_save_GCC=$GCC
10258 GCC=$GXX
10259 lt_save_with_gnu_ld=$with_gnu_ld
10260 lt_save_path_LD=$lt_cv_path_LD
10261 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
10262 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
10263 else
10264 unset lt_cv_prog_gnu_ld
10265 fi
10266 if test -n "${lt_cv_path_LDCXX+set}"; then
10267 lt_cv_path_LD=$lt_cv_path_LDCXX
10268 else
10269 unset lt_cv_path_LD
10270 fi
10271 test -z "${LDCXX+set}" || LD=$LDCXX
10272 CC=${CXX-"c++"}
10273 compiler=$CC
10274 compiler_CXX=$CC
10275 for cc_temp in $compiler""; do
10276 case $cc_temp in
10277 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10278 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
10279 \-*) ;;
10280 *) break;;
10281 esac
10282 done
10283 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
10284
10285
10286 # We don't want -fno-exception wen compiling C++ code, so set the
10287 # no_builtin_flag separately
10288 if test "$GXX" = yes; then
10289 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
10290 else
10291 lt_prog_compiler_no_builtin_flag_CXX=
10292 fi
10293
10294 if test "$GXX" = yes; then
10295 # Set up default GNU C++ configuration
10296
10297
10298 # Check whether --with-gnu-ld or --without-gnu-ld was given.
10299 if test "${with_gnu_ld+set}" = set; then
10300 withval="$with_gnu_ld"
10301 test "$withval" = no || with_gnu_ld=yes
10302 else
10303 with_gnu_ld=no
10304 fi;
10305 ac_prog=ld
10306 if test "$GCC" = yes; then
10307 # Check if gcc -print-prog-name=ld gives a path.
10308 echo "$as_me:$LINENO: checking for ld used by $CC" >&5
10309 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
10310 case $host in
10311 *-*-mingw*)
10312 # gcc leaves a trailing carriage return which upsets mingw
10313 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10314 *)
10315 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10316 esac
10317 case $ac_prog in
10318 # Accept absolute paths.
10319 [\\/]* | ?:[\\/]*)
10320 re_direlt='/[^/][^/]*/\.\./'
10321 # Canonicalize the pathname of ld
10322 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
10323 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10324 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
10325 done
10326 test -z "$LD" && LD="$ac_prog"
10327 ;;
10328 "")
10329 # If it fails, then pretend we aren't using GCC.
10330 ac_prog=ld
10331 ;;
10332 *)
10333 # If it is relative, then search for the first ld in PATH.
10334 with_gnu_ld=unknown
10335 ;;
10336 esac
10337 elif test "$with_gnu_ld" = yes; then
10338 echo "$as_me:$LINENO: checking for GNU ld" >&5
10339 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
10340 else
10341 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10342 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
10343 fi
10344 if test "${lt_cv_path_LD+set}" = set; then
10345 echo $ECHO_N "(cached) $ECHO_C" >&6
10346 else
10347 if test -z "$LD"; then
10348 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
10349 for ac_dir in $PATH; do
10350 IFS="$lt_save_ifs"
10351 test -z "$ac_dir" && ac_dir=.
10352 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10353 lt_cv_path_LD="$ac_dir/$ac_prog"
10354 # Check to see if the program is GNU ld. I'd rather use --version,
10355 # but apparently some variants of GNU ld only accept -v.
10356 # Break only if it was the GNU/non-GNU ld that we prefer.
10357 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
10358 *GNU* | *'with BFD'*)
10359 test "$with_gnu_ld" != no && break
10360 ;;
10361 *)
10362 test "$with_gnu_ld" != yes && break
10363 ;;
10364 esac
10365 fi
10366 done
10367 IFS="$lt_save_ifs"
10368 else
10369 lt_cv_path_LD="$LD" # Let the user override the test with a path.
10370 fi
10371 fi
10372
10373 LD="$lt_cv_path_LD"
10374 if test -n "$LD"; then
10375 echo "$as_me:$LINENO: result: $LD" >&5
10376 echo "${ECHO_T}$LD" >&6
10377 else
10378 echo "$as_me:$LINENO: result: no" >&5
10379 echo "${ECHO_T}no" >&6
10380 fi
10381 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10382 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10383 { (exit 1); exit 1; }; }
10384 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10385 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10386 if test "${lt_cv_prog_gnu_ld+set}" = set; then
10387 echo $ECHO_N "(cached) $ECHO_C" >&6
10388 else
10389 # I'd rather use --version here, but apparently some GNU lds only accept -v.
10390 case `$LD -v 2>&1 </dev/null` in
10391 *GNU* | *'with BFD'*)
10392 lt_cv_prog_gnu_ld=yes
10393 ;;
10394 *)
10395 lt_cv_prog_gnu_ld=no
10396 ;;
10397 esac
10398 fi
10399 echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
10400 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
10401 with_gnu_ld=$lt_cv_prog_gnu_ld
10402
10403
10404
10405 # Check if GNU C++ uses GNU ld as the underlying linker, since the
10406 # archiving commands below assume that GNU ld is being used.
10407 if test "$with_gnu_ld" = yes; then
10408 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
10409 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'
10410
10411 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
10412 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
10413
10414 # If archive_cmds runs LD, not CC, wlarc should be empty
10415 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
10416 # investigate it a little bit more. (MM)
10417 wlarc='${wl}'
10418
10419 # ancient GNU ld didn't support --whole-archive et. al.
10420 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
10421 grep 'no-whole-archive' > /dev/null; then
10422 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
10423 else
10424 whole_archive_flag_spec_CXX=
10425 fi
10426 else
10427 with_gnu_ld=no
10428 wlarc=
10429
10430 # A generic and very simple default shared library creation
10431 # command for GNU C++ for the case where it uses the native
10432 # linker, instead of GNU ld. If possible, this setting should
10433 # overridden to take advantage of the native linker features on
10434 # the platform it is being used on.
10435 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
10436 fi
10437
10438 # Commands to make compiler produce verbose output that lists
10439 # what "hidden" libraries, object files and flags are used when
10440 # linking a shared library.
10441 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
10442
10443 else
10444 GXX=no
10445 with_gnu_ld=no
10446 wlarc=
10447 fi
10448
10449 # PORTME: fill in a description of your system's C++ link characteristics
10450 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
10451 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
10452 ld_shlibs_CXX=yes
10453 case $host_os in
10454 aix3*)
10455 # FIXME: insert proper C++ library support
10456 ld_shlibs_CXX=no
10457 ;;
10458 aix4* | aix5*)
10459 if test "$host_cpu" = ia64; then
10460 # On IA64, the linker does run time linking by default, so we don't
10461 # have to do anything special.
10462 aix_use_runtimelinking=no
10463 exp_sym_flag='-Bexport'
10464 no_entry_flag=""
10465 else
10466 aix_use_runtimelinking=no
10467
10468 # Test if we are trying to use run time linking or normal
10469 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
10470 # need to do runtime linking.
10471 case $host_os in aix4.[23]|aix4.[23].*|aix5*)
10472 for ld_flag in $LDFLAGS; do
10473 case $ld_flag in
10474 *-brtl*)
10475 aix_use_runtimelinking=yes
10476 break
10477 ;;
10478 esac
10479 done
10480 esac
10481
10482 exp_sym_flag='-bexport'
10483 no_entry_flag='-bnoentry'
10484 fi
10485
10486 # When large executables or shared objects are built, AIX ld can
10487 # have problems creating the table of contents. If linking a library
10488 # or program results in "error TOC overflow" add -mminimal-toc to
10489 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
10490 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10491
10492 archive_cmds_CXX=''
10493 hardcode_direct_CXX=yes
10494 hardcode_libdir_separator_CXX=':'
10495 link_all_deplibs_CXX=yes
10496
10497 if test "$GXX" = yes; then
10498 case $host_os in aix4.[012]|aix4.[012].*)
10499 # We only want to do this on AIX 4.2 and lower, the check
10500 # below for broken collect2 doesn't work under 4.3+
10501 collect2name=`${CC} -print-prog-name=collect2`
10502 if test -f "$collect2name" && \
10503 strings "$collect2name" | grep resolve_lib_name >/dev/null
10504 then
10505 # We have reworked collect2
10506 hardcode_direct_CXX=yes
10507 else
10508 # We have old collect2
10509 hardcode_direct_CXX=unsupported
10510 # It fails to find uninstalled libraries when the uninstalled
10511 # path is not listed in the libpath. Setting hardcode_minus_L
10512 # to unsupported forces relinking
10513 hardcode_minus_L_CXX=yes
10514 hardcode_libdir_flag_spec_CXX='-L$libdir'
10515 hardcode_libdir_separator_CXX=
10516 fi
10517 esac
10518 shared_flag='-shared'
10519 if test "$aix_use_runtimelinking" = yes; then
10520 shared_flag="$shared_flag "'${wl}-G'
10521 fi
10522 else
10523 # not using gcc
10524 if test "$host_cpu" = ia64; then
10525 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10526 # chokes on -Wl,-G. The following line is correct:
10527 shared_flag='-G'
10528 else
10529 if test "$aix_use_runtimelinking" = yes; then
10530 shared_flag='${wl}-G'
10531 else
10532 shared_flag='${wl}-bM:SRE'
10533 fi
10534 fi
10535 fi
10536
10537 # It seems that -bexpall does not export symbols beginning with
10538 # underscore (_), so it is better to generate a list of symbols to export.
10539 always_export_symbols_CXX=yes
10540 if test "$aix_use_runtimelinking" = yes; then
10541 # Warning - without using the other runtime loading flags (-brtl),
10542 # -berok will link without error, but may produce a broken library.
10543 allow_undefined_flag_CXX='-berok'
10544 # Determine the default libpath from the value encoded in an empty executable.
10545 cat >conftest.$ac_ext <<_ACEOF
10546 /* confdefs.h. */
10547 _ACEOF
10548 cat confdefs.h >>conftest.$ac_ext
10549 cat >>conftest.$ac_ext <<_ACEOF
10550 /* end confdefs.h. */
10551
10552 int
10553 main ()
10554 {
10555
10556 ;
10557 return 0;
10558 }
10559 _ACEOF
10560 rm -f conftest.$ac_objext conftest$ac_exeext
10561 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10562 (eval $ac_link) 2>conftest.er1
10563 ac_status=$?
10564 grep -v '^ *+' conftest.er1 >conftest.err
10565 rm -f conftest.er1
10566 cat conftest.err >&5
10567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10568 (exit $ac_status); } &&
10569 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
10570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10571 (eval $ac_try) 2>&5
10572 ac_status=$?
10573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10574 (exit $ac_status); }; } &&
10575 { ac_try='test -s conftest$ac_exeext'
10576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10577 (eval $ac_try) 2>&5
10578 ac_status=$?
10579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10580 (exit $ac_status); }; }; then
10581
10582 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
10583 }'`
10584 # Check for a 64-bit object if we didn't find anything.
10585 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; }
10586 }'`; fi
10587 else
10588 echo "$as_me: failed program was:" >&5
10589 sed 's/^/| /' conftest.$ac_ext >&5
10590
10591 fi
10592 rm -f conftest.err conftest.$ac_objext \
10593 conftest$ac_exeext conftest.$ac_ext
10594 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
10595
10596 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
10597
10598 archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
10599 else
10600 if test "$host_cpu" = ia64; then
10601 hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
10602 allow_undefined_flag_CXX="-z nodefs"
10603 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
10604 else
10605 # Determine the default libpath from the value encoded in an empty executable.
10606 cat >conftest.$ac_ext <<_ACEOF
10607 /* confdefs.h. */
10608 _ACEOF
10609 cat confdefs.h >>conftest.$ac_ext
10610 cat >>conftest.$ac_ext <<_ACEOF
10611 /* end confdefs.h. */
10612
10613 int
10614 main ()
10615 {
10616
10617 ;
10618 return 0;
10619 }
10620 _ACEOF
10621 rm -f conftest.$ac_objext conftest$ac_exeext
10622 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10623 (eval $ac_link) 2>conftest.er1
10624 ac_status=$?
10625 grep -v '^ *+' conftest.er1 >conftest.err
10626 rm -f conftest.er1
10627 cat conftest.err >&5
10628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10629 (exit $ac_status); } &&
10630 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
10631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10632 (eval $ac_try) 2>&5
10633 ac_status=$?
10634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10635 (exit $ac_status); }; } &&
10636 { ac_try='test -s conftest$ac_exeext'
10637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10638 (eval $ac_try) 2>&5
10639 ac_status=$?
10640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10641 (exit $ac_status); }; }; then
10642
10643 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
10644 }'`
10645 # Check for a 64-bit object if we didn't find anything.
10646 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; }
10647 }'`; fi
10648 else
10649 echo "$as_me: failed program was:" >&5
10650 sed 's/^/| /' conftest.$ac_ext >&5
10651
10652 fi
10653 rm -f conftest.err conftest.$ac_objext \
10654 conftest$ac_exeext conftest.$ac_ext
10655 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
10656
10657 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
10658 # Warning - without using the other run time loading flags,
10659 # -berok will link without error, but may produce a broken library.
10660 no_undefined_flag_CXX=' ${wl}-bernotok'
10661 allow_undefined_flag_CXX=' ${wl}-berok'
10662 # -bexpall does not export symbols beginning with underscore (_)
10663 always_export_symbols_CXX=yes
10664 # Exported symbols can be pulled into shared objects from archives
10665 whole_archive_flag_spec_CXX=' '
10666 archive_cmds_need_lc_CXX=yes
10667 # This is similar to how AIX traditionally builds its shared libraries.
10668 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
10669 fi
10670 fi
10671 ;;
10672 chorus*)
10673 case $cc_basename in
10674 *)
10675 # FIXME: insert proper C++ library support
10676 ld_shlibs_CXX=no
10677 ;;
10678 esac
10679 ;;
10680
10681
10682 cygwin* | mingw* | pw32*)
10683 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
10684 # as there is no search path for DLLs.
10685 hardcode_libdir_flag_spec_CXX='-L$libdir'
10686 allow_undefined_flag_CXX=unsupported
10687 always_export_symbols_CXX=no
10688 enable_shared_with_static_runtimes_CXX=yes
10689
10690 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
10691 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10692 # If the export-symbols file already is a .def file (1st line
10693 # is EXPORTS), use it as is; otherwise, prepend...
10694 archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10695 cp $export_symbols $output_objdir/$soname.def;
10696 else
10697 echo EXPORTS > $output_objdir/$soname.def;
10698 cat $export_symbols >> $output_objdir/$soname.def;
10699 fi~
10700 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10701 else
10702 ld_shlibs_CXX=no
10703 fi
10704 ;;
10705 darwin* | rhapsody*)
10706 case $host_os in
10707 rhapsody* | darwin1.[012])
10708 allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
10709 ;;
10710 *) # Darwin 1.3 on
10711 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
10712 allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
10713 else
10714 case ${MACOSX_DEPLOYMENT_TARGET} in
10715 10.[012])
10716 allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
10717 ;;
10718 10.*)
10719 allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
10720 ;;
10721 esac
10722 fi
10723 ;;
10724 esac
10725 archive_cmds_need_lc_CXX=no
10726 hardcode_direct_CXX=no
10727 hardcode_automatic_CXX=yes
10728 hardcode_shlibpath_var_CXX=unsupported
10729 whole_archive_flag_spec_CXX=''
10730 link_all_deplibs_CXX=yes
10731
10732 if test "$GXX" = yes ; then
10733 lt_int_apple_cc_single_mod=no
10734 output_verbose_link_cmd='echo'
10735 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
10736 lt_int_apple_cc_single_mod=yes
10737 fi
10738 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
10739 archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
10740 else
10741 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'
10742 fi
10743 module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
10744 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
10745 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
10746 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}'
10747 else
10748 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}'
10749 fi
10750 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}'
10751 else
10752 case $cc_basename in
10753 xlc*)
10754 output_verbose_link_cmd='echo'
10755 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'
10756 module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
10757 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
10758 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}'
10759 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}'
10760 ;;
10761 *)
10762 ld_shlibs_CXX=no
10763 ;;
10764 esac
10765 fi
10766 ;;
10767
10768 dgux*)
10769 case $cc_basename in
10770 ec++*)
10771 # FIXME: insert proper C++ library support
10772 ld_shlibs_CXX=no
10773 ;;
10774 ghcx*)
10775 # Green Hills C++ Compiler
10776 # FIXME: insert proper C++ library support
10777 ld_shlibs_CXX=no
10778 ;;
10779 *)
10780 # FIXME: insert proper C++ library support
10781 ld_shlibs_CXX=no
10782 ;;
10783 esac
10784 ;;
10785 freebsd[12]*)
10786 # C++ shared libraries reported to be fairly broken before switch to ELF
10787 ld_shlibs_CXX=no
10788 ;;
10789 freebsd-elf*)
10790 archive_cmds_need_lc_CXX=no
10791 ;;
10792 freebsd* | kfreebsd*-gnu | dragonfly*)
10793 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
10794 # conventions
10795 ld_shlibs_CXX=yes
10796 ;;
10797 gnu*)
10798 ;;
10799 hpux9*)
10800 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
10801 hardcode_libdir_separator_CXX=:
10802 export_dynamic_flag_spec_CXX='${wl}-E'
10803 hardcode_direct_CXX=yes
10804 hardcode_minus_L_CXX=yes # Not in the search PATH,
10805 # but as the default
10806 # location of the library.
10807
10808 case $cc_basename in
10809 CC*)
10810 # FIXME: insert proper C++ library support
10811 ld_shlibs_CXX=no
10812 ;;
10813 aCC*)
10814 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'
10815 # Commands to make compiler produce verbose output that lists
10816 # what "hidden" libraries, object files and flags are used when
10817 # linking a shared library.
10818 #
10819 # There doesn't appear to be a way to prevent this compiler from
10820 # explicitly linking system object files so we need to strip them
10821 # from the output so that they don't get included in the library
10822 # dependencies.
10823 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'
10824 ;;
10825 *)
10826 if test "$GXX" = yes; then
10827 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'
10828 else
10829 # FIXME: insert proper C++ library support
10830 ld_shlibs_CXX=no
10831 fi
10832 ;;
10833 esac
10834 ;;
10835 hpux10*|hpux11*)
10836 if test $with_gnu_ld = no; then
10837 case $host_cpu in
10838 hppa*64*)
10839 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
10840 hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
10841 hardcode_libdir_separator_CXX=:
10842 ;;
10843 ia64*)
10844 hardcode_libdir_flag_spec_CXX='-L$libdir'
10845 ;;
10846 *)
10847 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
10848 hardcode_libdir_separator_CXX=:
10849 export_dynamic_flag_spec_CXX='${wl}-E'
10850 ;;
10851 esac
10852 fi
10853 case $host_cpu in
10854 hppa*64*)
10855 hardcode_direct_CXX=no
10856 hardcode_shlibpath_var_CXX=no
10857 ;;
10858 ia64*)
10859 hardcode_direct_CXX=no
10860 hardcode_shlibpath_var_CXX=no
10861 hardcode_minus_L_CXX=yes # Not in the search PATH,
10862 # but as the default
10863 # location of the library.
10864 ;;
10865 *)
10866 hardcode_direct_CXX=yes
10867 hardcode_minus_L_CXX=yes # Not in the search PATH,
10868 # but as the default
10869 # location of the library.
10870 ;;
10871 esac
10872
10873 case $cc_basename in
10874 CC*)
10875 # FIXME: insert proper C++ library support
10876 ld_shlibs_CXX=no
10877 ;;
10878 aCC*)
10879 case $host_cpu in
10880 hppa*64*|ia64*)
10881 archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
10882 ;;
10883 *)
10884 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
10885 ;;
10886 esac
10887 # Commands to make compiler produce verbose output that lists
10888 # what "hidden" libraries, object files and flags are used when
10889 # linking a shared library.
10890 #
10891 # There doesn't appear to be a way to prevent this compiler from
10892 # explicitly linking system object files so we need to strip them
10893 # from the output so that they don't get included in the library
10894 # dependencies.
10895 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'
10896 ;;
10897 *)
10898 if test "$GXX" = yes; then
10899 if test $with_gnu_ld = no; then
10900 case $host_cpu in
10901 ia64*|hppa*64*)
10902 archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
10903 ;;
10904 *)
10905 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'
10906 ;;
10907 esac
10908 fi
10909 else
10910 # FIXME: insert proper C++ library support
10911 ld_shlibs_CXX=no
10912 fi
10913 ;;
10914 esac
10915 ;;
10916 irix5* | irix6*)
10917 case $cc_basename in
10918 CC*)
10919 # SGI C++
10920 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'
10921
10922 # Archives containing C++ object files must be created using
10923 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
10924 # necessary to make sure instantiated templates are included
10925 # in the archive.
10926 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
10927 ;;
10928 *)
10929 if test "$GXX" = yes; then
10930 if test "$with_gnu_ld" = no; then
10931 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'
10932 else
10933 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'
10934 fi
10935 fi
10936 link_all_deplibs_CXX=yes
10937 ;;
10938 esac
10939 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
10940 hardcode_libdir_separator_CXX=:
10941 ;;
10942 linux*)
10943 case $cc_basename in
10944 KCC*)
10945 # Kuck and Associates, Inc. (KAI) C++ Compiler
10946
10947 # KCC will only create a shared library if the output file
10948 # ends with ".so" (or ".sl" for HP-UX), so rename the library
10949 # to its proper name (with version) after linking.
10950 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'
10951 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'
10952 # Commands to make compiler produce verbose output that lists
10953 # what "hidden" libraries, object files and flags are used when
10954 # linking a shared library.
10955 #
10956 # There doesn't appear to be a way to prevent this compiler from
10957 # explicitly linking system object files so we need to strip them
10958 # from the output so that they don't get included in the library
10959 # dependencies.
10960 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'
10961
10962 hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
10963 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
10964
10965 # Archives containing C++ object files must be created using
10966 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
10967 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
10968 ;;
10969 icpc*)
10970 # Intel C++
10971 with_gnu_ld=yes
10972 # version 8.0 and above of icpc choke on multiply defined symbols
10973 # if we add $predep_objects and $postdep_objects, however 7.1 and
10974 # earlier do not add the objects themselves.
10975 case `$CC -V 2>&1` in
10976 *"Version 7."*)
10977 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
10978 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'
10979 ;;
10980 *) # Version 8.0 or newer
10981 tmp_idyn=
10982 case $host_cpu in
10983 ia64*) tmp_idyn=' -i_dynamic';;
10984 esac
10985 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10986 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'
10987 ;;
10988 esac
10989 archive_cmds_need_lc_CXX=no
10990 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
10991 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
10992 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
10993 ;;
10994 pgCC*)
10995 # Portland Group C++ compiler
10996 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
10997 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'
10998
10999 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
11000 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
11001 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'
11002 ;;
11003 cxx*)
11004 # Compaq C++
11005 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
11006 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'
11007
11008 runpath_var=LD_RUN_PATH
11009 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
11010 hardcode_libdir_separator_CXX=:
11011
11012 # Commands to make compiler produce verbose output that lists
11013 # what "hidden" libraries, object files and flags are used when
11014 # linking a shared library.
11015 #
11016 # There doesn't appear to be a way to prevent this compiler from
11017 # explicitly linking system object files so we need to strip them
11018 # from the output so that they don't get included in the library
11019 # dependencies.
11020 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'
11021 ;;
11022 esac
11023 ;;
11024 lynxos*)
11025 # FIXME: insert proper C++ library support
11026 ld_shlibs_CXX=no
11027 ;;
11028 m88k*)
11029 # FIXME: insert proper C++ library support
11030 ld_shlibs_CXX=no
11031 ;;
11032 mvs*)
11033 case $cc_basename in
11034 cxx*)
11035 # FIXME: insert proper C++ library support
11036 ld_shlibs_CXX=no
11037 ;;
11038 *)
11039 # FIXME: insert proper C++ library support
11040 ld_shlibs_CXX=no
11041 ;;
11042 esac
11043 ;;
11044 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
11045 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11046 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
11047 wlarc=
11048 hardcode_libdir_flag_spec_CXX='-R$libdir'
11049 hardcode_direct_CXX=yes
11050 hardcode_shlibpath_var_CXX=no
11051 fi
11052 # Workaround some broken pre-1.5 toolchains
11053 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
11054 ;;
11055 openbsd2*)
11056 # C++ shared libraries are fairly broken
11057 ld_shlibs_CXX=no
11058 ;;
11059 openbsd*)
11060 hardcode_direct_CXX=yes
11061 hardcode_shlibpath_var_CXX=no
11062 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
11063 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11064 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11065 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
11066 export_dynamic_flag_spec_CXX='${wl}-E'
11067 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
11068 fi
11069 output_verbose_link_cmd='echo'
11070 ;;
11071 osf3*)
11072 case $cc_basename in
11073 KCC*)
11074 # Kuck and Associates, Inc. (KAI) C++ Compiler
11075
11076 # KCC will only create a shared library if the output file
11077 # ends with ".so" (or ".sl" for HP-UX), so rename the library
11078 # to its proper name (with version) after linking.
11079 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'
11080
11081 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11082 hardcode_libdir_separator_CXX=:
11083
11084 # Archives containing C++ object files must be created using
11085 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
11086 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
11087
11088 ;;
11089 RCC*)
11090 # Rational C++ 2.4.1
11091 # FIXME: insert proper C++ library support
11092 ld_shlibs_CXX=no
11093 ;;
11094 cxx*)
11095 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
11096 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'
11097
11098 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
11099 hardcode_libdir_separator_CXX=:
11100
11101 # Commands to make compiler produce verbose output that lists
11102 # what "hidden" libraries, object files and flags are used when
11103 # linking a shared library.
11104 #
11105 # There doesn't appear to be a way to prevent this compiler from
11106 # explicitly linking system object files so we need to strip them
11107 # from the output so that they don't get included in the library
11108 # dependencies.
11109 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'
11110 ;;
11111 *)
11112 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
11113 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
11114 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'
11115
11116 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
11117 hardcode_libdir_separator_CXX=:
11118
11119 # Commands to make compiler produce verbose output that lists
11120 # what "hidden" libraries, object files and flags are used when
11121 # linking a shared library.
11122 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
11123
11124 else
11125 # FIXME: insert proper C++ library support
11126 ld_shlibs_CXX=no
11127 fi
11128 ;;
11129 esac
11130 ;;
11131 osf4* | osf5*)
11132 case $cc_basename in
11133 KCC*)
11134 # Kuck and Associates, Inc. (KAI) C++ Compiler
11135
11136 # KCC will only create a shared library if the output file
11137 # ends with ".so" (or ".sl" for HP-UX), so rename the library
11138 # to its proper name (with version) after linking.
11139 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'
11140
11141 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11142 hardcode_libdir_separator_CXX=:
11143
11144 # Archives containing C++ object files must be created using
11145 # the KAI C++ compiler.
11146 old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
11147 ;;
11148 RCC*)
11149 # Rational C++ 2.4.1
11150 # FIXME: insert proper C++ library support
11151 ld_shlibs_CXX=no
11152 ;;
11153 cxx*)
11154 allow_undefined_flag_CXX=' -expect_unresolved \*'
11155 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'
11156 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
11157 echo "-hidden">> $lib.exp~
11158 $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~
11159 $rm $lib.exp'
11160
11161 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
11162 hardcode_libdir_separator_CXX=:
11163
11164 # Commands to make compiler produce verbose output that lists
11165 # what "hidden" libraries, object files and flags are used when
11166 # linking a shared library.
11167 #
11168 # There doesn't appear to be a way to prevent this compiler from
11169 # explicitly linking system object files so we need to strip them
11170 # from the output so that they don't get included in the library
11171 # dependencies.
11172 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'
11173 ;;
11174 *)
11175 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
11176 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
11177 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'
11178
11179 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
11180 hardcode_libdir_separator_CXX=:
11181
11182 # Commands to make compiler produce verbose output that lists
11183 # what "hidden" libraries, object files and flags are used when
11184 # linking a shared library.
11185 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
11186
11187 else
11188 # FIXME: insert proper C++ library support
11189 ld_shlibs_CXX=no
11190 fi
11191 ;;
11192 esac
11193 ;;
11194 psos*)
11195 # FIXME: insert proper C++ library support
11196 ld_shlibs_CXX=no
11197 ;;
11198 sco*)
11199 archive_cmds_need_lc_CXX=no
11200 case $cc_basename in
11201 CC*)
11202 # FIXME: insert proper C++ library support
11203 ld_shlibs_CXX=no
11204 ;;
11205 *)
11206 # FIXME: insert proper C++ library support
11207 ld_shlibs_CXX=no
11208 ;;
11209 esac
11210 ;;
11211 sunos4*)
11212 case $cc_basename in
11213 CC*)
11214 # Sun C++ 4.x
11215 # FIXME: insert proper C++ library support
11216 ld_shlibs_CXX=no
11217 ;;
11218 lcc*)
11219 # Lucid
11220 # FIXME: insert proper C++ library support
11221 ld_shlibs_CXX=no
11222 ;;
11223 *)
11224 # FIXME: insert proper C++ library support
11225 ld_shlibs_CXX=no
11226 ;;
11227 esac
11228 ;;
11229 solaris*)
11230 case $cc_basename in
11231 CC*)
11232 # Sun C++ 4.2, 5.x and Centerline C++
11233 archive_cmds_need_lc_CXX=yes
11234 no_undefined_flag_CXX=' -zdefs'
11235 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11236 archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11237 $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'
11238
11239 hardcode_libdir_flag_spec_CXX='-R$libdir'
11240 hardcode_shlibpath_var_CXX=no
11241 case $host_os in
11242 solaris2.[0-5] | solaris2.[0-5].*) ;;
11243 *)
11244 # The C++ compiler is used as linker so we must use $wl
11245 # flag to pass the commands to the underlying system
11246 # linker. We must also pass each convience library through
11247 # to the system linker between allextract/defaultextract.
11248 # The C++ compiler will combine linker options so we
11249 # cannot just pass the convience library names through
11250 # without $wl.
11251 # Supported since Solaris 2.6 (maybe 2.5.1?)
11252 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'
11253 ;;
11254 esac
11255 link_all_deplibs_CXX=yes
11256
11257 output_verbose_link_cmd='echo'
11258
11259 # Archives containing C++ object files must be created using
11260 # "CC -xar", where "CC" is the Sun C++ compiler. This is
11261 # necessary to make sure instantiated templates are included
11262 # in the archive.
11263 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
11264 ;;
11265 gcx*)
11266 # Green Hills C++ Compiler
11267 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
11268
11269 # The C++ compiler must be used to create the archive.
11270 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
11271 ;;
11272 *)
11273 # GNU C++ compiler with Solaris linker
11274 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
11275 no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
11276 if $CC --version | grep -v '^2\.7' > /dev/null; then
11277 archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
11278 archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11279 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
11280
11281 # Commands to make compiler produce verbose output that lists
11282 # what "hidden" libraries, object files and flags are used when
11283 # linking a shared library.
11284 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
11285 else
11286 # g++ 2.7 appears to require `-G' NOT `-shared' on this
11287 # platform.
11288 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
11289 archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11290 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
11291
11292 # Commands to make compiler produce verbose output that lists
11293 # what "hidden" libraries, object files and flags are used when
11294 # linking a shared library.
11295 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
11296 fi
11297
11298 hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
11299 fi
11300 ;;
11301 esac
11302 ;;
11303 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
11304 archive_cmds_need_lc_CXX=no
11305 ;;
11306 tandem*)
11307 case $cc_basename in
11308 NCC*)
11309 # NonStop-UX NCC 3.20
11310 # FIXME: insert proper C++ library support
11311 ld_shlibs_CXX=no
11312 ;;
11313 *)
11314 # FIXME: insert proper C++ library support
11315 ld_shlibs_CXX=no
11316 ;;
11317 esac
11318 ;;
11319 vxworks*)
11320 # FIXME: insert proper C++ library support
11321 ld_shlibs_CXX=no
11322 ;;
11323 *)
11324 # FIXME: insert proper C++ library support
11325 ld_shlibs_CXX=no
11326 ;;
11327 esac
11328 echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
11329 echo "${ECHO_T}$ld_shlibs_CXX" >&6
11330 test "$ld_shlibs_CXX" = no && can_build_shared=no
11331
11332 GCC_CXX="$GXX"
11333 LD_CXX="$LD"
11334
11335
11336 cat > conftest.$ac_ext <<EOF
11337 class Foo
11338 {
11339 public:
11340 Foo (void) { a = 0; }
11341 private:
11342 int a;
11343 };
11344 EOF
11345
11346 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11347 (eval $ac_compile) 2>&5
11348 ac_status=$?
11349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11350 (exit $ac_status); }; then
11351 # Parse the compiler output and extract the necessary
11352 # objects, libraries and library flags.
11353
11354 # Sentinel used to keep track of whether or not we are before
11355 # the conftest object file.
11356 pre_test_object_deps_done=no
11357
11358 # The `*' in the case matches for architectures that use `case' in
11359 # $output_verbose_cmd can trigger glob expansion during the loop
11360 # eval without this substitution.
11361 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
11362
11363 for p in `eval $output_verbose_link_cmd`; do
11364 case $p in
11365
11366 -L* | -R* | -l*)
11367 # Some compilers place space between "-{L,R}" and the path.
11368 # Remove the space.
11369 if test $p = "-L" \
11370 || test $p = "-R"; then
11371 prev=$p
11372 continue
11373 else
11374 prev=
11375 fi
11376
11377 if test "$pre_test_object_deps_done" = no; then
11378 case $p in
11379 -L* | -R*)
11380 # Internal compiler library paths should come after those
11381 # provided the user. The postdeps already come after the
11382 # user supplied libs so there is no need to process them.
11383 if test -z "$compiler_lib_search_path_CXX"; then
11384 compiler_lib_search_path_CXX="${prev}${p}"
11385 else
11386 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
11387 fi
11388 ;;
11389 # The "-l" case would never come before the object being
11390 # linked, so don't bother handling this case.
11391 esac
11392 else
11393 if test -z "$postdeps_CXX"; then
11394 postdeps_CXX="${prev}${p}"
11395 else
11396 postdeps_CXX="${postdeps_CXX} ${prev}${p}"
11397 fi
11398 fi
11399 ;;
11400
11401 *.$objext)
11402 # This assumes that the test object file only shows up
11403 # once in the compiler output.
11404 if test "$p" = "conftest.$objext"; then
11405 pre_test_object_deps_done=yes
11406 continue
11407 fi
11408
11409 if test "$pre_test_object_deps_done" = no; then
11410 if test -z "$predep_objects_CXX"; then
11411 predep_objects_CXX="$p"
11412 else
11413 predep_objects_CXX="$predep_objects_CXX $p"
11414 fi
11415 else
11416 if test -z "$postdep_objects_CXX"; then
11417 postdep_objects_CXX="$p"
11418 else
11419 postdep_objects_CXX="$postdep_objects_CXX $p"
11420 fi
11421 fi
11422 ;;
11423
11424 *) ;; # Ignore the rest.
11425
11426 esac
11427 done
11428
11429 # Clean up.
11430 rm -f a.out a.exe
11431 else
11432 echo "libtool.m4: error: problem compiling CXX test program"
11433 fi
11434
11435 $rm -f confest.$objext
11436
11437 # PORTME: override above test on systems where it is broken
11438 case $host_os in
11439 solaris*)
11440 case $cc_basename in
11441 CC*)
11442 # Adding this requires a known-good setup of shared libraries for
11443 # Sun compiler versions before 5.6, else PIC objects from an old
11444 # archive will be linked into the output, leading to subtle bugs.
11445 postdeps_CXX='-lCstd -lCrun'
11446 ;;
11447 esac
11448 esac
11449
11450
11451 case " $postdeps_CXX " in
11452 *" -lc "*) archive_cmds_need_lc_CXX=no ;;
11453 esac
11454
11455 lt_prog_compiler_wl_CXX=
11456 lt_prog_compiler_pic_CXX=
11457 lt_prog_compiler_static_CXX=
11458
11459 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
11460 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
11461
11462 # C++ specific cases for pic, static, wl, etc.
11463 if test "$GXX" = yes; then
11464 lt_prog_compiler_wl_CXX='-Wl,'
11465 lt_prog_compiler_static_CXX='-static'
11466
11467 case $host_os in
11468 aix*)
11469 # All AIX code is PIC.
11470 if test "$host_cpu" = ia64; then
11471 # AIX 5 now supports IA64 processor
11472 lt_prog_compiler_static_CXX='-Bstatic'
11473 fi
11474 ;;
11475 amigaos*)
11476 # FIXME: we need at least 68020 code to build shared libraries, but
11477 # adding the `-m68020' flag to GCC prevents building anything better,
11478 # like `-m68040'.
11479 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
11480 ;;
11481 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
11482 # PIC is the default for these OSes.
11483 ;;
11484 mingw* | os2* | pw32*)
11485 # This hack is so that the source file can tell whether it is being
11486 # built for inclusion in a dll (and should export symbols for example).
11487 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
11488 ;;
11489 darwin* | rhapsody*)
11490 # PIC is the default on this platform
11491 # Common symbols not allowed in MH_DYLIB files
11492 lt_prog_compiler_pic_CXX='-fno-common'
11493 ;;
11494 *djgpp*)
11495 # DJGPP does not support shared libraries at all
11496 lt_prog_compiler_pic_CXX=
11497 ;;
11498 sysv4*MP*)
11499 if test -d /usr/nec; then
11500 lt_prog_compiler_pic_CXX=-Kconform_pic
11501 fi
11502 ;;
11503 hpux*)
11504 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11505 # not for PA HP-UX.
11506 case $host_cpu in
11507 hppa*64*|ia64*)
11508 ;;
11509 *)
11510 lt_prog_compiler_pic_CXX='-fPIC'
11511 ;;
11512 esac
11513 ;;
11514 *)
11515 lt_prog_compiler_pic_CXX='-fPIC'
11516 ;;
11517 esac
11518 else
11519 case $host_os in
11520 aix4* | aix5*)
11521 # All AIX code is PIC.
11522 if test "$host_cpu" = ia64; then
11523 # AIX 5 now supports IA64 processor
11524 lt_prog_compiler_static_CXX='-Bstatic'
11525 else
11526 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
11527 fi
11528 ;;
11529 chorus*)
11530 case $cc_basename in
11531 cxch68*)
11532 # Green Hills C++ Compiler
11533 # _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"
11534 ;;
11535 esac
11536 ;;
11537 darwin*)
11538 # PIC is the default on this platform
11539 # Common symbols not allowed in MH_DYLIB files
11540 case $cc_basename in
11541 xlc*)
11542 lt_prog_compiler_pic_CXX='-qnocommon'
11543 lt_prog_compiler_wl_CXX='-Wl,'
11544 ;;
11545 esac
11546 ;;
11547 dgux*)
11548 case $cc_basename in
11549 ec++*)
11550 lt_prog_compiler_pic_CXX='-KPIC'
11551 ;;
11552 ghcx*)
11553 # Green Hills C++ Compiler
11554 lt_prog_compiler_pic_CXX='-pic'
11555 ;;
11556 *)
11557 ;;
11558 esac
11559 ;;
11560 freebsd* | kfreebsd*-gnu | dragonfly*)
11561 # FreeBSD uses GNU C++
11562 ;;
11563 hpux9* | hpux10* | hpux11*)
11564 case $cc_basename in
11565 CC*)
11566 lt_prog_compiler_wl_CXX='-Wl,'
11567 lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
11568 if test "$host_cpu" != ia64; then
11569 lt_prog_compiler_pic_CXX='+Z'
11570 fi
11571 ;;
11572 aCC*)
11573 lt_prog_compiler_wl_CXX='-Wl,'
11574 lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
11575 case $host_cpu in
11576 hppa*64*|ia64*)
11577 # +Z the default
11578 ;;
11579 *)
11580 lt_prog_compiler_pic_CXX='+Z'
11581 ;;
11582 esac
11583 ;;
11584 *)
11585 ;;
11586 esac
11587 ;;
11588 irix5* | irix6* | nonstopux*)
11589 case $cc_basename in
11590 CC*)
11591 lt_prog_compiler_wl_CXX='-Wl,'
11592 lt_prog_compiler_static_CXX='-non_shared'
11593 # CC pic flag -KPIC is the default.
11594 ;;
11595 *)
11596 ;;
11597 esac
11598 ;;
11599 linux*)
11600 case $cc_basename in
11601 KCC*)
11602 # KAI C++ Compiler
11603 lt_prog_compiler_wl_CXX='--backend -Wl,'
11604 lt_prog_compiler_pic_CXX='-fPIC'
11605 ;;
11606 icpc* | ecpc*)
11607 # Intel C++
11608 lt_prog_compiler_wl_CXX='-Wl,'
11609 lt_prog_compiler_pic_CXX='-KPIC'
11610 lt_prog_compiler_static_CXX='-static'
11611 ;;
11612 pgCC*)
11613 # Portland Group C++ compiler.
11614 lt_prog_compiler_wl_CXX='-Wl,'
11615 lt_prog_compiler_pic_CXX='-fpic'
11616 lt_prog_compiler_static_CXX='-Bstatic'
11617 ;;
11618 cxx*)
11619 # Compaq C++
11620 # Make sure the PIC flag is empty. It appears that all Alpha
11621 # Linux and Compaq Tru64 Unix objects are PIC.
11622 lt_prog_compiler_pic_CXX=
11623 lt_prog_compiler_static_CXX='-non_shared'
11624 ;;
11625 *)
11626 ;;
11627 esac
11628 ;;
11629 lynxos*)
11630 ;;
11631 m88k*)
11632 ;;
11633 mvs*)
11634 case $cc_basename in
11635 cxx*)
11636 lt_prog_compiler_pic_CXX='-W c,exportall'
11637 ;;
11638 *)
11639 ;;
11640 esac
11641 ;;
11642 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
11643 ;;
11644 osf3* | osf4* | osf5*)
11645 case $cc_basename in
11646 KCC*)
11647 lt_prog_compiler_wl_CXX='--backend -Wl,'
11648 ;;
11649 RCC*)
11650 # Rational C++ 2.4.1
11651 lt_prog_compiler_pic_CXX='-pic'
11652 ;;
11653 cxx*)
11654 # Digital/Compaq C++
11655 lt_prog_compiler_wl_CXX='-Wl,'
11656 # Make sure the PIC flag is empty. It appears that all Alpha
11657 # Linux and Compaq Tru64 Unix objects are PIC.
11658 lt_prog_compiler_pic_CXX=
11659 lt_prog_compiler_static_CXX='-non_shared'
11660 ;;
11661 *)
11662 ;;
11663 esac
11664 ;;
11665 psos*)
11666 ;;
11667 sco*)
11668 case $cc_basename in
11669 CC*)
11670 lt_prog_compiler_pic_CXX='-fPIC'
11671 ;;
11672 *)
11673 ;;
11674 esac
11675 ;;
11676 solaris*)
11677 case $cc_basename in
11678 CC*)
11679 # Sun C++ 4.2, 5.x and Centerline C++
11680 lt_prog_compiler_pic_CXX='-KPIC'
11681 lt_prog_compiler_static_CXX='-Bstatic'
11682 lt_prog_compiler_wl_CXX='-Qoption ld '
11683 ;;
11684 gcx*)
11685 # Green Hills C++ Compiler
11686 lt_prog_compiler_pic_CXX='-PIC'
11687 ;;
11688 *)
11689 ;;
11690 esac
11691 ;;
11692 sunos4*)
11693 case $cc_basename in
11694 CC*)
11695 # Sun C++ 4.x
11696 lt_prog_compiler_pic_CXX='-pic'
11697 lt_prog_compiler_static_CXX='-Bstatic'
11698 ;;
11699 lcc*)
11700 # Lucid
11701 lt_prog_compiler_pic_CXX='-pic'
11702 ;;
11703 *)
11704 ;;
11705 esac
11706 ;;
11707 tandem*)
11708 case $cc_basename in
11709 NCC*)
11710 # NonStop-UX NCC 3.20
11711 lt_prog_compiler_pic_CXX='-KPIC'
11712 ;;
11713 *)
11714 ;;
11715 esac
11716 ;;
11717 unixware*)
11718 ;;
11719 vxworks*)
11720 ;;
11721 *)
11722 lt_prog_compiler_can_build_shared_CXX=no
11723 ;;
11724 esac
11725 fi
11726
11727 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
11728 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6
11729
11730 #
11731 # Check to make sure the PIC flag actually works.
11732 #
11733 if test -n "$lt_prog_compiler_pic_CXX"; then
11734
11735 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
11736 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
11737 if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
11738 echo $ECHO_N "(cached) $ECHO_C" >&6
11739 else
11740 lt_prog_compiler_pic_works_CXX=no
11741 ac_outfile=conftest.$ac_objext
11742 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
11743 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
11744 # Insert the option either (1) after the last *FLAGS variable, or
11745 # (2) before a word containing "conftest.", or (3) at the end.
11746 # Note that $ac_compile itself does not contain backslashes and begins
11747 # with a dollar sign (not a hyphen), so the echo should work correctly.
11748 # The option is referenced via a variable to avoid confusing sed.
11749 lt_compile=`echo "$ac_compile" | $SED \
11750 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11751 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11752 -e 's:$: $lt_compiler_flag:'`
11753 (eval echo "\"\$as_me:11754: $lt_compile\"" >&5)
11754 (eval "$lt_compile" 2>conftest.err)
11755 ac_status=$?
11756 cat conftest.err >&5
11757 echo "$as_me:11758: \$? = $ac_status" >&5
11758 if (exit $ac_status) && test -s "$ac_outfile"; then
11759 # The compiler can only warn and ignore the option if not recognized
11760 # So say no if there are warnings other than the usual output.
11761 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
11762 $SED '/^$/d' conftest.err >conftest.er2
11763 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
11764 lt_prog_compiler_pic_works_CXX=yes
11765 fi
11766 fi
11767 $rm conftest*
11768
11769 fi
11770 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
11771 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6
11772
11773 if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
11774 case $lt_prog_compiler_pic_CXX in
11775 "" | " "*) ;;
11776 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
11777 esac
11778 else
11779 lt_prog_compiler_pic_CXX=
11780 lt_prog_compiler_can_build_shared_CXX=no
11781 fi
11782
11783 fi
11784 case $host_os in
11785 # For platforms which do not support PIC, -DPIC is meaningless:
11786 *djgpp*)
11787 lt_prog_compiler_pic_CXX=
11788 ;;
11789 *)
11790 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
11791 ;;
11792 esac
11793
11794 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
11795 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
11796 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
11797 echo $ECHO_N "(cached) $ECHO_C" >&6
11798 else
11799 lt_cv_prog_compiler_c_o_CXX=no
11800 $rm -r conftest 2>/dev/null
11801 mkdir conftest
11802 cd conftest
11803 mkdir out
11804 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
11805
11806 lt_compiler_flag="-o out/conftest2.$ac_objext"
11807 # Insert the option either (1) after the last *FLAGS variable, or
11808 # (2) before a word containing "conftest.", or (3) at the end.
11809 # Note that $ac_compile itself does not contain backslashes and begins
11810 # with a dollar sign (not a hyphen), so the echo should work correctly.
11811 lt_compile=`echo "$ac_compile" | $SED \
11812 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11813 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11814 -e 's:$: $lt_compiler_flag:'`
11815 (eval echo "\"\$as_me:11816: $lt_compile\"" >&5)
11816 (eval "$lt_compile" 2>out/conftest.err)
11817 ac_status=$?
11818 cat out/conftest.err >&5
11819 echo "$as_me:11820: \$? = $ac_status" >&5
11820 if (exit $ac_status) && test -s out/conftest2.$ac_objext
11821 then
11822 # The compiler can only warn and ignore the option if not recognized
11823 # So say no if there are warnings
11824 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
11825 $SED '/^$/d' out/conftest.err >out/conftest.er2
11826 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11827 lt_cv_prog_compiler_c_o_CXX=yes
11828 fi
11829 fi
11830 chmod u+w . 2>&5
11831 $rm conftest*
11832 # SGI C++ compiler will create directory out/ii_files/ for
11833 # template instantiation
11834 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
11835 $rm out/* && rmdir out
11836 cd ..
11837 rmdir conftest
11838 $rm conftest*
11839
11840 fi
11841 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
11842 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
11843
11844
11845 hard_links="nottested"
11846 if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
11847 # do not overwrite the value of need_locks provided by the user
11848 echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
11849 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
11850 hard_links=yes
11851 $rm conftest*
11852 ln conftest.a conftest.b 2>/dev/null && hard_links=no
11853 touch conftest.a
11854 ln conftest.a conftest.b 2>&5 || hard_links=no
11855 ln conftest.a conftest.b 2>/dev/null && hard_links=no
11856 echo "$as_me:$LINENO: result: $hard_links" >&5
11857 echo "${ECHO_T}$hard_links" >&6
11858 if test "$hard_links" = no; then
11859 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
11860 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
11861 need_locks=warn
11862 fi
11863 else
11864 need_locks=no
11865 fi
11866
11867 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11868 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
11869
11870 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11871 case $host_os in
11872 aix4* | aix5*)
11873 # If we're using GNU nm, then we don't want the "-C" option.
11874 # -C means demangle to AIX nm, but means don't demangle with GNU nm
11875 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
11876 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'
11877 else
11878 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'
11879 fi
11880 ;;
11881 pw32*)
11882 export_symbols_cmds_CXX="$ltdll_cmds"
11883 ;;
11884 cygwin* | mingw*)
11885 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'
11886 ;;
11887 linux*)
11888 link_all_deplibs_CXX=no
11889 ;;
11890 *)
11891 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11892 ;;
11893 esac
11894
11895 echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
11896 echo "${ECHO_T}$ld_shlibs_CXX" >&6
11897 test "$ld_shlibs_CXX" = no && can_build_shared=no
11898
11899 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
11900 if test "$GCC" = yes; then
11901 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
11902 fi
11903
11904 #
11905 # Do we need to explicitly link libc?
11906 #
11907 case "x$archive_cmds_need_lc_CXX" in
11908 x|xyes)
11909 # Assume -lc should be added
11910 archive_cmds_need_lc_CXX=yes
11911
11912 if test "$enable_shared" = yes && test "$GCC" = yes; then
11913 case $archive_cmds_CXX in
11914 *'~'*)
11915 # FIXME: we may have to deal with multi-command sequences.
11916 ;;
11917 '$CC '*)
11918 # Test whether the compiler implicitly links with -lc since on some
11919 # systems, -lgcc has to come before -lc. If gcc already passes -lc
11920 # to ld, don't add -lc before -lgcc.
11921 echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
11922 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
11923 $rm conftest*
11924 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
11925
11926 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11927 (eval $ac_compile) 2>&5
11928 ac_status=$?
11929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11930 (exit $ac_status); } 2>conftest.err; then
11931 soname=conftest
11932 lib=conftest
11933 libobjs=conftest.$ac_objext
11934 deplibs=
11935 wl=$lt_prog_compiler_wl_CXX
11936 compiler_flags=-v
11937 linker_flags=-v
11938 verstring=
11939 output_objdir=.
11940 libname=conftest
11941 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
11942 allow_undefined_flag_CXX=
11943 if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
11944 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
11945 ac_status=$?
11946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11947 (exit $ac_status); }
11948 then
11949 archive_cmds_need_lc_CXX=no
11950 else
11951 archive_cmds_need_lc_CXX=yes
11952 fi
11953 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
11954 else
11955 cat conftest.err 1>&5
11956 fi
11957 $rm conftest*
11958 echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
11959 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6
11960 ;;
11961 esac
11962 fi
11963 ;;
11964 esac
11965
11966 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
11967 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
11968 library_names_spec=
11969 libname_spec='lib$name'
11970 soname_spec=
11971 shrext_cmds=".so"
11972 postinstall_cmds=
11973 postuninstall_cmds=
11974 finish_cmds=
11975 finish_eval=
11976 shlibpath_var=
11977 shlibpath_overrides_runpath=unknown
11978 version_type=none
11979 dynamic_linker="$host_os ld.so"
11980 sys_lib_dlsearch_path_spec="/lib /usr/lib"
11981 if test "$GCC" = yes; then
11982 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
11983 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
11984 # if the path contains ";" then we assume it to be the separator
11985 # otherwise default to the standard path separator (i.e. ":") - it is
11986 # assumed that no part of a normal pathname contains ";" but that should
11987 # okay in the real world where ";" in dirpaths is itself problematic.
11988 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
11989 else
11990 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
11991 fi
11992 else
11993 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
11994 fi
11995 need_lib_prefix=unknown
11996 hardcode_into_libs=no
11997
11998 # when you set need_version to no, make sure it does not cause -set_version
11999 # flags to be left without arguments
12000 need_version=unknown
12001
12002 case $host_os in
12003 aix3*)
12004 version_type=linux
12005 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
12006 shlibpath_var=LIBPATH
12007
12008 # AIX 3 has no versioning support, so we append a major version to the name.
12009 soname_spec='${libname}${release}${shared_ext}$major'
12010 ;;
12011
12012 aix4* | aix5*)
12013 version_type=linux
12014 need_lib_prefix=no
12015 need_version=no
12016 hardcode_into_libs=yes
12017 if test "$host_cpu" = ia64; then
12018 # AIX 5 supports IA64
12019 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
12020 shlibpath_var=LD_LIBRARY_PATH
12021 else
12022 # With GCC up to 2.95.x, collect2 would create an import file
12023 # for dependence libraries. The import file would start with
12024 # the line `#! .'. This would cause the generated library to
12025 # depend on `.', always an invalid library. This was fixed in
12026 # development snapshots of GCC prior to 3.0.
12027 case $host_os in
12028 aix4 | aix4.[01] | aix4.[01].*)
12029 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12030 echo ' yes '
12031 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
12032 :
12033 else
12034 can_build_shared=no
12035 fi
12036 ;;
12037 esac
12038 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
12039 # soname into executable. Probably we can add versioning support to
12040 # collect2, so additional links can be useful in future.
12041 if test "$aix_use_runtimelinking" = yes; then
12042 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
12043 # instead of lib<name>.a to let people know that these are not
12044 # typical AIX shared libraries.
12045 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12046 else
12047 # We preserve .a as extension for shared libraries through AIX4.2
12048 # and later when we are not doing run time linking.
12049 library_names_spec='${libname}${release}.a $libname.a'
12050 soname_spec='${libname}${release}${shared_ext}$major'
12051 fi
12052 shlibpath_var=LIBPATH
12053 fi
12054 ;;
12055
12056 amigaos*)
12057 library_names_spec='$libname.ixlibrary $libname.a'
12058 # Create ${libname}_ixlibrary.a entries in /sys/libs.
12059 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'
12060 ;;
12061
12062 beos*)
12063 library_names_spec='${libname}${shared_ext}'
12064 dynamic_linker="$host_os ld.so"
12065 shlibpath_var=LIBRARY_PATH
12066 ;;
12067
12068 bsdi[45]*)
12069 version_type=linux
12070 need_version=no
12071 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12072 soname_spec='${libname}${release}${shared_ext}$major'
12073 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
12074 shlibpath_var=LD_LIBRARY_PATH
12075 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
12076 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
12077 # the default ld.so.conf also contains /usr/contrib/lib and
12078 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
12079 # libtool to hard-code these into programs
12080 ;;
12081
12082 cygwin* | mingw* | pw32*)
12083 version_type=windows
12084 shrext_cmds=".dll"
12085 need_version=no
12086 need_lib_prefix=no
12087
12088 case $GCC,$host_os in
12089 yes,cygwin* | yes,mingw* | yes,pw32*)
12090 library_names_spec='$libname.dll.a'
12091 # DLL is installed to $(libdir)/../bin by postinstall_cmds
12092 postinstall_cmds='base_file=`basename \${file}`~
12093 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
12094 dldir=$destdir/`dirname \$dlpath`~
12095 test -d \$dldir || mkdir -p \$dldir~
12096 $install_prog $dir/$dlname \$dldir/$dlname~
12097 chmod a+x \$dldir/$dlname'
12098 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12099 dlpath=$dir/\$dldll~
12100 $rm \$dlpath'
12101 shlibpath_overrides_runpath=yes
12102
12103 case $host_os in
12104 cygwin*)
12105 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
12106 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12107 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
12108 ;;
12109 mingw*)
12110 # MinGW DLLs use traditional 'lib' prefix
12111 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12112 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
12113 if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
12114 # It is most probably a Windows format PATH printed by
12115 # mingw gcc, but we are running on Cygwin. Gcc prints its search
12116 # path with ; separators, and with drive letters. We can handle the
12117 # drive letters (cygwin fileutils understands them), so leave them,
12118 # especially as we might pass files found there to a mingw objdump,
12119 # which wouldn't understand a cygwinified path. Ahh.
12120 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
12121 else
12122 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12123 fi
12124 ;;
12125 pw32*)
12126 # pw32 DLLs use 'pw' prefix rather than 'lib'
12127 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12128 ;;
12129 esac
12130 ;;
12131
12132 *)
12133 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
12134 ;;
12135 esac
12136 dynamic_linker='Win32 ld.exe'
12137 # FIXME: first we should search . and the directory the executable is in
12138 shlibpath_var=PATH
12139 ;;
12140
12141 darwin* | rhapsody*)
12142 dynamic_linker="$host_os dyld"
12143 version_type=darwin
12144 need_lib_prefix=no
12145 need_version=no
12146 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
12147 soname_spec='${libname}${release}${major}$shared_ext'
12148 shlibpath_overrides_runpath=yes
12149 shlibpath_var=DYLD_LIBRARY_PATH
12150 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
12151 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
12152 if test "$GCC" = yes; then
12153 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"`
12154 else
12155 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
12156 fi
12157 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
12158 ;;
12159
12160 dgux*)
12161 version_type=linux
12162 need_lib_prefix=no
12163 need_version=no
12164 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
12165 soname_spec='${libname}${release}${shared_ext}$major'
12166 shlibpath_var=LD_LIBRARY_PATH
12167 ;;
12168
12169 freebsd1*)
12170 dynamic_linker=no
12171 ;;
12172
12173 kfreebsd*-gnu)
12174 version_type=linux
12175 need_lib_prefix=no
12176 need_version=no
12177 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12178 soname_spec='${libname}${release}${shared_ext}$major'
12179 shlibpath_var=LD_LIBRARY_PATH
12180 shlibpath_overrides_runpath=no
12181 hardcode_into_libs=yes
12182 dynamic_linker='GNU ld.so'
12183 ;;
12184
12185 freebsd* | dragonfly*)
12186 # DragonFly does not have aout. When/if they implement a new
12187 # versioning mechanism, adjust this.
12188 if test -x /usr/bin/objformat; then
12189 objformat=`/usr/bin/objformat`
12190 else
12191 case $host_os in
12192 freebsd[123]*) objformat=aout ;;
12193 *) objformat=elf ;;
12194 esac
12195 fi
12196 version_type=freebsd-$objformat
12197 case $version_type in
12198 freebsd-elf*)
12199 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
12200 need_version=no
12201 need_lib_prefix=no
12202 ;;
12203 freebsd-*)
12204 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
12205 need_version=yes
12206 ;;
12207 esac
12208 shlibpath_var=LD_LIBRARY_PATH
12209 case $host_os in
12210 freebsd2*)
12211 shlibpath_overrides_runpath=yes
12212 ;;
12213 freebsd3.[01]* | freebsdelf3.[01]*)
12214 shlibpath_overrides_runpath=yes
12215 hardcode_into_libs=yes
12216 ;;
12217 *) # from 3.2 on
12218 shlibpath_overrides_runpath=no
12219 hardcode_into_libs=yes
12220 ;;
12221 esac
12222 ;;
12223
12224 gnu*)
12225 version_type=linux
12226 need_lib_prefix=no
12227 need_version=no
12228 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
12229 soname_spec='${libname}${release}${shared_ext}$major'
12230 shlibpath_var=LD_LIBRARY_PATH
12231 hardcode_into_libs=yes
12232 ;;
12233
12234 hpux9* | hpux10* | hpux11*)
12235 # Give a soname corresponding to the major version so that dld.sl refuses to
12236 # link against other versions.
12237 version_type=sunos
12238 need_lib_prefix=no
12239 need_version=no
12240 case $host_cpu in
12241 ia64*)
12242 shrext_cmds='.so'
12243 hardcode_into_libs=yes
12244 dynamic_linker="$host_os dld.so"
12245 shlibpath_var=LD_LIBRARY_PATH
12246 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12247 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12248 soname_spec='${libname}${release}${shared_ext}$major'
12249 if test "X$HPUX_IA64_MODE" = X32; then
12250 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
12251 else
12252 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
12253 fi
12254 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12255 ;;
12256 hppa*64*)
12257 shrext_cmds='.sl'
12258 hardcode_into_libs=yes
12259 dynamic_linker="$host_os dld.sl"
12260 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
12261 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12262 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12263 soname_spec='${libname}${release}${shared_ext}$major'
12264 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
12265 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12266 ;;
12267 *)
12268 shrext_cmds='.sl'
12269 dynamic_linker="$host_os dld.sl"
12270 shlibpath_var=SHLIB_PATH
12271 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
12272 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12273 soname_spec='${libname}${release}${shared_ext}$major'
12274 ;;
12275 esac
12276 # HP-UX runs *really* slowly unless shared libraries are mode 555.
12277 postinstall_cmds='chmod 555 $lib'
12278 ;;
12279
12280 irix5* | irix6* | nonstopux*)
12281 case $host_os in
12282 nonstopux*) version_type=nonstopux ;;
12283 *)
12284 if test "$lt_cv_prog_gnu_ld" = yes; then
12285 version_type=linux
12286 else
12287 version_type=irix
12288 fi ;;
12289 esac
12290 need_lib_prefix=no
12291 need_version=no
12292 soname_spec='${libname}${release}${shared_ext}$major'
12293 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
12294 case $host_os in
12295 irix5* | nonstopux*)
12296 libsuff= shlibsuff=
12297 ;;
12298 *)
12299 case $LD in # libtool.m4 will add one of these switches to LD
12300 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
12301 libsuff= shlibsuff= libmagic=32-bit;;
12302 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
12303 libsuff=32 shlibsuff=N32 libmagic=N32;;
12304 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
12305 libsuff=64 shlibsuff=64 libmagic=64-bit;;
12306 *) libsuff= shlibsuff= libmagic=never-match;;
12307 esac
12308 ;;
12309 esac
12310 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
12311 shlibpath_overrides_runpath=no
12312 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
12313 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
12314 hardcode_into_libs=yes
12315 ;;
12316
12317 # No shared lib support for Linux oldld, aout, or coff.
12318 linux*oldld* | linux*aout* | linux*coff*)
12319 dynamic_linker=no
12320 ;;
12321
12322 # This must be Linux ELF.
12323 linux*)
12324 version_type=linux
12325 need_lib_prefix=no
12326 need_version=no
12327 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12328 soname_spec='${libname}${release}${shared_ext}$major'
12329 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
12330 shlibpath_var=LD_LIBRARY_PATH
12331 shlibpath_overrides_runpath=no
12332 # This implies no fast_install, which is unacceptable.
12333 # Some rework will be needed to allow for fast_install
12334 # before this can be enabled.
12335 hardcode_into_libs=yes
12336
12337 # Append ld.so.conf contents to the search path
12338 if test -f /etc/ld.so.conf; then
12339 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' ' '`
12340 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
12341 fi
12342
12343 # We used to test for /lib/ld.so.1 and disable shared libraries on
12344 # powerpc, because MkLinux only supported shared libraries with the
12345 # GNU dynamic linker. Since this was broken with cross compilers,
12346 # most powerpc-linux boxes support dynamic linking these days and
12347 # people can always --disable-shared, the test was removed, and we
12348 # assume the GNU/Linux dynamic linker is in use.
12349 dynamic_linker='GNU/Linux ld.so'
12350 ;;
12351
12352 netbsdelf*-gnu)
12353 version_type=linux
12354 need_lib_prefix=no
12355 need_version=no
12356 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12357 soname_spec='${libname}${release}${shared_ext}$major'
12358 shlibpath_var=LD_LIBRARY_PATH
12359 shlibpath_overrides_runpath=no
12360 hardcode_into_libs=yes
12361 dynamic_linker='NetBSD ld.elf_so'
12362 ;;
12363
12364 knetbsd*-gnu)
12365 version_type=linux
12366 need_lib_prefix=no
12367 need_version=no
12368 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12369 soname_spec='${libname}${release}${shared_ext}$major'
12370 shlibpath_var=LD_LIBRARY_PATH
12371 shlibpath_overrides_runpath=no
12372 hardcode_into_libs=yes
12373 dynamic_linker='GNU ld.so'
12374 ;;
12375
12376 netbsd*)
12377 version_type=sunos
12378 need_lib_prefix=no
12379 need_version=no
12380 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
12381 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
12382 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12383 dynamic_linker='NetBSD (a.out) ld.so'
12384 else
12385 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12386 soname_spec='${libname}${release}${shared_ext}$major'
12387 dynamic_linker='NetBSD ld.elf_so'
12388 fi
12389 shlibpath_var=LD_LIBRARY_PATH
12390 shlibpath_overrides_runpath=yes
12391 hardcode_into_libs=yes
12392 ;;
12393
12394 newsos6)
12395 version_type=linux
12396 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12397 shlibpath_var=LD_LIBRARY_PATH
12398 shlibpath_overrides_runpath=yes
12399 ;;
12400
12401 nto-qnx*)
12402 version_type=linux
12403 need_lib_prefix=no
12404 need_version=no
12405 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12406 soname_spec='${libname}${release}${shared_ext}$major'
12407 shlibpath_var=LD_LIBRARY_PATH
12408 shlibpath_overrides_runpath=yes
12409 ;;
12410
12411 openbsd*)
12412 version_type=sunos
12413 need_lib_prefix=no
12414 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
12415 case $host_os in
12416 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
12417 *) need_version=no ;;
12418 esac
12419 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
12420 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12421 shlibpath_var=LD_LIBRARY_PATH
12422 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
12423 case $host_os in
12424 openbsd2.[89] | openbsd2.[89].*)
12425 shlibpath_overrides_runpath=no
12426 ;;
12427 *)
12428 shlibpath_overrides_runpath=yes
12429 ;;
12430 esac
12431 else
12432 shlibpath_overrides_runpath=yes
12433 fi
12434 ;;
12435
12436 os2*)
12437 libname_spec='$name'
12438 shrext_cmds=".dll"
12439 need_lib_prefix=no
12440 library_names_spec='$libname${shared_ext} $libname.a'
12441 dynamic_linker='OS/2 ld.exe'
12442 shlibpath_var=LIBPATH
12443 ;;
12444
12445 osf3* | osf4* | osf5*)
12446 version_type=osf
12447 need_lib_prefix=no
12448 need_version=no
12449 soname_spec='${libname}${release}${shared_ext}$major'
12450 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12451 shlibpath_var=LD_LIBRARY_PATH
12452 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
12453 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
12454 ;;
12455
12456 sco3.2v5*)
12457 version_type=osf
12458 soname_spec='${libname}${release}${shared_ext}$major'
12459 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12460 shlibpath_var=LD_LIBRARY_PATH
12461 ;;
12462
12463 solaris*)
12464 version_type=linux
12465 need_lib_prefix=no
12466 need_version=no
12467 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12468 soname_spec='${libname}${release}${shared_ext}$major'
12469 shlibpath_var=LD_LIBRARY_PATH
12470 shlibpath_overrides_runpath=yes
12471 hardcode_into_libs=yes
12472 # ldd complains unless libraries are executable
12473 postinstall_cmds='chmod +x $lib'
12474 ;;
12475
12476 sunos4*)
12477 version_type=sunos
12478 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
12479 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
12480 shlibpath_var=LD_LIBRARY_PATH
12481 shlibpath_overrides_runpath=yes
12482 if test "$with_gnu_ld" = yes; then
12483 need_lib_prefix=no
12484 fi
12485 need_version=yes
12486 ;;
12487
12488 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12489 version_type=linux
12490 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12491 soname_spec='${libname}${release}${shared_ext}$major'
12492 shlibpath_var=LD_LIBRARY_PATH
12493 case $host_vendor in
12494 sni)
12495 shlibpath_overrides_runpath=no
12496 need_lib_prefix=no
12497 export_dynamic_flag_spec='${wl}-Blargedynsym'
12498 runpath_var=LD_RUN_PATH
12499 ;;
12500 siemens)
12501 need_lib_prefix=no
12502 ;;
12503 motorola)
12504 need_lib_prefix=no
12505 need_version=no
12506 shlibpath_overrides_runpath=no
12507 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
12508 ;;
12509 esac
12510 ;;
12511
12512 sysv4*MP*)
12513 if test -d /usr/nec ;then
12514 version_type=linux
12515 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
12516 soname_spec='$libname${shared_ext}.$major'
12517 shlibpath_var=LD_LIBRARY_PATH
12518 fi
12519 ;;
12520
12521 uts4*)
12522 version_type=linux
12523 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12524 soname_spec='${libname}${release}${shared_ext}$major'
12525 shlibpath_var=LD_LIBRARY_PATH
12526 ;;
12527
12528 *)
12529 dynamic_linker=no
12530 ;;
12531 esac
12532 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
12533 echo "${ECHO_T}$dynamic_linker" >&6
12534 test "$dynamic_linker" = no && can_build_shared=no
12535
12536 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
12537 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
12538 hardcode_action_CXX=
12539 if test -n "$hardcode_libdir_flag_spec_CXX" || \
12540 test -n "$runpath_var_CXX" || \
12541 test "X$hardcode_automatic_CXX" = "Xyes" ; then
12542
12543 # We can hardcode non-existant directories.
12544 if test "$hardcode_direct_CXX" != no &&
12545 # If the only mechanism to avoid hardcoding is shlibpath_var, we
12546 # have to relink, otherwise we might link with an installed library
12547 # when we should be linking with a yet-to-be-installed one
12548 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
12549 test "$hardcode_minus_L_CXX" != no; then
12550 # Linking always hardcodes the temporary library directory.
12551 hardcode_action_CXX=relink
12552 else
12553 # We can link without hardcoding, and we can hardcode nonexisting dirs.
12554 hardcode_action_CXX=immediate
12555 fi
12556 else
12557 # We cannot hardcode anything, or else we can only hardcode existing
12558 # directories.
12559 hardcode_action_CXX=unsupported
12560 fi
12561 echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
12562 echo "${ECHO_T}$hardcode_action_CXX" >&6
12563
12564 if test "$hardcode_action_CXX" = relink; then
12565 # Fast installation is not supported
12566 enable_fast_install=no
12567 elif test "$shlibpath_overrides_runpath" = yes ||
12568 test "$enable_shared" = no; then
12569 # Fast installation is not necessary
12570 enable_fast_install=needless
12571 fi
12572
12573 striplib=
12574 old_striplib=
12575 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
12576 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
12577 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
12578 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
12579 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
12580 echo "$as_me:$LINENO: result: yes" >&5
12581 echo "${ECHO_T}yes" >&6
12582 else
12583 # FIXME - insert some real tests, host_os isn't really good enough
12584 case $host_os in
12585 darwin*)
12586 if test -n "$STRIP" ; then
12587 striplib="$STRIP -x"
12588 echo "$as_me:$LINENO: result: yes" >&5
12589 echo "${ECHO_T}yes" >&6
12590 else
12591 echo "$as_me:$LINENO: result: no" >&5
12592 echo "${ECHO_T}no" >&6
12593 fi
12594 ;;
12595 *)
12596 echo "$as_me:$LINENO: result: no" >&5
12597 echo "${ECHO_T}no" >&6
12598 ;;
12599 esac
12600 fi
12601
12602 if test "x$enable_dlopen" != xyes; then
12603 enable_dlopen=unknown
12604 enable_dlopen_self=unknown
12605 enable_dlopen_self_static=unknown
12606 else
12607 lt_cv_dlopen=no
12608 lt_cv_dlopen_libs=
12609
12610 case $host_os in
12611 beos*)
12612 lt_cv_dlopen="load_add_on"
12613 lt_cv_dlopen_libs=
12614 lt_cv_dlopen_self=yes
12615 ;;
12616
12617 mingw* | pw32*)
12618 lt_cv_dlopen="LoadLibrary"
12619 lt_cv_dlopen_libs=
12620 ;;
12621
12622 cygwin*)
12623 lt_cv_dlopen="dlopen"
12624 lt_cv_dlopen_libs=
12625 ;;
12626
12627 darwin*)
12628 # if libdl is installed we need to link against it
12629 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12630 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
12631 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12632 echo $ECHO_N "(cached) $ECHO_C" >&6
12633 else
12634 ac_check_lib_save_LIBS=$LIBS
12635 LIBS="-ldl $LIBS"
12636 cat >conftest.$ac_ext <<_ACEOF
12637 /* confdefs.h. */
12638 _ACEOF
12639 cat confdefs.h >>conftest.$ac_ext
12640 cat >>conftest.$ac_ext <<_ACEOF
12641 /* end confdefs.h. */
12642
12643 /* Override any gcc2 internal prototype to avoid an error. */
12644 #ifdef __cplusplus
12645 extern "C"
12646 #endif
12647 /* We use char because int might match the return type of a gcc2
12648 builtin and then its argument prototype would still apply. */
12649 char dlopen ();
12650 int
12651 main ()
12652 {
12653 dlopen ();
12654 ;
12655 return 0;
12656 }
12657 _ACEOF
12658 rm -f conftest.$ac_objext conftest$ac_exeext
12659 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12660 (eval $ac_link) 2>conftest.er1
12661 ac_status=$?
12662 grep -v '^ *+' conftest.er1 >conftest.err
12663 rm -f conftest.er1
12664 cat conftest.err >&5
12665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12666 (exit $ac_status); } &&
12667 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
12668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12669 (eval $ac_try) 2>&5
12670 ac_status=$?
12671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12672 (exit $ac_status); }; } &&
12673 { ac_try='test -s conftest$ac_exeext'
12674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12675 (eval $ac_try) 2>&5
12676 ac_status=$?
12677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12678 (exit $ac_status); }; }; then
12679 ac_cv_lib_dl_dlopen=yes
12680 else
12681 echo "$as_me: failed program was:" >&5
12682 sed 's/^/| /' conftest.$ac_ext >&5
12683
12684 ac_cv_lib_dl_dlopen=no
12685 fi
12686 rm -f conftest.err conftest.$ac_objext \
12687 conftest$ac_exeext conftest.$ac_ext
12688 LIBS=$ac_check_lib_save_LIBS
12689 fi
12690 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12691 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
12692 if test $ac_cv_lib_dl_dlopen = yes; then
12693 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
12694 else
12695
12696 lt_cv_dlopen="dyld"
12697 lt_cv_dlopen_libs=
12698 lt_cv_dlopen_self=yes
12699
12700 fi
12701
12702 ;;
12703
12704 *)
12705 echo "$as_me:$LINENO: checking for shl_load" >&5
12706 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
12707 if test "${ac_cv_func_shl_load+set}" = set; then
12708 echo $ECHO_N "(cached) $ECHO_C" >&6
12709 else
12710 cat >conftest.$ac_ext <<_ACEOF
12711 /* confdefs.h. */
12712 _ACEOF
12713 cat confdefs.h >>conftest.$ac_ext
12714 cat >>conftest.$ac_ext <<_ACEOF
12715 /* end confdefs.h. */
12716 /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
12717 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12718 #define shl_load innocuous_shl_load
12719
12720 /* System header to define __stub macros and hopefully few prototypes,
12721 which can conflict with char shl_load (); below.
12722 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12723 <limits.h> exists even on freestanding compilers. */
12724
12725 #ifdef __STDC__
12726 # include <limits.h>
12727 #else
12728 # include <assert.h>
12729 #endif
12730
12731 #undef shl_load
12732
12733 /* Override any gcc2 internal prototype to avoid an error. */
12734 #ifdef __cplusplus
12735 extern "C"
12736 {
12737 #endif
12738 /* We use char because int might match the return type of a gcc2
12739 builtin and then its argument prototype would still apply. */
12740 char shl_load ();
12741 /* The GNU C library defines this for functions which it implements
12742 to always fail with ENOSYS. Some functions are actually named
12743 something starting with __ and the normal name is an alias. */
12744 #if defined (__stub_shl_load) || defined (__stub___shl_load)
12745 choke me
12746 #else
12747 char (*f) () = shl_load;
12748 #endif
12749 #ifdef __cplusplus
12750 }
12751 #endif
12752
12753 int
12754 main ()
12755 {
12756 return f != shl_load;
12757 ;
12758 return 0;
12759 }
12760 _ACEOF
12761 rm -f conftest.$ac_objext conftest$ac_exeext
12762 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12763 (eval $ac_link) 2>conftest.er1
12764 ac_status=$?
12765 grep -v '^ *+' conftest.er1 >conftest.err
12766 rm -f conftest.er1
12767 cat conftest.err >&5
12768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12769 (exit $ac_status); } &&
12770 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
12771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12772 (eval $ac_try) 2>&5
12773 ac_status=$?
12774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12775 (exit $ac_status); }; } &&
12776 { ac_try='test -s conftest$ac_exeext'
12777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12778 (eval $ac_try) 2>&5
12779 ac_status=$?
12780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12781 (exit $ac_status); }; }; then
12782 ac_cv_func_shl_load=yes
12783 else
12784 echo "$as_me: failed program was:" >&5
12785 sed 's/^/| /' conftest.$ac_ext >&5
12786
12787 ac_cv_func_shl_load=no
12788 fi
12789 rm -f conftest.err conftest.$ac_objext \
12790 conftest$ac_exeext conftest.$ac_ext
12791 fi
12792 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
12793 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
12794 if test $ac_cv_func_shl_load = yes; then
12795 lt_cv_dlopen="shl_load"
12796 else
12797 echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12798 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
12799 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12800 echo $ECHO_N "(cached) $ECHO_C" >&6
12801 else
12802 ac_check_lib_save_LIBS=$LIBS
12803 LIBS="-ldld $LIBS"
12804 cat >conftest.$ac_ext <<_ACEOF
12805 /* confdefs.h. */
12806 _ACEOF
12807 cat confdefs.h >>conftest.$ac_ext
12808 cat >>conftest.$ac_ext <<_ACEOF
12809 /* end confdefs.h. */
12810
12811 /* Override any gcc2 internal prototype to avoid an error. */
12812 #ifdef __cplusplus
12813 extern "C"
12814 #endif
12815 /* We use char because int might match the return type of a gcc2
12816 builtin and then its argument prototype would still apply. */
12817 char shl_load ();
12818 int
12819 main ()
12820 {
12821 shl_load ();
12822 ;
12823 return 0;
12824 }
12825 _ACEOF
12826 rm -f conftest.$ac_objext conftest$ac_exeext
12827 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12828 (eval $ac_link) 2>conftest.er1
12829 ac_status=$?
12830 grep -v '^ *+' conftest.er1 >conftest.err
12831 rm -f conftest.er1
12832 cat conftest.err >&5
12833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12834 (exit $ac_status); } &&
12835 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
12836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12837 (eval $ac_try) 2>&5
12838 ac_status=$?
12839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12840 (exit $ac_status); }; } &&
12841 { ac_try='test -s conftest$ac_exeext'
12842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12843 (eval $ac_try) 2>&5
12844 ac_status=$?
12845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12846 (exit $ac_status); }; }; then
12847 ac_cv_lib_dld_shl_load=yes
12848 else
12849 echo "$as_me: failed program was:" >&5
12850 sed 's/^/| /' conftest.$ac_ext >&5
12851
12852 ac_cv_lib_dld_shl_load=no
12853 fi
12854 rm -f conftest.err conftest.$ac_objext \
12855 conftest$ac_exeext conftest.$ac_ext
12856 LIBS=$ac_check_lib_save_LIBS
12857 fi
12858 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12859 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
12860 if test $ac_cv_lib_dld_shl_load = yes; then
12861 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
12862 else
12863 echo "$as_me:$LINENO: checking for dlopen" >&5
12864 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
12865 if test "${ac_cv_func_dlopen+set}" = set; then
12866 echo $ECHO_N "(cached) $ECHO_C" >&6
12867 else
12868 cat >conftest.$ac_ext <<_ACEOF
12869 /* confdefs.h. */
12870 _ACEOF
12871 cat confdefs.h >>conftest.$ac_ext
12872 cat >>conftest.$ac_ext <<_ACEOF
12873 /* end confdefs.h. */
12874 /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
12875 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12876 #define dlopen innocuous_dlopen
12877
12878 /* System header to define __stub macros and hopefully few prototypes,
12879 which can conflict with char dlopen (); below.
12880 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12881 <limits.h> exists even on freestanding compilers. */
12882
12883 #ifdef __STDC__
12884 # include <limits.h>
12885 #else
12886 # include <assert.h>
12887 #endif
12888
12889 #undef dlopen
12890
12891 /* Override any gcc2 internal prototype to avoid an error. */
12892 #ifdef __cplusplus
12893 extern "C"
12894 {
12895 #endif
12896 /* We use char because int might match the return type of a gcc2
12897 builtin and then its argument prototype would still apply. */
12898 char dlopen ();
12899 /* The GNU C library defines this for functions which it implements
12900 to always fail with ENOSYS. Some functions are actually named
12901 something starting with __ and the normal name is an alias. */
12902 #if defined (__stub_dlopen) || defined (__stub___dlopen)
12903 choke me
12904 #else
12905 char (*f) () = dlopen;
12906 #endif
12907 #ifdef __cplusplus
12908 }
12909 #endif
12910
12911 int
12912 main ()
12913 {
12914 return f != dlopen;
12915 ;
12916 return 0;
12917 }
12918 _ACEOF
12919 rm -f conftest.$ac_objext conftest$ac_exeext
12920 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12921 (eval $ac_link) 2>conftest.er1
12922 ac_status=$?
12923 grep -v '^ *+' conftest.er1 >conftest.err
12924 rm -f conftest.er1
12925 cat conftest.err >&5
12926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12927 (exit $ac_status); } &&
12928 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
12929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12930 (eval $ac_try) 2>&5
12931 ac_status=$?
12932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12933 (exit $ac_status); }; } &&
12934 { ac_try='test -s conftest$ac_exeext'
12935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12936 (eval $ac_try) 2>&5
12937 ac_status=$?
12938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12939 (exit $ac_status); }; }; then
12940 ac_cv_func_dlopen=yes
12941 else
12942 echo "$as_me: failed program was:" >&5
12943 sed 's/^/| /' conftest.$ac_ext >&5
12944
12945 ac_cv_func_dlopen=no
12946 fi
12947 rm -f conftest.err conftest.$ac_objext \
12948 conftest$ac_exeext conftest.$ac_ext
12949 fi
12950 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
12951 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
12952 if test $ac_cv_func_dlopen = yes; then
12953 lt_cv_dlopen="dlopen"
12954 else
12955 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12956 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
12957 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12958 echo $ECHO_N "(cached) $ECHO_C" >&6
12959 else
12960 ac_check_lib_save_LIBS=$LIBS
12961 LIBS="-ldl $LIBS"
12962 cat >conftest.$ac_ext <<_ACEOF
12963 /* confdefs.h. */
12964 _ACEOF
12965 cat confdefs.h >>conftest.$ac_ext
12966 cat >>conftest.$ac_ext <<_ACEOF
12967 /* end confdefs.h. */
12968
12969 /* Override any gcc2 internal prototype to avoid an error. */
12970 #ifdef __cplusplus
12971 extern "C"
12972 #endif
12973 /* We use char because int might match the return type of a gcc2
12974 builtin and then its argument prototype would still apply. */
12975 char dlopen ();
12976 int
12977 main ()
12978 {
12979 dlopen ();
12980 ;
12981 return 0;
12982 }
12983 _ACEOF
12984 rm -f conftest.$ac_objext conftest$ac_exeext
12985 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12986 (eval $ac_link) 2>conftest.er1
12987 ac_status=$?
12988 grep -v '^ *+' conftest.er1 >conftest.err
12989 rm -f conftest.er1
12990 cat conftest.err >&5
12991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12992 (exit $ac_status); } &&
12993 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
12994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12995 (eval $ac_try) 2>&5
12996 ac_status=$?
12997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12998 (exit $ac_status); }; } &&
12999 { ac_try='test -s conftest$ac_exeext'
13000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13001 (eval $ac_try) 2>&5
13002 ac_status=$?
13003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13004 (exit $ac_status); }; }; then
13005 ac_cv_lib_dl_dlopen=yes
13006 else
13007 echo "$as_me: failed program was:" >&5
13008 sed 's/^/| /' conftest.$ac_ext >&5
13009
13010 ac_cv_lib_dl_dlopen=no
13011 fi
13012 rm -f conftest.err conftest.$ac_objext \
13013 conftest$ac_exeext conftest.$ac_ext
13014 LIBS=$ac_check_lib_save_LIBS
13015 fi
13016 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13017 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
13018 if test $ac_cv_lib_dl_dlopen = yes; then
13019 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
13020 else
13021 echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
13022 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
13023 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
13024 echo $ECHO_N "(cached) $ECHO_C" >&6
13025 else
13026 ac_check_lib_save_LIBS=$LIBS
13027 LIBS="-lsvld $LIBS"
13028 cat >conftest.$ac_ext <<_ACEOF
13029 /* confdefs.h. */
13030 _ACEOF
13031 cat confdefs.h >>conftest.$ac_ext
13032 cat >>conftest.$ac_ext <<_ACEOF
13033 /* end confdefs.h. */
13034
13035 /* Override any gcc2 internal prototype to avoid an error. */
13036 #ifdef __cplusplus
13037 extern "C"
13038 #endif
13039 /* We use char because int might match the return type of a gcc2
13040 builtin and then its argument prototype would still apply. */
13041 char dlopen ();
13042 int
13043 main ()
13044 {
13045 dlopen ();
13046 ;
13047 return 0;
13048 }
13049 _ACEOF
13050 rm -f conftest.$ac_objext conftest$ac_exeext
13051 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13052 (eval $ac_link) 2>conftest.er1
13053 ac_status=$?
13054 grep -v '^ *+' conftest.er1 >conftest.err
13055 rm -f conftest.er1
13056 cat conftest.err >&5
13057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13058 (exit $ac_status); } &&
13059 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
13060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13061 (eval $ac_try) 2>&5
13062 ac_status=$?
13063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13064 (exit $ac_status); }; } &&
13065 { ac_try='test -s conftest$ac_exeext'
13066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13067 (eval $ac_try) 2>&5
13068 ac_status=$?
13069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13070 (exit $ac_status); }; }; then
13071 ac_cv_lib_svld_dlopen=yes
13072 else
13073 echo "$as_me: failed program was:" >&5
13074 sed 's/^/| /' conftest.$ac_ext >&5
13075
13076 ac_cv_lib_svld_dlopen=no
13077 fi
13078 rm -f conftest.err conftest.$ac_objext \
13079 conftest$ac_exeext conftest.$ac_ext
13080 LIBS=$ac_check_lib_save_LIBS
13081 fi
13082 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
13083 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
13084 if test $ac_cv_lib_svld_dlopen = yes; then
13085 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
13086 else
13087 echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
13088 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
13089 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
13090 echo $ECHO_N "(cached) $ECHO_C" >&6
13091 else
13092 ac_check_lib_save_LIBS=$LIBS
13093 LIBS="-ldld $LIBS"
13094 cat >conftest.$ac_ext <<_ACEOF
13095 /* confdefs.h. */
13096 _ACEOF
13097 cat confdefs.h >>conftest.$ac_ext
13098 cat >>conftest.$ac_ext <<_ACEOF
13099 /* end confdefs.h. */
13100
13101 /* Override any gcc2 internal prototype to avoid an error. */
13102 #ifdef __cplusplus
13103 extern "C"
13104 #endif
13105 /* We use char because int might match the return type of a gcc2
13106 builtin and then its argument prototype would still apply. */
13107 char dld_link ();
13108 int
13109 main ()
13110 {
13111 dld_link ();
13112 ;
13113 return 0;
13114 }
13115 _ACEOF
13116 rm -f conftest.$ac_objext conftest$ac_exeext
13117 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13118 (eval $ac_link) 2>conftest.er1
13119 ac_status=$?
13120 grep -v '^ *+' conftest.er1 >conftest.err
13121 rm -f conftest.er1
13122 cat conftest.err >&5
13123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13124 (exit $ac_status); } &&
13125 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
13126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13127 (eval $ac_try) 2>&5
13128 ac_status=$?
13129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13130 (exit $ac_status); }; } &&
13131 { ac_try='test -s conftest$ac_exeext'
13132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13133 (eval $ac_try) 2>&5
13134 ac_status=$?
13135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13136 (exit $ac_status); }; }; then
13137 ac_cv_lib_dld_dld_link=yes
13138 else
13139 echo "$as_me: failed program was:" >&5
13140 sed 's/^/| /' conftest.$ac_ext >&5
13141
13142 ac_cv_lib_dld_dld_link=no
13143 fi
13144 rm -f conftest.err conftest.$ac_objext \
13145 conftest$ac_exeext conftest.$ac_ext
13146 LIBS=$ac_check_lib_save_LIBS
13147 fi
13148 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
13149 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
13150 if test $ac_cv_lib_dld_dld_link = yes; then
13151 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
13152 fi
13153
13154
13155 fi
13156
13157
13158 fi
13159
13160
13161 fi
13162
13163
13164 fi
13165
13166
13167 fi
13168
13169 ;;
13170 esac
13171
13172 if test "x$lt_cv_dlopen" != xno; then
13173 enable_dlopen=yes
13174 else
13175 enable_dlopen=no
13176 fi
13177
13178 case $lt_cv_dlopen in
13179 dlopen)
13180 save_CPPFLAGS="$CPPFLAGS"
13181 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
13182
13183 save_LDFLAGS="$LDFLAGS"
13184 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
13185
13186 save_LIBS="$LIBS"
13187 LIBS="$lt_cv_dlopen_libs $LIBS"
13188
13189 echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
13190 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
13191 if test "${lt_cv_dlopen_self+set}" = set; then
13192 echo $ECHO_N "(cached) $ECHO_C" >&6
13193 else
13194 if test "$cross_compiling" = yes; then :
13195 lt_cv_dlopen_self=cross
13196 else
13197 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13198 lt_status=$lt_dlunknown
13199 cat > conftest.$ac_ext <<EOF
13200 #line 13201 "configure"
13201 #include "confdefs.h"
13202
13203 #if HAVE_DLFCN_H
13204 #include <dlfcn.h>
13205 #endif
13206
13207 #include <stdio.h>
13208
13209 #ifdef RTLD_GLOBAL
13210 # define LT_DLGLOBAL RTLD_GLOBAL
13211 #else
13212 # ifdef DL_GLOBAL
13213 # define LT_DLGLOBAL DL_GLOBAL
13214 # else
13215 # define LT_DLGLOBAL 0
13216 # endif
13217 #endif
13218
13219 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
13220 find out it does not work in some platform. */
13221 #ifndef LT_DLLAZY_OR_NOW
13222 # ifdef RTLD_LAZY
13223 # define LT_DLLAZY_OR_NOW RTLD_LAZY
13224 # else
13225 # ifdef DL_LAZY
13226 # define LT_DLLAZY_OR_NOW DL_LAZY
13227 # else
13228 # ifdef RTLD_NOW
13229 # define LT_DLLAZY_OR_NOW RTLD_NOW
13230 # else
13231 # ifdef DL_NOW
13232 # define LT_DLLAZY_OR_NOW DL_NOW
13233 # else
13234 # define LT_DLLAZY_OR_NOW 0
13235 # endif
13236 # endif
13237 # endif
13238 # endif
13239 #endif
13240
13241 #ifdef __cplusplus
13242 extern "C" void exit (int);
13243 #endif
13244
13245 void fnord() { int i=42;}
13246 int main ()
13247 {
13248 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
13249 int status = $lt_dlunknown;
13250
13251 if (self)
13252 {
13253 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
13254 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
13255 /* dlclose (self); */
13256 }
13257
13258 exit (status);
13259 }
13260 EOF
13261 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13262 (eval $ac_link) 2>&5
13263 ac_status=$?
13264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13265 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
13266 (./conftest; exit; ) >&5 2>/dev/null
13267 lt_status=$?
13268 case x$lt_status in
13269 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
13270 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
13271 x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
13272 esac
13273 else :
13274 # compilation failed
13275 lt_cv_dlopen_self=no
13276 fi
13277 fi
13278 rm -fr conftest*
13279
13280
13281 fi
13282 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
13283 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
13284
13285 if test "x$lt_cv_dlopen_self" = xyes; then
13286 LDFLAGS="$LDFLAGS $link_static_flag"
13287 echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
13288 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
13289 if test "${lt_cv_dlopen_self_static+set}" = set; then
13290 echo $ECHO_N "(cached) $ECHO_C" >&6
13291 else
13292 if test "$cross_compiling" = yes; then :
13293 lt_cv_dlopen_self_static=cross
13294 else
13295 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13296 lt_status=$lt_dlunknown
13297 cat > conftest.$ac_ext <<EOF
13298 #line 13299 "configure"
13299 #include "confdefs.h"
13300
13301 #if HAVE_DLFCN_H
13302 #include <dlfcn.h>
13303 #endif
13304
13305 #include <stdio.h>
13306
13307 #ifdef RTLD_GLOBAL
13308 # define LT_DLGLOBAL RTLD_GLOBAL
13309 #else
13310 # ifdef DL_GLOBAL
13311 # define LT_DLGLOBAL DL_GLOBAL
13312 # else
13313 # define LT_DLGLOBAL 0
13314 # endif
13315 #endif
13316
13317 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
13318 find out it does not work in some platform. */
13319 #ifndef LT_DLLAZY_OR_NOW
13320 # ifdef RTLD_LAZY
13321 # define LT_DLLAZY_OR_NOW RTLD_LAZY
13322 # else
13323 # ifdef DL_LAZY
13324 # define LT_DLLAZY_OR_NOW DL_LAZY
13325 # else
13326 # ifdef RTLD_NOW
13327 # define LT_DLLAZY_OR_NOW RTLD_NOW
13328 # else
13329 # ifdef DL_NOW
13330 # define LT_DLLAZY_OR_NOW DL_NOW
13331 # else
13332 # define LT_DLLAZY_OR_NOW 0
13333 # endif
13334 # endif
13335 # endif
13336 # endif
13337 #endif
13338
13339 #ifdef __cplusplus
13340 extern "C" void exit (int);
13341 #endif
13342
13343 void fnord() { int i=42;}
13344 int main ()
13345 {
13346 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
13347 int status = $lt_dlunknown;
13348
13349 if (self)
13350 {
13351 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
13352 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
13353 /* dlclose (self); */
13354 }
13355
13356 exit (status);
13357 }
13358 EOF
13359 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13360 (eval $ac_link) 2>&5
13361 ac_status=$?
13362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13363 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
13364 (./conftest; exit; ) >&5 2>/dev/null
13365 lt_status=$?
13366 case x$lt_status in
13367 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
13368 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
13369 x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
13370 esac
13371 else :
13372 # compilation failed
13373 lt_cv_dlopen_self_static=no
13374 fi
13375 fi
13376 rm -fr conftest*
13377
13378
13379 fi
13380 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
13381 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
13382 fi
13383
13384 CPPFLAGS="$save_CPPFLAGS"
13385 LDFLAGS="$save_LDFLAGS"
13386 LIBS="$save_LIBS"
13387 ;;
13388 esac
13389
13390 case $lt_cv_dlopen_self in
13391 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
13392 *) enable_dlopen_self=unknown ;;
13393 esac
13394
13395 case $lt_cv_dlopen_self_static in
13396 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
13397 *) enable_dlopen_self_static=unknown ;;
13398 esac
13399 fi
13400
13401
13402 # The else clause should only fire when bootstrapping the
13403 # libtool distribution, otherwise you forgot to ship ltmain.sh
13404 # with your package, and you will get complaints that there are
13405 # no rules to generate ltmain.sh.
13406 if test -f "$ltmain"; then
13407 # See if we are running on zsh, and set the options which allow our commands through
13408 # without removal of \ escapes.
13409 if test -n "${ZSH_VERSION+set}" ; then
13410 setopt NO_GLOB_SUBST
13411 fi
13412 # Now quote all the things that may contain metacharacters while being
13413 # careful not to overquote the AC_SUBSTed values. We take copies of the
13414 # variables and quote the copies for generation of the libtool script.
13415 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
13416 SED SHELL STRIP \
13417 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
13418 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
13419 deplibs_check_method reload_flag reload_cmds need_locks \
13420 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
13421 lt_cv_sys_global_symbol_to_c_name_address \
13422 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
13423 old_postinstall_cmds old_postuninstall_cmds \
13424 compiler_CXX \
13425 CC_CXX \
13426 LD_CXX \
13427 lt_prog_compiler_wl_CXX \
13428 lt_prog_compiler_pic_CXX \
13429 lt_prog_compiler_static_CXX \
13430 lt_prog_compiler_no_builtin_flag_CXX \
13431 export_dynamic_flag_spec_CXX \
13432 thread_safe_flag_spec_CXX \
13433 whole_archive_flag_spec_CXX \
13434 enable_shared_with_static_runtimes_CXX \
13435 old_archive_cmds_CXX \
13436 old_archive_from_new_cmds_CXX \
13437 predep_objects_CXX \
13438 postdep_objects_CXX \
13439 predeps_CXX \
13440 postdeps_CXX \
13441 compiler_lib_search_path_CXX \
13442 archive_cmds_CXX \
13443 archive_expsym_cmds_CXX \
13444 postinstall_cmds_CXX \
13445 postuninstall_cmds_CXX \
13446 old_archive_from_expsyms_cmds_CXX \
13447 allow_undefined_flag_CXX \
13448 no_undefined_flag_CXX \
13449 export_symbols_cmds_CXX \
13450 hardcode_libdir_flag_spec_CXX \
13451 hardcode_libdir_flag_spec_ld_CXX \
13452 hardcode_libdir_separator_CXX \
13453 hardcode_automatic_CXX \
13454 module_cmds_CXX \
13455 module_expsym_cmds_CXX \
13456 lt_cv_prog_compiler_c_o_CXX \
13457 exclude_expsyms_CXX \
13458 include_expsyms_CXX; do
13459
13460 case $var in
13461 old_archive_cmds_CXX | \
13462 old_archive_from_new_cmds_CXX | \
13463 archive_cmds_CXX | \
13464 archive_expsym_cmds_CXX | \
13465 module_cmds_CXX | \
13466 module_expsym_cmds_CXX | \
13467 old_archive_from_expsyms_cmds_CXX | \
13468 export_symbols_cmds_CXX | \
13469 extract_expsyms_cmds | reload_cmds | finish_cmds | \
13470 postinstall_cmds | postuninstall_cmds | \
13471 old_postinstall_cmds | old_postuninstall_cmds | \
13472 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
13473 # Double-quote double-evaled strings.
13474 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
13475 ;;
13476 *)
13477 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
13478 ;;
13479 esac
13480 done
13481
13482 case $lt_echo in
13483 *'\$0 --fallback-echo"')
13484 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
13485 ;;
13486 esac
13487
13488 cfgfile="$ofile"
13489
13490 cat <<__EOF__ >> "$cfgfile"
13491 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
13492
13493 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13494
13495 # Shell to use when invoking shell scripts.
13496 SHELL=$lt_SHELL
13497
13498 # Whether or not to build shared libraries.
13499 build_libtool_libs=$enable_shared
13500
13501 # Whether or not to build static libraries.
13502 build_old_libs=$enable_static
13503
13504 # Whether or not to add -lc for building shared libraries.
13505 build_libtool_need_lc=$archive_cmds_need_lc_CXX
13506
13507 # Whether or not to disallow shared libs when runtime libs are static
13508 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
13509
13510 # Whether or not to optimize for fast installation.
13511 fast_install=$enable_fast_install
13512
13513 # The host system.
13514 host_alias=$host_alias
13515 host=$host
13516 host_os=$host_os
13517
13518 # The build system.
13519 build_alias=$build_alias
13520 build=$build
13521 build_os=$build_os
13522
13523 # An echo program that does not interpret backslashes.
13524 echo=$lt_echo
13525
13526 # The archiver.
13527 AR=$lt_AR
13528 AR_FLAGS=$lt_AR_FLAGS
13529
13530 # A C compiler.
13531 LTCC=$lt_LTCC
13532
13533 # A language-specific compiler.
13534 CC=$lt_compiler_CXX
13535
13536 # Is the compiler the GNU C compiler?
13537 with_gcc=$GCC_CXX
13538
13539 # An ERE matcher.
13540 EGREP=$lt_EGREP
13541
13542 # The linker used to build libraries.
13543 LD=$lt_LD_CXX
13544
13545 # Whether we need hard or soft links.
13546 LN_S=$lt_LN_S
13547
13548 # A BSD-compatible nm program.
13549 NM=$lt_NM
13550
13551 # A symbol stripping program
13552 STRIP=$lt_STRIP
13553
13554 # Used to examine libraries when file_magic_cmd begins "file"
13555 MAGIC_CMD=$MAGIC_CMD
13556
13557 # Used on cygwin: DLL creation program.
13558 DLLTOOL="$DLLTOOL"
13559
13560 # Used on cygwin: object dumper.
13561 OBJDUMP="$OBJDUMP"
13562
13563 # Used on cygwin: assembler.
13564 AS="$AS"
13565
13566 # The name of the directory that contains temporary libtool files.
13567 objdir=$objdir
13568
13569 # How to create reloadable object files.
13570 reload_flag=$lt_reload_flag
13571 reload_cmds=$lt_reload_cmds
13572
13573 # How to pass a linker flag through the compiler.
13574 wl=$lt_lt_prog_compiler_wl_CXX
13575
13576 # Object file suffix (normally "o").
13577 objext="$ac_objext"
13578
13579 # Old archive suffix (normally "a").
13580 libext="$libext"
13581
13582 # Shared library suffix (normally ".so").
13583 shrext_cmds='$shrext_cmds'
13584
13585 # Executable file suffix (normally "").
13586 exeext="$exeext"
13587
13588 # Additional compiler flags for building library objects.
13589 pic_flag=$lt_lt_prog_compiler_pic_CXX
13590 pic_mode=$pic_mode
13591
13592 # What is the maximum length of a command?
13593 max_cmd_len=$lt_cv_sys_max_cmd_len
13594
13595 # Does compiler simultaneously support -c and -o options?
13596 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
13597
13598 # Must we lock files when doing compilation?
13599 need_locks=$lt_need_locks
13600
13601 # Do we need the lib prefix for modules?
13602 need_lib_prefix=$need_lib_prefix
13603
13604 # Do we need a version for libraries?
13605 need_version=$need_version
13606
13607 # Whether dlopen is supported.
13608 dlopen_support=$enable_dlopen
13609
13610 # Whether dlopen of programs is supported.
13611 dlopen_self=$enable_dlopen_self
13612
13613 # Whether dlopen of statically linked programs is supported.
13614 dlopen_self_static=$enable_dlopen_self_static
13615
13616 # Compiler flag to prevent dynamic linking.
13617 link_static_flag=$lt_lt_prog_compiler_static_CXX
13618
13619 # Compiler flag to turn off builtin functions.
13620 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
13621
13622 # Compiler flag to allow reflexive dlopens.
13623 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
13624
13625 # Compiler flag to generate shared objects directly from archives.
13626 whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
13627
13628 # Compiler flag to generate thread-safe objects.
13629 thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
13630
13631 # Library versioning type.
13632 version_type=$version_type
13633
13634 # Format of library name prefix.
13635 libname_spec=$lt_libname_spec
13636
13637 # List of archive names. First name is the real one, the rest are links.
13638 # The last name is the one that the linker finds with -lNAME.
13639 library_names_spec=$lt_library_names_spec
13640
13641 # The coded name of the library, if different from the real name.
13642 soname_spec=$lt_soname_spec
13643
13644 # Commands used to build and install an old-style archive.
13645 RANLIB=$lt_RANLIB
13646 old_archive_cmds=$lt_old_archive_cmds_CXX
13647 old_postinstall_cmds=$lt_old_postinstall_cmds
13648 old_postuninstall_cmds=$lt_old_postuninstall_cmds
13649
13650 # Create an old-style archive from a shared archive.
13651 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
13652
13653 # Create a temporary old-style archive to link instead of a shared archive.
13654 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
13655
13656 # Commands used to build and install a shared archive.
13657 archive_cmds=$lt_archive_cmds_CXX
13658 archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
13659 postinstall_cmds=$lt_postinstall_cmds
13660 postuninstall_cmds=$lt_postuninstall_cmds
13661
13662 # Commands used to build a loadable module (assumed same as above if empty)
13663 module_cmds=$lt_module_cmds_CXX
13664 module_expsym_cmds=$lt_module_expsym_cmds_CXX
13665
13666 # Commands to strip libraries.
13667 old_striplib=$lt_old_striplib
13668 striplib=$lt_striplib
13669
13670 # Dependencies to place before the objects being linked to create a
13671 # shared library.
13672 predep_objects=$lt_predep_objects_CXX
13673
13674 # Dependencies to place after the objects being linked to create a
13675 # shared library.
13676 postdep_objects=$lt_postdep_objects_CXX
13677
13678 # Dependencies to place before the objects being linked to create a
13679 # shared library.
13680 predeps=$lt_predeps_CXX
13681
13682 # Dependencies to place after the objects being linked to create a
13683 # shared library.
13684 postdeps=$lt_postdeps_CXX
13685
13686 # The library search path used internally by the compiler when linking
13687 # a shared library.
13688 compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
13689
13690 # Method to check whether dependent libraries are shared objects.
13691 deplibs_check_method=$lt_deplibs_check_method
13692
13693 # Command to use when deplibs_check_method == file_magic.
13694 file_magic_cmd=$lt_file_magic_cmd
13695
13696 # Flag that allows shared libraries with undefined symbols to be built.
13697 allow_undefined_flag=$lt_allow_undefined_flag_CXX
13698
13699 # Flag that forces no undefined symbols.
13700 no_undefined_flag=$lt_no_undefined_flag_CXX
13701
13702 # Commands used to finish a libtool library installation in a directory.
13703 finish_cmds=$lt_finish_cmds
13704
13705 # Same as above, but a single script fragment to be evaled but not shown.
13706 finish_eval=$lt_finish_eval
13707
13708 # Take the output of nm and produce a listing of raw symbols and C names.
13709 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
13710
13711 # Transform the output of nm in a proper C declaration
13712 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
13713
13714 # Transform the output of nm in a C name address pair
13715 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
13716
13717 # This is the shared library runtime path variable.
13718 runpath_var=$runpath_var
13719
13720 # This is the shared library path variable.
13721 shlibpath_var=$shlibpath_var
13722
13723 # Is shlibpath searched before the hard-coded library search path?
13724 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
13725
13726 # How to hardcode a shared library path into an executable.
13727 hardcode_action=$hardcode_action_CXX
13728
13729 # Whether we should hardcode library paths into libraries.
13730 hardcode_into_libs=$hardcode_into_libs
13731
13732 # Flag to hardcode \$libdir into a binary during linking.
13733 # This must work even if \$libdir does not exist.
13734 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
13735
13736 # If ld is used when linking, flag to hardcode \$libdir into
13737 # a binary during linking. This must work even if \$libdir does
13738 # not exist.
13739 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
13740
13741 # Whether we need a single -rpath flag with a separated argument.
13742 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
13743
13744 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
13745 # resulting binary.
13746 hardcode_direct=$hardcode_direct_CXX
13747
13748 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
13749 # resulting binary.
13750 hardcode_minus_L=$hardcode_minus_L_CXX
13751
13752 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
13753 # the resulting binary.
13754 hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
13755
13756 # Set to yes if building a shared library automatically hardcodes DIR into the library
13757 # and all subsequent libraries and executables linked against it.
13758 hardcode_automatic=$hardcode_automatic_CXX
13759
13760 # Variables whose values should be saved in libtool wrapper scripts and
13761 # restored at relink time.
13762 variables_saved_for_relink="$variables_saved_for_relink"
13763
13764 # Whether libtool must link a program against all its dependency libraries.
13765 link_all_deplibs=$link_all_deplibs_CXX
13766
13767 # Compile-time system search path for libraries
13768 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
13769
13770 # Run-time system search path for libraries
13771 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
13772
13773 # Fix the shell variable \$srcfile for the compiler.
13774 fix_srcfile_path="$fix_srcfile_path_CXX"
13775
13776 # Set to yes if exported symbols are required.
13777 always_export_symbols=$always_export_symbols_CXX
13778
13779 # The commands to list exported symbols.
13780 export_symbols_cmds=$lt_export_symbols_cmds_CXX
13781
13782 # The commands to extract the exported symbol list from a shared archive.
13783 extract_expsyms_cmds=$lt_extract_expsyms_cmds
13784
13785 # Symbols that should not be listed in the preloaded symbols.
13786 exclude_expsyms=$lt_exclude_expsyms_CXX
13787
13788 # Symbols that must always be exported.
13789 include_expsyms=$lt_include_expsyms_CXX
13790
13791 # ### END LIBTOOL TAG CONFIG: $tagname
13792
13793 __EOF__
13794
13795
13796 else
13797 # If there is no Makefile yet, we rely on a make rule to execute
13798 # `config.status --recheck' to rerun these tests and create the
13799 # libtool script then.
13800 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
13801 if test -f "$ltmain_in"; then
13802 test -f Makefile && make "$ltmain"
13803 fi
13804 fi
13805
13806
13807 ac_ext=c
13808 ac_cpp='$CPP $CPPFLAGS'
13809 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13810 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13811 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13812
13813 CC=$lt_save_CC
13814 LDCXX=$LD
13815 LD=$lt_save_LD
13816 GCC=$lt_save_GCC
13817 with_gnu_ldcxx=$with_gnu_ld
13818 with_gnu_ld=$lt_save_with_gnu_ld
13819 lt_cv_path_LDCXX=$lt_cv_path_LD
13820 lt_cv_path_LD=$lt_save_path_LD
13821 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
13822 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
13823
13824 else
13825 tagname=""
13826 fi
13827 ;;
13828
13829 F77)
13830 if test -n "$F77" && test "X$F77" != "Xno"; then
13831
13832 ac_ext=f
13833 ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
13834 ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13835 ac_compiler_gnu=$ac_cv_f77_compiler_gnu
13836
13837
13838 archive_cmds_need_lc_F77=no
13839 allow_undefined_flag_F77=
13840 always_export_symbols_F77=no
13841 archive_expsym_cmds_F77=
13842 export_dynamic_flag_spec_F77=
13843 hardcode_direct_F77=no
13844 hardcode_libdir_flag_spec_F77=
13845 hardcode_libdir_flag_spec_ld_F77=
13846 hardcode_libdir_separator_F77=
13847 hardcode_minus_L_F77=no
13848 hardcode_automatic_F77=no
13849 module_cmds_F77=
13850 module_expsym_cmds_F77=
13851 link_all_deplibs_F77=unknown
13852 old_archive_cmds_F77=$old_archive_cmds
13853 no_undefined_flag_F77=
13854 whole_archive_flag_spec_F77=
13855 enable_shared_with_static_runtimes_F77=no
13856
13857 # Source file extension for f77 test sources.
13858 ac_ext=f
13859
13860 # Object file extension for compiled f77 test sources.
13861 objext=o
13862 objext_F77=$objext
13863
13864 # Code to be used in simple compile tests
13865 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
13866
13867 # Code to be used in simple link tests
13868 lt_simple_link_test_code=" program t\n end\n"
13869
13870 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
13871
13872 # If no C compiler was specified, use CC.
13873 LTCC=${LTCC-"$CC"}
13874
13875 # Allow CC to be a program name with arguments.
13876 compiler=$CC
13877
13878
13879 # save warnings/boilerplate of simple test code
13880 ac_outfile=conftest.$ac_objext
13881 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
13882 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
13883 _lt_compiler_boilerplate=`cat conftest.err`
13884 $rm conftest*
13885
13886 ac_outfile=conftest.$ac_objext
13887 printf "$lt_simple_link_test_code" >conftest.$ac_ext
13888 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
13889 _lt_linker_boilerplate=`cat conftest.err`
13890 $rm conftest*
13891
13892
13893 # Allow CC to be a program name with arguments.
13894 lt_save_CC="$CC"
13895 CC=${F77-"f77"}
13896 compiler=$CC
13897 compiler_F77=$CC
13898 for cc_temp in $compiler""; do
13899 case $cc_temp in
13900 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
13901 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
13902 \-*) ;;
13903 *) break;;
13904 esac
13905 done
13906 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
13907
13908
13909 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
13910 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
13911 echo "$as_me:$LINENO: result: $can_build_shared" >&5
13912 echo "${ECHO_T}$can_build_shared" >&6
13913
13914 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
13915 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
13916 test "$can_build_shared" = "no" && enable_shared=no
13917
13918 # On AIX, shared libraries and static libraries use the same namespace, and
13919 # are all built from PIC.
13920 case $host_os in
13921 aix3*)
13922 test "$enable_shared" = yes && enable_static=no
13923 if test -n "$RANLIB"; then
13924 archive_cmds="$archive_cmds~\$RANLIB \$lib"
13925 postinstall_cmds='$RANLIB $lib'
13926 fi
13927 ;;
13928 aix4* | aix5*)
13929 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
13930 test "$enable_shared" = yes && enable_static=no
13931 fi
13932 ;;
13933 esac
13934 echo "$as_me:$LINENO: result: $enable_shared" >&5
13935 echo "${ECHO_T}$enable_shared" >&6
13936
13937 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
13938 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
13939 # Make sure either enable_shared or enable_static is yes.
13940 test "$enable_shared" = yes || enable_static=yes
13941 echo "$as_me:$LINENO: result: $enable_static" >&5
13942 echo "${ECHO_T}$enable_static" >&6
13943
13944 test "$ld_shlibs_F77" = no && can_build_shared=no
13945
13946 GCC_F77="$G77"
13947 LD_F77="$LD"
13948
13949 lt_prog_compiler_wl_F77=
13950 lt_prog_compiler_pic_F77=
13951 lt_prog_compiler_static_F77=
13952
13953 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
13954 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
13955
13956 if test "$GCC" = yes; then
13957 lt_prog_compiler_wl_F77='-Wl,'
13958 lt_prog_compiler_static_F77='-static'
13959
13960 case $host_os in
13961 aix*)
13962 # All AIX code is PIC.
13963 if test "$host_cpu" = ia64; then
13964 # AIX 5 now supports IA64 processor
13965 lt_prog_compiler_static_F77='-Bstatic'
13966 fi
13967 ;;
13968
13969 amigaos*)
13970 # FIXME: we need at least 68020 code to build shared libraries, but
13971 # adding the `-m68020' flag to GCC prevents building anything better,
13972 # like `-m68040'.
13973 lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
13974 ;;
13975
13976 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
13977 # PIC is the default for these OSes.
13978 ;;
13979
13980 mingw* | pw32* | os2*)
13981 # This hack is so that the source file can tell whether it is being
13982 # built for inclusion in a dll (and should export symbols for example).
13983 lt_prog_compiler_pic_F77='-DDLL_EXPORT'
13984 ;;
13985
13986 darwin* | rhapsody*)
13987 # PIC is the default on this platform
13988 # Common symbols not allowed in MH_DYLIB files
13989 lt_prog_compiler_pic_F77='-fno-common'
13990 ;;
13991
13992 msdosdjgpp*)
13993 # Just because we use GCC doesn't mean we suddenly get shared libraries
13994 # on systems that don't support them.
13995 lt_prog_compiler_can_build_shared_F77=no
13996 enable_shared=no
13997 ;;
13998
13999 sysv4*MP*)
14000 if test -d /usr/nec; then
14001 lt_prog_compiler_pic_F77=-Kconform_pic
14002 fi
14003 ;;
14004
14005 hpux*)
14006 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
14007 # not for PA HP-UX.
14008 case $host_cpu in
14009 hppa*64*|ia64*)
14010 # +Z the default
14011 ;;
14012 *)
14013 lt_prog_compiler_pic_F77='-fPIC'
14014 ;;
14015 esac
14016 ;;
14017
14018 *)
14019 lt_prog_compiler_pic_F77='-fPIC'
14020 ;;
14021 esac
14022 else
14023 # PORTME Check for flag to pass linker flags through the system compiler.
14024 case $host_os in
14025 aix*)
14026 lt_prog_compiler_wl_F77='-Wl,'
14027 if test "$host_cpu" = ia64; then
14028 # AIX 5 now supports IA64 processor
14029 lt_prog_compiler_static_F77='-Bstatic'
14030 else
14031 lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
14032 fi
14033 ;;
14034 darwin*)
14035 # PIC is the default on this platform
14036 # Common symbols not allowed in MH_DYLIB files
14037 case $cc_basename in
14038 xlc*)
14039 lt_prog_compiler_pic_F77='-qnocommon'
14040 lt_prog_compiler_wl_F77='-Wl,'
14041 ;;
14042 esac
14043 ;;
14044
14045 mingw* | pw32* | os2*)
14046 # This hack is so that the source file can tell whether it is being
14047 # built for inclusion in a dll (and should export symbols for example).
14048 lt_prog_compiler_pic_F77='-DDLL_EXPORT'
14049 ;;
14050
14051 hpux9* | hpux10* | hpux11*)
14052 lt_prog_compiler_wl_F77='-Wl,'
14053 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
14054 # not for PA HP-UX.
14055 case $host_cpu in
14056 hppa*64*|ia64*)
14057 # +Z the default
14058 ;;
14059 *)
14060 lt_prog_compiler_pic_F77='+Z'
14061 ;;
14062 esac
14063 # Is there a better lt_prog_compiler_static that works with the bundled CC?
14064 lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
14065 ;;
14066
14067 irix5* | irix6* | nonstopux*)
14068 lt_prog_compiler_wl_F77='-Wl,'
14069 # PIC (with -KPIC) is the default.
14070 lt_prog_compiler_static_F77='-non_shared'
14071 ;;
14072
14073 newsos6)
14074 lt_prog_compiler_pic_F77='-KPIC'
14075 lt_prog_compiler_static_F77='-Bstatic'
14076 ;;
14077
14078 linux*)
14079 case $cc_basename in
14080 icc* | ecc*)
14081 lt_prog_compiler_wl_F77='-Wl,'
14082 lt_prog_compiler_pic_F77='-KPIC'
14083 lt_prog_compiler_static_F77='-static'
14084 ;;
14085 pgcc* | pgf77* | pgf90* | pgf95*)
14086 # Portland Group compilers (*not* the Pentium gcc compiler,
14087 # which looks to be a dead project)
14088 lt_prog_compiler_wl_F77='-Wl,'
14089 lt_prog_compiler_pic_F77='-fpic'
14090 lt_prog_compiler_static_F77='-Bstatic'
14091 ;;
14092 ccc*)
14093 lt_prog_compiler_wl_F77='-Wl,'
14094 # All Alpha code is PIC.
14095 lt_prog_compiler_static_F77='-non_shared'
14096 ;;
14097 esac
14098 ;;
14099
14100 osf3* | osf4* | osf5*)
14101 lt_prog_compiler_wl_F77='-Wl,'
14102 # All OSF/1 code is PIC.
14103 lt_prog_compiler_static_F77='-non_shared'
14104 ;;
14105
14106 sco3.2v5*)
14107 lt_prog_compiler_pic_F77='-Kpic'
14108 lt_prog_compiler_static_F77='-dn'
14109 ;;
14110
14111 solaris*)
14112 lt_prog_compiler_pic_F77='-KPIC'
14113 lt_prog_compiler_static_F77='-Bstatic'
14114 case $cc_basename in
14115 f77* | f90* | f95*)
14116 lt_prog_compiler_wl_F77='-Qoption ld ';;
14117 *)
14118 lt_prog_compiler_wl_F77='-Wl,';;
14119 esac
14120 ;;
14121
14122 sunos4*)
14123 lt_prog_compiler_wl_F77='-Qoption ld '
14124 lt_prog_compiler_pic_F77='-PIC'
14125 lt_prog_compiler_static_F77='-Bstatic'
14126 ;;
14127
14128 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
14129 lt_prog_compiler_wl_F77='-Wl,'
14130 lt_prog_compiler_pic_F77='-KPIC'
14131 lt_prog_compiler_static_F77='-Bstatic'
14132 ;;
14133
14134 sysv4*MP*)
14135 if test -d /usr/nec ;then
14136 lt_prog_compiler_pic_F77='-Kconform_pic'
14137 lt_prog_compiler_static_F77='-Bstatic'
14138 fi
14139 ;;
14140
14141 unicos*)
14142 lt_prog_compiler_wl_F77='-Wl,'
14143 lt_prog_compiler_can_build_shared_F77=no
14144 ;;
14145
14146 uts4*)
14147 lt_prog_compiler_pic_F77='-pic'
14148 lt_prog_compiler_static_F77='-Bstatic'
14149 ;;
14150
14151 *)
14152 lt_prog_compiler_can_build_shared_F77=no
14153 ;;
14154 esac
14155 fi
14156
14157 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
14158 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6
14159
14160 #
14161 # Check to make sure the PIC flag actually works.
14162 #
14163 if test -n "$lt_prog_compiler_pic_F77"; then
14164
14165 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
14166 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6
14167 if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
14168 echo $ECHO_N "(cached) $ECHO_C" >&6
14169 else
14170 lt_prog_compiler_pic_works_F77=no
14171 ac_outfile=conftest.$ac_objext
14172 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
14173 lt_compiler_flag="$lt_prog_compiler_pic_F77"
14174 # Insert the option either (1) after the last *FLAGS variable, or
14175 # (2) before a word containing "conftest.", or (3) at the end.
14176 # Note that $ac_compile itself does not contain backslashes and begins
14177 # with a dollar sign (not a hyphen), so the echo should work correctly.
14178 # The option is referenced via a variable to avoid confusing sed.
14179 lt_compile=`echo "$ac_compile" | $SED \
14180 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14181 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14182 -e 's:$: $lt_compiler_flag:'`
14183 (eval echo "\"\$as_me:14184: $lt_compile\"" >&5)
14184 (eval "$lt_compile" 2>conftest.err)
14185 ac_status=$?
14186 cat conftest.err >&5
14187 echo "$as_me:14188: \$? = $ac_status" >&5
14188 if (exit $ac_status) && test -s "$ac_outfile"; then
14189 # The compiler can only warn and ignore the option if not recognized
14190 # So say no if there are warnings other than the usual output.
14191 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
14192 $SED '/^$/d' conftest.err >conftest.er2
14193 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
14194 lt_prog_compiler_pic_works_F77=yes
14195 fi
14196 fi
14197 $rm conftest*
14198
14199 fi
14200 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
14201 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6
14202
14203 if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
14204 case $lt_prog_compiler_pic_F77 in
14205 "" | " "*) ;;
14206 *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
14207 esac
14208 else
14209 lt_prog_compiler_pic_F77=
14210 lt_prog_compiler_can_build_shared_F77=no
14211 fi
14212
14213 fi
14214 case $host_os in
14215 # For platforms which do not support PIC, -DPIC is meaningless:
14216 *djgpp*)
14217 lt_prog_compiler_pic_F77=
14218 ;;
14219 *)
14220 lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
14221 ;;
14222 esac
14223
14224 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
14225 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
14226 if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
14227 echo $ECHO_N "(cached) $ECHO_C" >&6
14228 else
14229 lt_cv_prog_compiler_c_o_F77=no
14230 $rm -r conftest 2>/dev/null
14231 mkdir conftest
14232 cd conftest
14233 mkdir out
14234 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
14235
14236 lt_compiler_flag="-o out/conftest2.$ac_objext"
14237 # Insert the option either (1) after the last *FLAGS variable, or
14238 # (2) before a word containing "conftest.", or (3) at the end.
14239 # Note that $ac_compile itself does not contain backslashes and begins
14240 # with a dollar sign (not a hyphen), so the echo should work correctly.
14241 lt_compile=`echo "$ac_compile" | $SED \
14242 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14243 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14244 -e 's:$: $lt_compiler_flag:'`
14245 (eval echo "\"\$as_me:14246: $lt_compile\"" >&5)
14246 (eval "$lt_compile" 2>out/conftest.err)
14247 ac_status=$?
14248 cat out/conftest.err >&5
14249 echo "$as_me:14250: \$? = $ac_status" >&5
14250 if (exit $ac_status) && test -s out/conftest2.$ac_objext
14251 then
14252 # The compiler can only warn and ignore the option if not recognized
14253 # So say no if there are warnings
14254 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
14255 $SED '/^$/d' out/conftest.err >out/conftest.er2
14256 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14257 lt_cv_prog_compiler_c_o_F77=yes
14258 fi
14259 fi
14260 chmod u+w . 2>&5
14261 $rm conftest*
14262 # SGI C++ compiler will create directory out/ii_files/ for
14263 # template instantiation
14264 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
14265 $rm out/* && rmdir out
14266 cd ..
14267 rmdir conftest
14268 $rm conftest*
14269
14270 fi
14271 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
14272 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6
14273
14274
14275 hard_links="nottested"
14276 if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
14277 # do not overwrite the value of need_locks provided by the user
14278 echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
14279 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
14280 hard_links=yes
14281 $rm conftest*
14282 ln conftest.a conftest.b 2>/dev/null && hard_links=no
14283 touch conftest.a
14284 ln conftest.a conftest.b 2>&5 || hard_links=no
14285 ln conftest.a conftest.b 2>/dev/null && hard_links=no
14286 echo "$as_me:$LINENO: result: $hard_links" >&5
14287 echo "${ECHO_T}$hard_links" >&6
14288 if test "$hard_links" = no; then
14289 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
14290 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
14291 need_locks=warn
14292 fi
14293 else
14294 need_locks=no
14295 fi
14296
14297 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
14298 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
14299
14300 runpath_var=
14301 allow_undefined_flag_F77=
14302 enable_shared_with_static_runtimes_F77=no
14303 archive_cmds_F77=
14304 archive_expsym_cmds_F77=
14305 old_archive_From_new_cmds_F77=
14306 old_archive_from_expsyms_cmds_F77=
14307 export_dynamic_flag_spec_F77=
14308 whole_archive_flag_spec_F77=
14309 thread_safe_flag_spec_F77=
14310 hardcode_libdir_flag_spec_F77=
14311 hardcode_libdir_flag_spec_ld_F77=
14312 hardcode_libdir_separator_F77=
14313 hardcode_direct_F77=no
14314 hardcode_minus_L_F77=no
14315 hardcode_shlibpath_var_F77=unsupported
14316 link_all_deplibs_F77=unknown
14317 hardcode_automatic_F77=no
14318 module_cmds_F77=
14319 module_expsym_cmds_F77=
14320 always_export_symbols_F77=no
14321 export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
14322 # include_expsyms should be a list of space-separated symbols to be *always*
14323 # included in the symbol list
14324 include_expsyms_F77=
14325 # exclude_expsyms can be an extended regexp of symbols to exclude
14326 # it will be wrapped by ` (' and `)$', so one must not match beginning or
14327 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
14328 # as well as any symbol that contains `d'.
14329 exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
14330 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
14331 # platforms (ab)use it in PIC code, but their linkers get confused if
14332 # the symbol is explicitly referenced. Since portable code cannot
14333 # rely on this symbol name, it's probably fine to never include it in
14334 # preloaded symbol tables.
14335 extract_expsyms_cmds=
14336 # Just being paranoid about ensuring that cc_basename is set.
14337 for cc_temp in $compiler""; do
14338 case $cc_temp in
14339 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
14340 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
14341 \-*) ;;
14342 *) break;;
14343 esac
14344 done
14345 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
14346
14347 case $host_os in
14348 cygwin* | mingw* | pw32*)
14349 # FIXME: the MSVC++ port hasn't been tested in a loooong time
14350 # When not using gcc, we currently assume that we are using
14351 # Microsoft Visual C++.
14352 if test "$GCC" != yes; then
14353 with_gnu_ld=no
14354 fi
14355 ;;
14356 openbsd*)
14357 with_gnu_ld=no
14358 ;;
14359 esac
14360
14361 ld_shlibs_F77=yes
14362 if test "$with_gnu_ld" = yes; then
14363 # If archive_cmds runs LD, not CC, wlarc should be empty
14364 wlarc='${wl}'
14365
14366 # Set some defaults for GNU ld with shared library support. These
14367 # are reset later if shared libraries are not supported. Putting them
14368 # here allows them to be overridden if necessary.
14369 runpath_var=LD_RUN_PATH
14370 hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
14371 export_dynamic_flag_spec_F77='${wl}--export-dynamic'
14372 # ancient GNU ld didn't support --whole-archive et. al.
14373 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
14374 whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
14375 else
14376 whole_archive_flag_spec_F77=
14377 fi
14378 supports_anon_versioning=no
14379 case `$LD -v 2>/dev/null` in
14380 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
14381 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
14382 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
14383 *\ 2.11.*) ;; # other 2.11 versions
14384 *) supports_anon_versioning=yes ;;
14385 esac
14386
14387 # See if GNU ld supports shared libraries.
14388 case $host_os in
14389 aix3* | aix4* | aix5*)
14390 # On AIX/PPC, the GNU linker is very broken
14391 if test "$host_cpu" != ia64; then
14392 ld_shlibs_F77=no
14393 cat <<EOF 1>&2
14394
14395 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
14396 *** to be unable to reliably create shared libraries on AIX.
14397 *** Therefore, libtool is disabling shared libraries support. If you
14398 *** really care for shared libraries, you may want to modify your PATH
14399 *** so that a non-GNU linker is found, and then restart.
14400
14401 EOF
14402 fi
14403 ;;
14404
14405 amigaos*)
14406 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)'
14407 hardcode_libdir_flag_spec_F77='-L$libdir'
14408 hardcode_minus_L_F77=yes
14409
14410 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
14411 # that the semantics of dynamic libraries on AmigaOS, at least up
14412 # to version 4, is to share data among multiple programs linked
14413 # with the same dynamic library. Since this doesn't match the
14414 # behavior of shared libraries on other platforms, we can't use
14415 # them.
14416 ld_shlibs_F77=no
14417 ;;
14418
14419 beos*)
14420 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14421 allow_undefined_flag_F77=unsupported
14422 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
14423 # support --undefined. This deserves some investigation. FIXME
14424 archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14425 else
14426 ld_shlibs_F77=no
14427 fi
14428 ;;
14429
14430 cygwin* | mingw* | pw32*)
14431 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
14432 # as there is no search path for DLLs.
14433 hardcode_libdir_flag_spec_F77='-L$libdir'
14434 allow_undefined_flag_F77=unsupported
14435 always_export_symbols_F77=no
14436 enable_shared_with_static_runtimes_F77=yes
14437 export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
14438
14439 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
14440 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
14441 # If the export-symbols file already is a .def file (1st line
14442 # is EXPORTS), use it as is; otherwise, prepend...
14443 archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
14444 cp $export_symbols $output_objdir/$soname.def;
14445 else
14446 echo EXPORTS > $output_objdir/$soname.def;
14447 cat $export_symbols >> $output_objdir/$soname.def;
14448 fi~
14449 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
14450 else
14451 ld_shlibs_F77=no
14452 fi
14453 ;;
14454
14455 linux*)
14456 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14457 tmp_addflag=
14458 case $cc_basename,$host_cpu in
14459 pgcc*) # Portland Group C compiler
14460 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'
14461 tmp_addflag=' $pic_flag'
14462 ;;
14463 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
14464 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'
14465 tmp_addflag=' $pic_flag -Mnomain' ;;
14466 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
14467 tmp_addflag=' -i_dynamic' ;;
14468 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
14469 tmp_addflag=' -i_dynamic -nofor_main' ;;
14470 ifc* | ifort*) # Intel Fortran compiler
14471 tmp_addflag=' -nofor_main' ;;
14472 esac
14473 archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14474
14475 if test $supports_anon_versioning = yes; then
14476 archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
14477 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
14478 $echo "local: *; };" >> $output_objdir/$libname.ver~
14479 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
14480 fi
14481 link_all_deplibs_F77=no
14482 else
14483 ld_shlibs_F77=no
14484 fi
14485 ;;
14486
14487 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
14488 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
14489 archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
14490 wlarc=
14491 else
14492 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14493 archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14494 fi
14495 ;;
14496
14497 solaris* | sysv5*)
14498 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
14499 ld_shlibs_F77=no
14500 cat <<EOF 1>&2
14501
14502 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
14503 *** create shared libraries on Solaris systems. Therefore, libtool
14504 *** is disabling shared libraries support. We urge you to upgrade GNU
14505 *** binutils to release 2.9.1 or newer. Another option is to modify
14506 *** your PATH or compiler configuration so that the native linker is
14507 *** used, and then restart.
14508
14509 EOF
14510 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14511 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14512 archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14513 else
14514 ld_shlibs_F77=no
14515 fi
14516 ;;
14517
14518 sunos4*)
14519 archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
14520 wlarc=
14521 hardcode_direct_F77=yes
14522 hardcode_shlibpath_var_F77=no
14523 ;;
14524
14525 *)
14526 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14527 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14528 archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14529 else
14530 ld_shlibs_F77=no
14531 fi
14532 ;;
14533 esac
14534
14535 if test "$ld_shlibs_F77" = no; then
14536 runpath_var=
14537 hardcode_libdir_flag_spec_F77=
14538 export_dynamic_flag_spec_F77=
14539 whole_archive_flag_spec_F77=
14540 fi
14541 else
14542 # PORTME fill in a description of your system's linker (not GNU ld)
14543 case $host_os in
14544 aix3*)
14545 allow_undefined_flag_F77=unsupported
14546 always_export_symbols_F77=yes
14547 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'
14548 # Note: this linker hardcodes the directories in LIBPATH if there
14549 # are no directories specified by -L.
14550 hardcode_minus_L_F77=yes
14551 if test "$GCC" = yes && test -z "$link_static_flag"; then
14552 # Neither direct hardcoding nor static linking is supported with a
14553 # broken collect2.
14554 hardcode_direct_F77=unsupported
14555 fi
14556 ;;
14557
14558 aix4* | aix5*)
14559 if test "$host_cpu" = ia64; then
14560 # On IA64, the linker does run time linking by default, so we don't
14561 # have to do anything special.
14562 aix_use_runtimelinking=no
14563 exp_sym_flag='-Bexport'
14564 no_entry_flag=""
14565 else
14566 # If we're using GNU nm, then we don't want the "-C" option.
14567 # -C means demangle to AIX nm, but means don't demangle with GNU nm
14568 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
14569 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'
14570 else
14571 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'
14572 fi
14573 aix_use_runtimelinking=no
14574
14575 # Test if we are trying to use run time linking or normal
14576 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
14577 # need to do runtime linking.
14578 case $host_os in aix4.[23]|aix4.[23].*|aix5*)
14579 for ld_flag in $LDFLAGS; do
14580 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
14581 aix_use_runtimelinking=yes
14582 break
14583 fi
14584 done
14585 esac
14586
14587 exp_sym_flag='-bexport'
14588 no_entry_flag='-bnoentry'
14589 fi
14590
14591 # When large executables or shared objects are built, AIX ld can
14592 # have problems creating the table of contents. If linking a library
14593 # or program results in "error TOC overflow" add -mminimal-toc to
14594 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
14595 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
14596
14597 archive_cmds_F77=''
14598 hardcode_direct_F77=yes
14599 hardcode_libdir_separator_F77=':'
14600 link_all_deplibs_F77=yes
14601
14602 if test "$GCC" = yes; then
14603 case $host_os in aix4.[012]|aix4.[012].*)
14604 # We only want to do this on AIX 4.2 and lower, the check
14605 # below for broken collect2 doesn't work under 4.3+
14606 collect2name=`${CC} -print-prog-name=collect2`
14607 if test -f "$collect2name" && \
14608 strings "$collect2name" | grep resolve_lib_name >/dev/null
14609 then
14610 # We have reworked collect2
14611 hardcode_direct_F77=yes
14612 else
14613 # We have old collect2
14614 hardcode_direct_F77=unsupported
14615 # It fails to find uninstalled libraries when the uninstalled
14616 # path is not listed in the libpath. Setting hardcode_minus_L
14617 # to unsupported forces relinking
14618 hardcode_minus_L_F77=yes
14619 hardcode_libdir_flag_spec_F77='-L$libdir'
14620 hardcode_libdir_separator_F77=
14621 fi
14622 esac
14623 shared_flag='-shared'
14624 if test "$aix_use_runtimelinking" = yes; then
14625 shared_flag="$shared_flag "'${wl}-G'
14626 fi
14627 else
14628 # not using gcc
14629 if test "$host_cpu" = ia64; then
14630 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
14631 # chokes on -Wl,-G. The following line is correct:
14632 shared_flag='-G'
14633 else
14634 if test "$aix_use_runtimelinking" = yes; then
14635 shared_flag='${wl}-G'
14636 else
14637 shared_flag='${wl}-bM:SRE'
14638 fi
14639 fi
14640 fi
14641
14642 # It seems that -bexpall does not export symbols beginning with
14643 # underscore (_), so it is better to generate a list of symbols to export.
14644 always_export_symbols_F77=yes
14645 if test "$aix_use_runtimelinking" = yes; then
14646 # Warning - without using the other runtime loading flags (-brtl),
14647 # -berok will link without error, but may produce a broken library.
14648 allow_undefined_flag_F77='-berok'
14649 # Determine the default libpath from the value encoded in an empty executable.
14650 cat >conftest.$ac_ext <<_ACEOF
14651 program main
14652
14653 end
14654 _ACEOF
14655 rm -f conftest.$ac_objext conftest$ac_exeext
14656 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14657 (eval $ac_link) 2>conftest.er1
14658 ac_status=$?
14659 grep -v '^ *+' conftest.er1 >conftest.err
14660 rm -f conftest.er1
14661 cat conftest.err >&5
14662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14663 (exit $ac_status); } &&
14664 { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
14665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14666 (eval $ac_try) 2>&5
14667 ac_status=$?
14668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14669 (exit $ac_status); }; } &&
14670 { ac_try='test -s conftest$ac_exeext'
14671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14672 (eval $ac_try) 2>&5
14673 ac_status=$?
14674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14675 (exit $ac_status); }; }; then
14676
14677 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
14678 }'`
14679 # Check for a 64-bit object if we didn't find anything.
14680 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; }
14681 }'`; fi
14682 else
14683 echo "$as_me: failed program was:" >&5
14684 sed 's/^/| /' conftest.$ac_ext >&5
14685
14686 fi
14687 rm -f conftest.err conftest.$ac_objext \
14688 conftest$ac_exeext conftest.$ac_ext
14689 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
14690
14691 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
14692 archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
14693 else
14694 if test "$host_cpu" = ia64; then
14695 hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
14696 allow_undefined_flag_F77="-z nodefs"
14697 archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
14698 else
14699 # Determine the default libpath from the value encoded in an empty executable.
14700 cat >conftest.$ac_ext <<_ACEOF
14701 program main
14702
14703 end
14704 _ACEOF
14705 rm -f conftest.$ac_objext conftest$ac_exeext
14706 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14707 (eval $ac_link) 2>conftest.er1
14708 ac_status=$?
14709 grep -v '^ *+' conftest.er1 >conftest.err
14710 rm -f conftest.er1
14711 cat conftest.err >&5
14712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14713 (exit $ac_status); } &&
14714 { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err'
14715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14716 (eval $ac_try) 2>&5
14717 ac_status=$?
14718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14719 (exit $ac_status); }; } &&
14720 { ac_try='test -s conftest$ac_exeext'
14721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14722 (eval $ac_try) 2>&5
14723 ac_status=$?
14724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14725 (exit $ac_status); }; }; then
14726
14727 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
14728 }'`
14729 # Check for a 64-bit object if we didn't find anything.
14730 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; }
14731 }'`; fi
14732 else
14733 echo "$as_me: failed program was:" >&5
14734 sed 's/^/| /' conftest.$ac_ext >&5
14735
14736 fi
14737 rm -f conftest.err conftest.$ac_objext \
14738 conftest$ac_exeext conftest.$ac_ext
14739 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
14740
14741 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
14742 # Warning - without using the other run time loading flags,
14743 # -berok will link without error, but may produce a broken library.
14744 no_undefined_flag_F77=' ${wl}-bernotok'
14745 allow_undefined_flag_F77=' ${wl}-berok'
14746 # -bexpall does not export symbols beginning with underscore (_)
14747 always_export_symbols_F77=yes
14748 # Exported symbols can be pulled into shared objects from archives
14749 whole_archive_flag_spec_F77=' '
14750 archive_cmds_need_lc_F77=yes
14751 # This is similar to how AIX traditionally builds its shared libraries.
14752 archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
14753 fi
14754 fi
14755 ;;
14756
14757 amigaos*)
14758 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)'
14759 hardcode_libdir_flag_spec_F77='-L$libdir'
14760 hardcode_minus_L_F77=yes
14761 # see comment about different semantics on the GNU ld section
14762 ld_shlibs_F77=no
14763 ;;
14764
14765 bsdi[45]*)
14766 export_dynamic_flag_spec_F77=-rdynamic
14767 ;;
14768
14769 cygwin* | mingw* | pw32*)
14770 # When not using gcc, we currently assume that we are using
14771 # Microsoft Visual C++.
14772 # hardcode_libdir_flag_spec is actually meaningless, as there is
14773 # no search path for DLLs.
14774 hardcode_libdir_flag_spec_F77=' '
14775 allow_undefined_flag_F77=unsupported
14776 # Tell ltmain to make .lib files, not .a files.
14777 libext=lib
14778 # Tell ltmain to make .dll files, not .so files.
14779 shrext_cmds=".dll"
14780 # FIXME: Setting linknames here is a bad hack.
14781 archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
14782 # The linker will automatically build a .lib file if we build a DLL.
14783 old_archive_From_new_cmds_F77='true'
14784 # FIXME: Should let the user specify the lib program.
14785 old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
14786 fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
14787 enable_shared_with_static_runtimes_F77=yes
14788 ;;
14789
14790 darwin* | rhapsody*)
14791 case $host_os in
14792 rhapsody* | darwin1.[012])
14793 allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
14794 ;;
14795 *) # Darwin 1.3 on
14796 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
14797 allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
14798 else
14799 case ${MACOSX_DEPLOYMENT_TARGET} in
14800 10.[012])
14801 allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
14802 ;;
14803 10.*)
14804 allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
14805 ;;
14806 esac
14807 fi
14808 ;;
14809 esac
14810 archive_cmds_need_lc_F77=no
14811 hardcode_direct_F77=no
14812 hardcode_automatic_F77=yes
14813 hardcode_shlibpath_var_F77=unsupported
14814 whole_archive_flag_spec_F77=''
14815 link_all_deplibs_F77=yes
14816 if test "$GCC" = yes ; then
14817 output_verbose_link_cmd='echo'
14818 archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
14819 module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
14820 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
14821 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}'
14822 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}'
14823 else
14824 case $cc_basename in
14825 xlc*)
14826 output_verbose_link_cmd='echo'
14827 archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
14828 module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
14829 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
14830 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}'
14831 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}'
14832 ;;
14833 *)
14834 ld_shlibs_F77=no
14835 ;;
14836 esac
14837 fi
14838 ;;
14839
14840 dgux*)
14841 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14842 hardcode_libdir_flag_spec_F77='-L$libdir'
14843 hardcode_shlibpath_var_F77=no
14844 ;;
14845
14846 freebsd1*)
14847 ld_shlibs_F77=no
14848 ;;
14849
14850 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14851 # support. Future versions do this automatically, but an explicit c++rt0.o
14852 # does not break anything, and helps significantly (at the cost of a little
14853 # extra space).
14854 freebsd2.2*)
14855 archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
14856 hardcode_libdir_flag_spec_F77='-R$libdir'
14857 hardcode_direct_F77=yes
14858 hardcode_shlibpath_var_F77=no
14859 ;;
14860
14861 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
14862 freebsd2*)
14863 archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
14864 hardcode_direct_F77=yes
14865 hardcode_minus_L_F77=yes
14866 hardcode_shlibpath_var_F77=no
14867 ;;
14868
14869 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
14870 freebsd* | kfreebsd*-gnu | dragonfly*)
14871 archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
14872 hardcode_libdir_flag_spec_F77='-R$libdir'
14873 hardcode_direct_F77=yes
14874 hardcode_shlibpath_var_F77=no
14875 ;;
14876
14877 hpux9*)
14878 if test "$GCC" = yes; then
14879 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'
14880 else
14881 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'
14882 fi
14883 hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
14884 hardcode_libdir_separator_F77=:
14885 hardcode_direct_F77=yes
14886
14887 # hardcode_minus_L: Not really in the search PATH,
14888 # but as the default location of the library.
14889 hardcode_minus_L_F77=yes
14890 export_dynamic_flag_spec_F77='${wl}-E'
14891 ;;
14892
14893 hpux10* | hpux11*)
14894 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
14895 case $host_cpu in
14896 hppa*64*|ia64*)
14897 archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
14898 ;;
14899 *)
14900 archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
14901 ;;
14902 esac
14903 else
14904 case $host_cpu in
14905 hppa*64*|ia64*)
14906 archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
14907 ;;
14908 *)
14909 archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
14910 ;;
14911 esac
14912 fi
14913 if test "$with_gnu_ld" = no; then
14914 case $host_cpu in
14915 hppa*64*)
14916 hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
14917 hardcode_libdir_flag_spec_ld_F77='+b $libdir'
14918 hardcode_libdir_separator_F77=:
14919 hardcode_direct_F77=no
14920 hardcode_shlibpath_var_F77=no
14921 ;;
14922 ia64*)
14923 hardcode_libdir_flag_spec_F77='-L$libdir'
14924 hardcode_direct_F77=no
14925 hardcode_shlibpath_var_F77=no
14926
14927 # hardcode_minus_L: Not really in the search PATH,
14928 # but as the default location of the library.
14929 hardcode_minus_L_F77=yes
14930 ;;
14931 *)
14932 hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
14933 hardcode_libdir_separator_F77=:
14934 hardcode_direct_F77=yes
14935 export_dynamic_flag_spec_F77='${wl}-E'
14936
14937 # hardcode_minus_L: Not really in the search PATH,
14938 # but as the default location of the library.
14939 hardcode_minus_L_F77=yes
14940 ;;
14941 esac
14942 fi
14943 ;;
14944
14945 irix5* | irix6* | nonstopux*)
14946 if test "$GCC" = yes; then
14947 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'
14948 else
14949 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'
14950 hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
14951 fi
14952 hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
14953 hardcode_libdir_separator_F77=:
14954 link_all_deplibs_F77=yes
14955 ;;
14956
14957 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
14958 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
14959 archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
14960 else
14961 archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
14962 fi
14963 hardcode_libdir_flag_spec_F77='-R$libdir'
14964 hardcode_direct_F77=yes
14965 hardcode_shlibpath_var_F77=no
14966 ;;
14967
14968 newsos6)
14969 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14970 hardcode_direct_F77=yes
14971 hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
14972 hardcode_libdir_separator_F77=:
14973 hardcode_shlibpath_var_F77=no
14974 ;;
14975
14976 openbsd*)
14977 hardcode_direct_F77=yes
14978 hardcode_shlibpath_var_F77=no
14979 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
14980 archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
14981 archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
14982 hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
14983 export_dynamic_flag_spec_F77='${wl}-E'
14984 else
14985 case $host_os in
14986 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
14987 archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
14988 hardcode_libdir_flag_spec_F77='-R$libdir'
14989 ;;
14990 *)
14991 archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
14992 hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
14993 ;;
14994 esac
14995 fi
14996 ;;
14997
14998 os2*)
14999 hardcode_libdir_flag_spec_F77='-L$libdir'
15000 hardcode_minus_L_F77=yes
15001 allow_undefined_flag_F77=unsupported
15002 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'
15003 old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
15004 ;;
15005
15006 osf3*)
15007 if test "$GCC" = yes; then
15008 allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
15009 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'
15010 else
15011 allow_undefined_flag_F77=' -expect_unresolved \*'
15012 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'
15013 fi
15014 hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
15015 hardcode_libdir_separator_F77=:
15016 ;;
15017
15018 osf4* | osf5*) # as osf3* with the addition of -msym flag
15019 if test "$GCC" = yes; then
15020 allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
15021 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'
15022 hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
15023 else
15024 allow_undefined_flag_F77=' -expect_unresolved \*'
15025 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'
15026 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~
15027 $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'
15028
15029 # Both c and cxx compiler support -rpath directly
15030 hardcode_libdir_flag_spec_F77='-rpath $libdir'
15031 fi
15032 hardcode_libdir_separator_F77=:
15033 ;;
15034
15035 sco3.2v5*)
15036 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15037 hardcode_shlibpath_var_F77=no
15038 export_dynamic_flag_spec_F77='${wl}-Bexport'
15039 runpath_var=LD_RUN_PATH
15040 hardcode_runpath_var=yes
15041 ;;
15042
15043 solaris*)
15044 no_undefined_flag_F77=' -z text'
15045 if test "$GCC" = yes; then
15046 wlarc='${wl}'
15047 archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15048 archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
15049 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
15050 else
15051 wlarc=''
15052 archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
15053 archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
15054 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
15055 fi
15056 hardcode_libdir_flag_spec_F77='-R$libdir'
15057 hardcode_shlibpath_var_F77=no
15058 case $host_os in
15059 solaris2.[0-5] | solaris2.[0-5].*) ;;
15060 *)
15061 # The compiler driver will combine linker options so we
15062 # cannot just pass the convience library names through
15063 # without $wl, iff we do not link with $LD.
15064 # Luckily, gcc supports the same syntax we need for Sun Studio.
15065 # Supported since Solaris 2.6 (maybe 2.5.1?)
15066 case $wlarc in
15067 '')
15068 whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
15069 *)
15070 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' ;;
15071 esac ;;
15072 esac
15073 link_all_deplibs_F77=yes
15074 ;;
15075
15076 sunos4*)
15077 if test "x$host_vendor" = xsequent; then
15078 # Use $CC to link under sequent, because it throws in some extra .o
15079 # files that make .init and .fini sections work.
15080 archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
15081 else
15082 archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
15083 fi
15084 hardcode_libdir_flag_spec_F77='-L$libdir'
15085 hardcode_direct_F77=yes
15086 hardcode_minus_L_F77=yes
15087 hardcode_shlibpath_var_F77=no
15088 ;;
15089
15090 sysv4)
15091 case $host_vendor in
15092 sni)
15093 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15094 hardcode_direct_F77=yes # is this really true???
15095 ;;
15096 siemens)
15097 ## LD is ld it makes a PLAMLIB
15098 ## CC just makes a GrossModule.
15099 archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
15100 reload_cmds_F77='$CC -r -o $output$reload_objs'
15101 hardcode_direct_F77=no
15102 ;;
15103 motorola)
15104 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15105 hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
15106 ;;
15107 esac
15108 runpath_var='LD_RUN_PATH'
15109 hardcode_shlibpath_var_F77=no
15110 ;;
15111
15112 sysv4.3*)
15113 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15114 hardcode_shlibpath_var_F77=no
15115 export_dynamic_flag_spec_F77='-Bexport'
15116 ;;
15117
15118 sysv4*MP*)
15119 if test -d /usr/nec; then
15120 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15121 hardcode_shlibpath_var_F77=no
15122 runpath_var=LD_RUN_PATH
15123 hardcode_runpath_var=yes
15124 ld_shlibs_F77=yes
15125 fi
15126 ;;
15127
15128 sysv4.2uw2*)
15129 archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
15130 hardcode_direct_F77=yes
15131 hardcode_minus_L_F77=no
15132 hardcode_shlibpath_var_F77=no
15133 hardcode_runpath_var=yes
15134 runpath_var=LD_RUN_PATH
15135 ;;
15136
15137 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
15138 no_undefined_flag_F77='${wl}-z ${wl}text'
15139 if test "$GCC" = yes; then
15140 archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15141 else
15142 archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15143 fi
15144 runpath_var='LD_RUN_PATH'
15145 hardcode_shlibpath_var_F77=no
15146 ;;
15147
15148 sysv5*)
15149 no_undefined_flag_F77=' -z text'
15150 # $CC -shared without GNU ld will not create a library from C++
15151 # object files and a static libstdc++, better avoid it by now
15152 archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
15153 archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
15154 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
15155 hardcode_libdir_flag_spec_F77=
15156 hardcode_shlibpath_var_F77=no
15157 runpath_var='LD_RUN_PATH'
15158 ;;
15159
15160 uts4*)
15161 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15162 hardcode_libdir_flag_spec_F77='-L$libdir'
15163 hardcode_shlibpath_var_F77=no
15164 ;;
15165
15166 *)
15167 ld_shlibs_F77=no
15168 ;;
15169 esac
15170 fi
15171
15172 echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
15173 echo "${ECHO_T}$ld_shlibs_F77" >&6
15174 test "$ld_shlibs_F77" = no && can_build_shared=no
15175
15176 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
15177 if test "$GCC" = yes; then
15178 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
15179 fi
15180
15181 #
15182 # Do we need to explicitly link libc?
15183 #
15184 case "x$archive_cmds_need_lc_F77" in
15185 x|xyes)
15186 # Assume -lc should be added
15187 archive_cmds_need_lc_F77=yes
15188
15189 if test "$enable_shared" = yes && test "$GCC" = yes; then
15190 case $archive_cmds_F77 in
15191 *'~'*)
15192 # FIXME: we may have to deal with multi-command sequences.
15193 ;;
15194 '$CC '*)
15195 # Test whether the compiler implicitly links with -lc since on some
15196 # systems, -lgcc has to come before -lc. If gcc already passes -lc
15197 # to ld, don't add -lc before -lgcc.
15198 echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
15199 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
15200 $rm conftest*
15201 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
15202
15203 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15204 (eval $ac_compile) 2>&5
15205 ac_status=$?
15206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15207 (exit $ac_status); } 2>conftest.err; then
15208 soname=conftest
15209 lib=conftest
15210 libobjs=conftest.$ac_objext
15211 deplibs=
15212 wl=$lt_prog_compiler_wl_F77
15213 compiler_flags=-v
15214 linker_flags=-v
15215 verstring=
15216 output_objdir=.
15217 libname=conftest
15218 lt_save_allow_undefined_flag=$allow_undefined_flag_F77
15219 allow_undefined_flag_F77=
15220 if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
15221 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
15222 ac_status=$?
15223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15224 (exit $ac_status); }
15225 then
15226 archive_cmds_need_lc_F77=no
15227 else
15228 archive_cmds_need_lc_F77=yes
15229 fi
15230 allow_undefined_flag_F77=$lt_save_allow_undefined_flag
15231 else
15232 cat conftest.err 1>&5
15233 fi
15234 $rm conftest*
15235 echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
15236 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6
15237 ;;
15238 esac
15239 fi
15240 ;;
15241 esac
15242
15243 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
15244 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
15245 library_names_spec=
15246 libname_spec='lib$name'
15247 soname_spec=
15248 shrext_cmds=".so"
15249 postinstall_cmds=
15250 postuninstall_cmds=
15251 finish_cmds=
15252 finish_eval=
15253 shlibpath_var=
15254 shlibpath_overrides_runpath=unknown
15255 version_type=none
15256 dynamic_linker="$host_os ld.so"
15257 sys_lib_dlsearch_path_spec="/lib /usr/lib"
15258 if test "$GCC" = yes; then
15259 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
15260 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
15261 # if the path contains ";" then we assume it to be the separator
15262 # otherwise default to the standard path separator (i.e. ":") - it is
15263 # assumed that no part of a normal pathname contains ";" but that should
15264 # okay in the real world where ";" in dirpaths is itself problematic.
15265 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
15266 else
15267 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
15268 fi
15269 else
15270 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
15271 fi
15272 need_lib_prefix=unknown
15273 hardcode_into_libs=no
15274
15275 # when you set need_version to no, make sure it does not cause -set_version
15276 # flags to be left without arguments
15277 need_version=unknown
15278
15279 case $host_os in
15280 aix3*)
15281 version_type=linux
15282 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
15283 shlibpath_var=LIBPATH
15284
15285 # AIX 3 has no versioning support, so we append a major version to the name.
15286 soname_spec='${libname}${release}${shared_ext}$major'
15287 ;;
15288
15289 aix4* | aix5*)
15290 version_type=linux
15291 need_lib_prefix=no
15292 need_version=no
15293 hardcode_into_libs=yes
15294 if test "$host_cpu" = ia64; then
15295 # AIX 5 supports IA64
15296 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
15297 shlibpath_var=LD_LIBRARY_PATH
15298 else
15299 # With GCC up to 2.95.x, collect2 would create an import file
15300 # for dependence libraries. The import file would start with
15301 # the line `#! .'. This would cause the generated library to
15302 # depend on `.', always an invalid library. This was fixed in
15303 # development snapshots of GCC prior to 3.0.
15304 case $host_os in
15305 aix4 | aix4.[01] | aix4.[01].*)
15306 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
15307 echo ' yes '
15308 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
15309 :
15310 else
15311 can_build_shared=no
15312 fi
15313 ;;
15314 esac
15315 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
15316 # soname into executable. Probably we can add versioning support to
15317 # collect2, so additional links can be useful in future.
15318 if test "$aix_use_runtimelinking" = yes; then
15319 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
15320 # instead of lib<name>.a to let people know that these are not
15321 # typical AIX shared libraries.
15322 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15323 else
15324 # We preserve .a as extension for shared libraries through AIX4.2
15325 # and later when we are not doing run time linking.
15326 library_names_spec='${libname}${release}.a $libname.a'
15327 soname_spec='${libname}${release}${shared_ext}$major'
15328 fi
15329 shlibpath_var=LIBPATH
15330 fi
15331 ;;
15332
15333 amigaos*)
15334 library_names_spec='$libname.ixlibrary $libname.a'
15335 # Create ${libname}_ixlibrary.a entries in /sys/libs.
15336 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'
15337 ;;
15338
15339 beos*)
15340 library_names_spec='${libname}${shared_ext}'
15341 dynamic_linker="$host_os ld.so"
15342 shlibpath_var=LIBRARY_PATH
15343 ;;
15344
15345 bsdi[45]*)
15346 version_type=linux
15347 need_version=no
15348 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15349 soname_spec='${libname}${release}${shared_ext}$major'
15350 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
15351 shlibpath_var=LD_LIBRARY_PATH
15352 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
15353 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
15354 # the default ld.so.conf also contains /usr/contrib/lib and
15355 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
15356 # libtool to hard-code these into programs
15357 ;;
15358
15359 cygwin* | mingw* | pw32*)
15360 version_type=windows
15361 shrext_cmds=".dll"
15362 need_version=no
15363 need_lib_prefix=no
15364
15365 case $GCC,$host_os in
15366 yes,cygwin* | yes,mingw* | yes,pw32*)
15367 library_names_spec='$libname.dll.a'
15368 # DLL is installed to $(libdir)/../bin by postinstall_cmds
15369 postinstall_cmds='base_file=`basename \${file}`~
15370 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
15371 dldir=$destdir/`dirname \$dlpath`~
15372 test -d \$dldir || mkdir -p \$dldir~
15373 $install_prog $dir/$dlname \$dldir/$dlname~
15374 chmod a+x \$dldir/$dlname'
15375 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
15376 dlpath=$dir/\$dldll~
15377 $rm \$dlpath'
15378 shlibpath_overrides_runpath=yes
15379
15380 case $host_os in
15381 cygwin*)
15382 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
15383 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15384 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
15385 ;;
15386 mingw*)
15387 # MinGW DLLs use traditional 'lib' prefix
15388 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15389 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
15390 if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
15391 # It is most probably a Windows format PATH printed by
15392 # mingw gcc, but we are running on Cygwin. Gcc prints its search
15393 # path with ; separators, and with drive letters. We can handle the
15394 # drive letters (cygwin fileutils understands them), so leave them,
15395 # especially as we might pass files found there to a mingw objdump,
15396 # which wouldn't understand a cygwinified path. Ahh.
15397 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
15398 else
15399 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
15400 fi
15401 ;;
15402 pw32*)
15403 # pw32 DLLs use 'pw' prefix rather than 'lib'
15404 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15405 ;;
15406 esac
15407 ;;
15408
15409 *)
15410 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
15411 ;;
15412 esac
15413 dynamic_linker='Win32 ld.exe'
15414 # FIXME: first we should search . and the directory the executable is in
15415 shlibpath_var=PATH
15416 ;;
15417
15418 darwin* | rhapsody*)
15419 dynamic_linker="$host_os dyld"
15420 version_type=darwin
15421 need_lib_prefix=no
15422 need_version=no
15423 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
15424 soname_spec='${libname}${release}${major}$shared_ext'
15425 shlibpath_overrides_runpath=yes
15426 shlibpath_var=DYLD_LIBRARY_PATH
15427 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
15428 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
15429 if test "$GCC" = yes; then
15430 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"`
15431 else
15432 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
15433 fi
15434 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
15435 ;;
15436
15437 dgux*)
15438 version_type=linux
15439 need_lib_prefix=no
15440 need_version=no
15441 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
15442 soname_spec='${libname}${release}${shared_ext}$major'
15443 shlibpath_var=LD_LIBRARY_PATH
15444 ;;
15445
15446 freebsd1*)
15447 dynamic_linker=no
15448 ;;
15449
15450 kfreebsd*-gnu)
15451 version_type=linux
15452 need_lib_prefix=no
15453 need_version=no
15454 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15455 soname_spec='${libname}${release}${shared_ext}$major'
15456 shlibpath_var=LD_LIBRARY_PATH
15457 shlibpath_overrides_runpath=no
15458 hardcode_into_libs=yes
15459 dynamic_linker='GNU ld.so'
15460 ;;
15461
15462 freebsd* | dragonfly*)
15463 # DragonFly does not have aout. When/if they implement a new
15464 # versioning mechanism, adjust this.
15465 if test -x /usr/bin/objformat; then
15466 objformat=`/usr/bin/objformat`
15467 else
15468 case $host_os in
15469 freebsd[123]*) objformat=aout ;;
15470 *) objformat=elf ;;
15471 esac
15472 fi
15473 version_type=freebsd-$objformat
15474 case $version_type in
15475 freebsd-elf*)
15476 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
15477 need_version=no
15478 need_lib_prefix=no
15479 ;;
15480 freebsd-*)
15481 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
15482 need_version=yes
15483 ;;
15484 esac
15485 shlibpath_var=LD_LIBRARY_PATH
15486 case $host_os in
15487 freebsd2*)
15488 shlibpath_overrides_runpath=yes
15489 ;;
15490 freebsd3.[01]* | freebsdelf3.[01]*)
15491 shlibpath_overrides_runpath=yes
15492 hardcode_into_libs=yes
15493 ;;
15494 *) # from 3.2 on
15495 shlibpath_overrides_runpath=no
15496 hardcode_into_libs=yes
15497 ;;
15498 esac
15499 ;;
15500
15501 gnu*)
15502 version_type=linux
15503 need_lib_prefix=no
15504 need_version=no
15505 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
15506 soname_spec='${libname}${release}${shared_ext}$major'
15507 shlibpath_var=LD_LIBRARY_PATH
15508 hardcode_into_libs=yes
15509 ;;
15510
15511 hpux9* | hpux10* | hpux11*)
15512 # Give a soname corresponding to the major version so that dld.sl refuses to
15513 # link against other versions.
15514 version_type=sunos
15515 need_lib_prefix=no
15516 need_version=no
15517 case $host_cpu in
15518 ia64*)
15519 shrext_cmds='.so'
15520 hardcode_into_libs=yes
15521 dynamic_linker="$host_os dld.so"
15522 shlibpath_var=LD_LIBRARY_PATH
15523 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15524 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15525 soname_spec='${libname}${release}${shared_ext}$major'
15526 if test "X$HPUX_IA64_MODE" = X32; then
15527 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
15528 else
15529 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
15530 fi
15531 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15532 ;;
15533 hppa*64*)
15534 shrext_cmds='.sl'
15535 hardcode_into_libs=yes
15536 dynamic_linker="$host_os dld.sl"
15537 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
15538 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15539 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15540 soname_spec='${libname}${release}${shared_ext}$major'
15541 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
15542 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15543 ;;
15544 *)
15545 shrext_cmds='.sl'
15546 dynamic_linker="$host_os dld.sl"
15547 shlibpath_var=SHLIB_PATH
15548 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
15549 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15550 soname_spec='${libname}${release}${shared_ext}$major'
15551 ;;
15552 esac
15553 # HP-UX runs *really* slowly unless shared libraries are mode 555.
15554 postinstall_cmds='chmod 555 $lib'
15555 ;;
15556
15557 irix5* | irix6* | nonstopux*)
15558 case $host_os in
15559 nonstopux*) version_type=nonstopux ;;
15560 *)
15561 if test "$lt_cv_prog_gnu_ld" = yes; then
15562 version_type=linux
15563 else
15564 version_type=irix
15565 fi ;;
15566 esac
15567 need_lib_prefix=no
15568 need_version=no
15569 soname_spec='${libname}${release}${shared_ext}$major'
15570 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
15571 case $host_os in
15572 irix5* | nonstopux*)
15573 libsuff= shlibsuff=
15574 ;;
15575 *)
15576 case $LD in # libtool.m4 will add one of these switches to LD
15577 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
15578 libsuff= shlibsuff= libmagic=32-bit;;
15579 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
15580 libsuff=32 shlibsuff=N32 libmagic=N32;;
15581 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
15582 libsuff=64 shlibsuff=64 libmagic=64-bit;;
15583 *) libsuff= shlibsuff= libmagic=never-match;;
15584 esac
15585 ;;
15586 esac
15587 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
15588 shlibpath_overrides_runpath=no
15589 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
15590 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
15591 hardcode_into_libs=yes
15592 ;;
15593
15594 # No shared lib support for Linux oldld, aout, or coff.
15595 linux*oldld* | linux*aout* | linux*coff*)
15596 dynamic_linker=no
15597 ;;
15598
15599 # This must be Linux ELF.
15600 linux*)
15601 version_type=linux
15602 need_lib_prefix=no
15603 need_version=no
15604 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15605 soname_spec='${libname}${release}${shared_ext}$major'
15606 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
15607 shlibpath_var=LD_LIBRARY_PATH
15608 shlibpath_overrides_runpath=no
15609 # This implies no fast_install, which is unacceptable.
15610 # Some rework will be needed to allow for fast_install
15611 # before this can be enabled.
15612 hardcode_into_libs=yes
15613
15614 # Append ld.so.conf contents to the search path
15615 if test -f /etc/ld.so.conf; then
15616 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' ' '`
15617 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
15618 fi
15619
15620 # We used to test for /lib/ld.so.1 and disable shared libraries on
15621 # powerpc, because MkLinux only supported shared libraries with the
15622 # GNU dynamic linker. Since this was broken with cross compilers,
15623 # most powerpc-linux boxes support dynamic linking these days and
15624 # people can always --disable-shared, the test was removed, and we
15625 # assume the GNU/Linux dynamic linker is in use.
15626 dynamic_linker='GNU/Linux ld.so'
15627 ;;
15628
15629 netbsdelf*-gnu)
15630 version_type=linux
15631 need_lib_prefix=no
15632 need_version=no
15633 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15634 soname_spec='${libname}${release}${shared_ext}$major'
15635 shlibpath_var=LD_LIBRARY_PATH
15636 shlibpath_overrides_runpath=no
15637 hardcode_into_libs=yes
15638 dynamic_linker='NetBSD ld.elf_so'
15639 ;;
15640
15641 knetbsd*-gnu)
15642 version_type=linux
15643 need_lib_prefix=no
15644 need_version=no
15645 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15646 soname_spec='${libname}${release}${shared_ext}$major'
15647 shlibpath_var=LD_LIBRARY_PATH
15648 shlibpath_overrides_runpath=no
15649 hardcode_into_libs=yes
15650 dynamic_linker='GNU ld.so'
15651 ;;
15652
15653 netbsd*)
15654 version_type=sunos
15655 need_lib_prefix=no
15656 need_version=no
15657 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
15658 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
15659 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
15660 dynamic_linker='NetBSD (a.out) ld.so'
15661 else
15662 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15663 soname_spec='${libname}${release}${shared_ext}$major'
15664 dynamic_linker='NetBSD ld.elf_so'
15665 fi
15666 shlibpath_var=LD_LIBRARY_PATH
15667 shlibpath_overrides_runpath=yes
15668 hardcode_into_libs=yes
15669 ;;
15670
15671 newsos6)
15672 version_type=linux
15673 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15674 shlibpath_var=LD_LIBRARY_PATH
15675 shlibpath_overrides_runpath=yes
15676 ;;
15677
15678 nto-qnx*)
15679 version_type=linux
15680 need_lib_prefix=no
15681 need_version=no
15682 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15683 soname_spec='${libname}${release}${shared_ext}$major'
15684 shlibpath_var=LD_LIBRARY_PATH
15685 shlibpath_overrides_runpath=yes
15686 ;;
15687
15688 openbsd*)
15689 version_type=sunos
15690 need_lib_prefix=no
15691 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
15692 case $host_os in
15693 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
15694 *) need_version=no ;;
15695 esac
15696 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
15697 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
15698 shlibpath_var=LD_LIBRARY_PATH
15699 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
15700 case $host_os in
15701 openbsd2.[89] | openbsd2.[89].*)
15702 shlibpath_overrides_runpath=no
15703 ;;
15704 *)
15705 shlibpath_overrides_runpath=yes
15706 ;;
15707 esac
15708 else
15709 shlibpath_overrides_runpath=yes
15710 fi
15711 ;;
15712
15713 os2*)
15714 libname_spec='$name'
15715 shrext_cmds=".dll"
15716 need_lib_prefix=no
15717 library_names_spec='$libname${shared_ext} $libname.a'
15718 dynamic_linker='OS/2 ld.exe'
15719 shlibpath_var=LIBPATH
15720 ;;
15721
15722 osf3* | osf4* | osf5*)
15723 version_type=osf
15724 need_lib_prefix=no
15725 need_version=no
15726 soname_spec='${libname}${release}${shared_ext}$major'
15727 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15728 shlibpath_var=LD_LIBRARY_PATH
15729 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
15730 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
15731 ;;
15732
15733 sco3.2v5*)
15734 version_type=osf
15735 soname_spec='${libname}${release}${shared_ext}$major'
15736 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15737 shlibpath_var=LD_LIBRARY_PATH
15738 ;;
15739
15740 solaris*)
15741 version_type=linux
15742 need_lib_prefix=no
15743 need_version=no
15744 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15745 soname_spec='${libname}${release}${shared_ext}$major'
15746 shlibpath_var=LD_LIBRARY_PATH
15747 shlibpath_overrides_runpath=yes
15748 hardcode_into_libs=yes
15749 # ldd complains unless libraries are executable
15750 postinstall_cmds='chmod +x $lib'
15751 ;;
15752
15753 sunos4*)
15754 version_type=sunos
15755 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
15756 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
15757 shlibpath_var=LD_LIBRARY_PATH
15758 shlibpath_overrides_runpath=yes
15759 if test "$with_gnu_ld" = yes; then
15760 need_lib_prefix=no
15761 fi
15762 need_version=yes
15763 ;;
15764
15765 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
15766 version_type=linux
15767 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15768 soname_spec='${libname}${release}${shared_ext}$major'
15769 shlibpath_var=LD_LIBRARY_PATH
15770 case $host_vendor in
15771 sni)
15772 shlibpath_overrides_runpath=no
15773 need_lib_prefix=no
15774 export_dynamic_flag_spec='${wl}-Blargedynsym'
15775 runpath_var=LD_RUN_PATH
15776 ;;
15777 siemens)
15778 need_lib_prefix=no
15779 ;;
15780 motorola)
15781 need_lib_prefix=no
15782 need_version=no
15783 shlibpath_overrides_runpath=no
15784 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
15785 ;;
15786 esac
15787 ;;
15788
15789 sysv4*MP*)
15790 if test -d /usr/nec ;then
15791 version_type=linux
15792 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
15793 soname_spec='$libname${shared_ext}.$major'
15794 shlibpath_var=LD_LIBRARY_PATH
15795 fi
15796 ;;
15797
15798 uts4*)
15799 version_type=linux
15800 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15801 soname_spec='${libname}${release}${shared_ext}$major'
15802 shlibpath_var=LD_LIBRARY_PATH
15803 ;;
15804
15805 *)
15806 dynamic_linker=no
15807 ;;
15808 esac
15809 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
15810 echo "${ECHO_T}$dynamic_linker" >&6
15811 test "$dynamic_linker" = no && can_build_shared=no
15812
15813 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
15814 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
15815 hardcode_action_F77=
15816 if test -n "$hardcode_libdir_flag_spec_F77" || \
15817 test -n "$runpath_var_F77" || \
15818 test "X$hardcode_automatic_F77" = "Xyes" ; then
15819
15820 # We can hardcode non-existant directories.
15821 if test "$hardcode_direct_F77" != no &&
15822 # If the only mechanism to avoid hardcoding is shlibpath_var, we
15823 # have to relink, otherwise we might link with an installed library
15824 # when we should be linking with a yet-to-be-installed one
15825 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
15826 test "$hardcode_minus_L_F77" != no; then
15827 # Linking always hardcodes the temporary library directory.
15828 hardcode_action_F77=relink
15829 else
15830 # We can link without hardcoding, and we can hardcode nonexisting dirs.
15831 hardcode_action_F77=immediate
15832 fi
15833 else
15834 # We cannot hardcode anything, or else we can only hardcode existing
15835 # directories.
15836 hardcode_action_F77=unsupported
15837 fi
15838 echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
15839 echo "${ECHO_T}$hardcode_action_F77" >&6
15840
15841 if test "$hardcode_action_F77" = relink; then
15842 # Fast installation is not supported
15843 enable_fast_install=no
15844 elif test "$shlibpath_overrides_runpath" = yes ||
15845 test "$enable_shared" = no; then
15846 # Fast installation is not necessary
15847 enable_fast_install=needless
15848 fi
15849
15850 striplib=
15851 old_striplib=
15852 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
15853 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
15854 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
15855 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
15856 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
15857 echo "$as_me:$LINENO: result: yes" >&5
15858 echo "${ECHO_T}yes" >&6
15859 else
15860 # FIXME - insert some real tests, host_os isn't really good enough
15861 case $host_os in
15862 darwin*)
15863 if test -n "$STRIP" ; then
15864 striplib="$STRIP -x"
15865 echo "$as_me:$LINENO: result: yes" >&5
15866 echo "${ECHO_T}yes" >&6
15867 else
15868 echo "$as_me:$LINENO: result: no" >&5
15869 echo "${ECHO_T}no" >&6
15870 fi
15871 ;;
15872 *)
15873 echo "$as_me:$LINENO: result: no" >&5
15874 echo "${ECHO_T}no" >&6
15875 ;;
15876 esac
15877 fi
15878
15879
15880
15881 # The else clause should only fire when bootstrapping the
15882 # libtool distribution, otherwise you forgot to ship ltmain.sh
15883 # with your package, and you will get complaints that there are
15884 # no rules to generate ltmain.sh.
15885 if test -f "$ltmain"; then
15886 # See if we are running on zsh, and set the options which allow our commands through
15887 # without removal of \ escapes.
15888 if test -n "${ZSH_VERSION+set}" ; then
15889 setopt NO_GLOB_SUBST
15890 fi
15891 # Now quote all the things that may contain metacharacters while being
15892 # careful not to overquote the AC_SUBSTed values. We take copies of the
15893 # variables and quote the copies for generation of the libtool script.
15894 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
15895 SED SHELL STRIP \
15896 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
15897 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
15898 deplibs_check_method reload_flag reload_cmds need_locks \
15899 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
15900 lt_cv_sys_global_symbol_to_c_name_address \
15901 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
15902 old_postinstall_cmds old_postuninstall_cmds \
15903 compiler_F77 \
15904 CC_F77 \
15905 LD_F77 \
15906 lt_prog_compiler_wl_F77 \
15907 lt_prog_compiler_pic_F77 \
15908 lt_prog_compiler_static_F77 \
15909 lt_prog_compiler_no_builtin_flag_F77 \
15910 export_dynamic_flag_spec_F77 \
15911 thread_safe_flag_spec_F77 \
15912 whole_archive_flag_spec_F77 \
15913 enable_shared_with_static_runtimes_F77 \
15914 old_archive_cmds_F77 \
15915 old_archive_from_new_cmds_F77 \
15916 predep_objects_F77 \
15917 postdep_objects_F77 \
15918 predeps_F77 \
15919 postdeps_F77 \
15920 compiler_lib_search_path_F77 \
15921 archive_cmds_F77 \
15922 archive_expsym_cmds_F77 \
15923 postinstall_cmds_F77 \
15924 postuninstall_cmds_F77 \
15925 old_archive_from_expsyms_cmds_F77 \
15926 allow_undefined_flag_F77 \
15927 no_undefined_flag_F77 \
15928 export_symbols_cmds_F77 \
15929 hardcode_libdir_flag_spec_F77 \
15930 hardcode_libdir_flag_spec_ld_F77 \
15931 hardcode_libdir_separator_F77 \
15932 hardcode_automatic_F77 \
15933 module_cmds_F77 \
15934 module_expsym_cmds_F77 \
15935 lt_cv_prog_compiler_c_o_F77 \
15936 exclude_expsyms_F77 \
15937 include_expsyms_F77; do
15938
15939 case $var in
15940 old_archive_cmds_F77 | \
15941 old_archive_from_new_cmds_F77 | \
15942 archive_cmds_F77 | \
15943 archive_expsym_cmds_F77 | \
15944 module_cmds_F77 | \
15945 module_expsym_cmds_F77 | \
15946 old_archive_from_expsyms_cmds_F77 | \
15947 export_symbols_cmds_F77 | \
15948 extract_expsyms_cmds | reload_cmds | finish_cmds | \
15949 postinstall_cmds | postuninstall_cmds | \
15950 old_postinstall_cmds | old_postuninstall_cmds | \
15951 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
15952 # Double-quote double-evaled strings.
15953 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
15954 ;;
15955 *)
15956 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
15957 ;;
15958 esac
15959 done
15960
15961 case $lt_echo in
15962 *'\$0 --fallback-echo"')
15963 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
15964 ;;
15965 esac
15966
15967 cfgfile="$ofile"
15968
15969 cat <<__EOF__ >> "$cfgfile"
15970 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
15971
15972 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15973
15974 # Shell to use when invoking shell scripts.
15975 SHELL=$lt_SHELL
15976
15977 # Whether or not to build shared libraries.
15978 build_libtool_libs=$enable_shared
15979
15980 # Whether or not to build static libraries.
15981 build_old_libs=$enable_static
15982
15983 # Whether or not to add -lc for building shared libraries.
15984 build_libtool_need_lc=$archive_cmds_need_lc_F77
15985
15986 # Whether or not to disallow shared libs when runtime libs are static
15987 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
15988
15989 # Whether or not to optimize for fast installation.
15990 fast_install=$enable_fast_install
15991
15992 # The host system.
15993 host_alias=$host_alias
15994 host=$host
15995 host_os=$host_os
15996
15997 # The build system.
15998 build_alias=$build_alias
15999 build=$build
16000 build_os=$build_os
16001
16002 # An echo program that does not interpret backslashes.
16003 echo=$lt_echo
16004
16005 # The archiver.
16006 AR=$lt_AR
16007 AR_FLAGS=$lt_AR_FLAGS
16008
16009 # A C compiler.
16010 LTCC=$lt_LTCC
16011
16012 # A language-specific compiler.
16013 CC=$lt_compiler_F77
16014
16015 # Is the compiler the GNU C compiler?
16016 with_gcc=$GCC_F77
16017
16018 # An ERE matcher.
16019 EGREP=$lt_EGREP
16020
16021 # The linker used to build libraries.
16022 LD=$lt_LD_F77
16023
16024 # Whether we need hard or soft links.
16025 LN_S=$lt_LN_S
16026
16027 # A BSD-compatible nm program.
16028 NM=$lt_NM
16029
16030 # A symbol stripping program
16031 STRIP=$lt_STRIP
16032
16033 # Used to examine libraries when file_magic_cmd begins "file"
16034 MAGIC_CMD=$MAGIC_CMD
16035
16036 # Used on cygwin: DLL creation program.
16037 DLLTOOL="$DLLTOOL"
16038
16039 # Used on cygwin: object dumper.
16040 OBJDUMP="$OBJDUMP"
16041
16042 # Used on cygwin: assembler.
16043 AS="$AS"
16044
16045 # The name of the directory that contains temporary libtool files.
16046 objdir=$objdir
16047
16048 # How to create reloadable object files.
16049 reload_flag=$lt_reload_flag
16050 reload_cmds=$lt_reload_cmds
16051
16052 # How to pass a linker flag through the compiler.
16053 wl=$lt_lt_prog_compiler_wl_F77
16054
16055 # Object file suffix (normally "o").
16056 objext="$ac_objext"
16057
16058 # Old archive suffix (normally "a").
16059 libext="$libext"
16060
16061 # Shared library suffix (normally ".so").
16062 shrext_cmds='$shrext_cmds'
16063
16064 # Executable file suffix (normally "").
16065 exeext="$exeext"
16066
16067 # Additional compiler flags for building library objects.
16068 pic_flag=$lt_lt_prog_compiler_pic_F77
16069 pic_mode=$pic_mode
16070
16071 # What is the maximum length of a command?
16072 max_cmd_len=$lt_cv_sys_max_cmd_len
16073
16074 # Does compiler simultaneously support -c and -o options?
16075 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
16076
16077 # Must we lock files when doing compilation?
16078 need_locks=$lt_need_locks
16079
16080 # Do we need the lib prefix for modules?
16081 need_lib_prefix=$need_lib_prefix
16082
16083 # Do we need a version for libraries?
16084 need_version=$need_version
16085
16086 # Whether dlopen is supported.
16087 dlopen_support=$enable_dlopen
16088
16089 # Whether dlopen of programs is supported.
16090 dlopen_self=$enable_dlopen_self
16091
16092 # Whether dlopen of statically linked programs is supported.
16093 dlopen_self_static=$enable_dlopen_self_static
16094
16095 # Compiler flag to prevent dynamic linking.
16096 link_static_flag=$lt_lt_prog_compiler_static_F77
16097
16098 # Compiler flag to turn off builtin functions.
16099 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
16100
16101 # Compiler flag to allow reflexive dlopens.
16102 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
16103
16104 # Compiler flag to generate shared objects directly from archives.
16105 whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
16106
16107 # Compiler flag to generate thread-safe objects.
16108 thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
16109
16110 # Library versioning type.
16111 version_type=$version_type
16112
16113 # Format of library name prefix.
16114 libname_spec=$lt_libname_spec
16115
16116 # List of archive names. First name is the real one, the rest are links.
16117 # The last name is the one that the linker finds with -lNAME.
16118 library_names_spec=$lt_library_names_spec
16119
16120 # The coded name of the library, if different from the real name.
16121 soname_spec=$lt_soname_spec
16122
16123 # Commands used to build and install an old-style archive.
16124 RANLIB=$lt_RANLIB
16125 old_archive_cmds=$lt_old_archive_cmds_F77
16126 old_postinstall_cmds=$lt_old_postinstall_cmds
16127 old_postuninstall_cmds=$lt_old_postuninstall_cmds
16128
16129 # Create an old-style archive from a shared archive.
16130 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
16131
16132 # Create a temporary old-style archive to link instead of a shared archive.
16133 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
16134
16135 # Commands used to build and install a shared archive.
16136 archive_cmds=$lt_archive_cmds_F77
16137 archive_expsym_cmds=$lt_archive_expsym_cmds_F77
16138 postinstall_cmds=$lt_postinstall_cmds
16139 postuninstall_cmds=$lt_postuninstall_cmds
16140
16141 # Commands used to build a loadable module (assumed same as above if empty)
16142 module_cmds=$lt_module_cmds_F77
16143 module_expsym_cmds=$lt_module_expsym_cmds_F77
16144
16145 # Commands to strip libraries.
16146 old_striplib=$lt_old_striplib
16147 striplib=$lt_striplib
16148
16149 # Dependencies to place before the objects being linked to create a
16150 # shared library.
16151 predep_objects=$lt_predep_objects_F77
16152
16153 # Dependencies to place after the objects being linked to create a
16154 # shared library.
16155 postdep_objects=$lt_postdep_objects_F77
16156
16157 # Dependencies to place before the objects being linked to create a
16158 # shared library.
16159 predeps=$lt_predeps_F77
16160
16161 # Dependencies to place after the objects being linked to create a
16162 # shared library.
16163 postdeps=$lt_postdeps_F77
16164
16165 # The library search path used internally by the compiler when linking
16166 # a shared library.
16167 compiler_lib_search_path=$lt_compiler_lib_search_path_F77
16168
16169 # Method to check whether dependent libraries are shared objects.
16170 deplibs_check_method=$lt_deplibs_check_method
16171
16172 # Command to use when deplibs_check_method == file_magic.
16173 file_magic_cmd=$lt_file_magic_cmd
16174
16175 # Flag that allows shared libraries with undefined symbols to be built.
16176 allow_undefined_flag=$lt_allow_undefined_flag_F77
16177
16178 # Flag that forces no undefined symbols.
16179 no_undefined_flag=$lt_no_undefined_flag_F77
16180
16181 # Commands used to finish a libtool library installation in a directory.
16182 finish_cmds=$lt_finish_cmds
16183
16184 # Same as above, but a single script fragment to be evaled but not shown.
16185 finish_eval=$lt_finish_eval
16186
16187 # Take the output of nm and produce a listing of raw symbols and C names.
16188 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
16189
16190 # Transform the output of nm in a proper C declaration
16191 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
16192
16193 # Transform the output of nm in a C name address pair
16194 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
16195
16196 # This is the shared library runtime path variable.
16197 runpath_var=$runpath_var
16198
16199 # This is the shared library path variable.
16200 shlibpath_var=$shlibpath_var
16201
16202 # Is shlibpath searched before the hard-coded library search path?
16203 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
16204
16205 # How to hardcode a shared library path into an executable.
16206 hardcode_action=$hardcode_action_F77
16207
16208 # Whether we should hardcode library paths into libraries.
16209 hardcode_into_libs=$hardcode_into_libs
16210
16211 # Flag to hardcode \$libdir into a binary during linking.
16212 # This must work even if \$libdir does not exist.
16213 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
16214
16215 # If ld is used when linking, flag to hardcode \$libdir into
16216 # a binary during linking. This must work even if \$libdir does
16217 # not exist.
16218 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
16219
16220 # Whether we need a single -rpath flag with a separated argument.
16221 hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
16222
16223 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
16224 # resulting binary.
16225 hardcode_direct=$hardcode_direct_F77
16226
16227 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
16228 # resulting binary.
16229 hardcode_minus_L=$hardcode_minus_L_F77
16230
16231 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
16232 # the resulting binary.
16233 hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
16234
16235 # Set to yes if building a shared library automatically hardcodes DIR into the library
16236 # and all subsequent libraries and executables linked against it.
16237 hardcode_automatic=$hardcode_automatic_F77
16238
16239 # Variables whose values should be saved in libtool wrapper scripts and
16240 # restored at relink time.
16241 variables_saved_for_relink="$variables_saved_for_relink"
16242
16243 # Whether libtool must link a program against all its dependency libraries.
16244 link_all_deplibs=$link_all_deplibs_F77
16245
16246 # Compile-time system search path for libraries
16247 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
16248
16249 # Run-time system search path for libraries
16250 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
16251
16252 # Fix the shell variable \$srcfile for the compiler.
16253 fix_srcfile_path="$fix_srcfile_path_F77"
16254
16255 # Set to yes if exported symbols are required.
16256 always_export_symbols=$always_export_symbols_F77
16257
16258 # The commands to list exported symbols.
16259 export_symbols_cmds=$lt_export_symbols_cmds_F77
16260
16261 # The commands to extract the exported symbol list from a shared archive.
16262 extract_expsyms_cmds=$lt_extract_expsyms_cmds
16263
16264 # Symbols that should not be listed in the preloaded symbols.
16265 exclude_expsyms=$lt_exclude_expsyms_F77
16266
16267 # Symbols that must always be exported.
16268 include_expsyms=$lt_include_expsyms_F77
16269
16270 # ### END LIBTOOL TAG CONFIG: $tagname
16271
16272 __EOF__
16273
16274
16275 else
16276 # If there is no Makefile yet, we rely on a make rule to execute
16277 # `config.status --recheck' to rerun these tests and create the
16278 # libtool script then.
16279 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
16280 if test -f "$ltmain_in"; then
16281 test -f Makefile && make "$ltmain"
16282 fi
16283 fi
16284
16285
16286 ac_ext=c
16287 ac_cpp='$CPP $CPPFLAGS'
16288 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16289 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16290 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16291
16292 CC="$lt_save_CC"
16293
16294 else
16295 tagname=""
16296 fi
16297 ;;
16298
16299 GCJ)
16300 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
16301
16302
16303
16304 # Source file extension for Java test sources.
16305 ac_ext=java
16306
16307 # Object file extension for compiled Java test sources.
16308 objext=o
16309 objext_GCJ=$objext
16310
16311 # Code to be used in simple compile tests
16312 lt_simple_compile_test_code="class foo {}\n"
16313
16314 # Code to be used in simple link tests
16315 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
16316
16317 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
16318
16319 # If no C compiler was specified, use CC.
16320 LTCC=${LTCC-"$CC"}
16321
16322 # Allow CC to be a program name with arguments.
16323 compiler=$CC
16324
16325
16326 # save warnings/boilerplate of simple test code
16327 ac_outfile=conftest.$ac_objext
16328 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
16329 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
16330 _lt_compiler_boilerplate=`cat conftest.err`
16331 $rm conftest*
16332
16333 ac_outfile=conftest.$ac_objext
16334 printf "$lt_simple_link_test_code" >conftest.$ac_ext
16335 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
16336 _lt_linker_boilerplate=`cat conftest.err`
16337 $rm conftest*
16338
16339
16340 # Allow CC to be a program name with arguments.
16341 lt_save_CC="$CC"
16342 CC=${GCJ-"gcj"}
16343 compiler=$CC
16344 compiler_GCJ=$CC
16345 for cc_temp in $compiler""; do
16346 case $cc_temp in
16347 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
16348 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
16349 \-*) ;;
16350 *) break;;
16351 esac
16352 done
16353 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
16354
16355
16356 # GCJ did not exist at the time GCC didn't implicitly link libc in.
16357 archive_cmds_need_lc_GCJ=no
16358
16359 old_archive_cmds_GCJ=$old_archive_cmds
16360
16361
16362 lt_prog_compiler_no_builtin_flag_GCJ=
16363
16364 if test "$GCC" = yes; then
16365 lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
16366
16367
16368 echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
16369 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
16370 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
16371 echo $ECHO_N "(cached) $ECHO_C" >&6
16372 else
16373 lt_cv_prog_compiler_rtti_exceptions=no
16374 ac_outfile=conftest.$ac_objext
16375 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
16376 lt_compiler_flag="-fno-rtti -fno-exceptions"
16377 # Insert the option either (1) after the last *FLAGS variable, or
16378 # (2) before a word containing "conftest.", or (3) at the end.
16379 # Note that $ac_compile itself does not contain backslashes and begins
16380 # with a dollar sign (not a hyphen), so the echo should work correctly.
16381 # The option is referenced via a variable to avoid confusing sed.
16382 lt_compile=`echo "$ac_compile" | $SED \
16383 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16384 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16385 -e 's:$: $lt_compiler_flag:'`
16386 (eval echo "\"\$as_me:16387: $lt_compile\"" >&5)
16387 (eval "$lt_compile" 2>conftest.err)
16388 ac_status=$?
16389 cat conftest.err >&5
16390 echo "$as_me:16391: \$? = $ac_status" >&5
16391 if (exit $ac_status) && test -s "$ac_outfile"; then
16392 # The compiler can only warn and ignore the option if not recognized
16393 # So say no if there are warnings other than the usual output.
16394 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
16395 $SED '/^$/d' conftest.err >conftest.er2
16396 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
16397 lt_cv_prog_compiler_rtti_exceptions=yes
16398 fi
16399 fi
16400 $rm conftest*
16401
16402 fi
16403 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
16404 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
16405
16406 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
16407 lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
16408 else
16409 :
16410 fi
16411
16412 fi
16413
16414 lt_prog_compiler_wl_GCJ=
16415 lt_prog_compiler_pic_GCJ=
16416 lt_prog_compiler_static_GCJ=
16417
16418 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
16419 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
16420
16421 if test "$GCC" = yes; then
16422 lt_prog_compiler_wl_GCJ='-Wl,'
16423 lt_prog_compiler_static_GCJ='-static'
16424
16425 case $host_os in
16426 aix*)
16427 # All AIX code is PIC.
16428 if test "$host_cpu" = ia64; then
16429 # AIX 5 now supports IA64 processor
16430 lt_prog_compiler_static_GCJ='-Bstatic'
16431 fi
16432 ;;
16433
16434 amigaos*)
16435 # FIXME: we need at least 68020 code to build shared libraries, but
16436 # adding the `-m68020' flag to GCC prevents building anything better,
16437 # like `-m68040'.
16438 lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
16439 ;;
16440
16441 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
16442 # PIC is the default for these OSes.
16443 ;;
16444
16445 mingw* | pw32* | os2*)
16446 # This hack is so that the source file can tell whether it is being
16447 # built for inclusion in a dll (and should export symbols for example).
16448 lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
16449 ;;
16450
16451 darwin* | rhapsody*)
16452 # PIC is the default on this platform
16453 # Common symbols not allowed in MH_DYLIB files
16454 lt_prog_compiler_pic_GCJ='-fno-common'
16455 ;;
16456
16457 msdosdjgpp*)
16458 # Just because we use GCC doesn't mean we suddenly get shared libraries
16459 # on systems that don't support them.
16460 lt_prog_compiler_can_build_shared_GCJ=no
16461 enable_shared=no
16462 ;;
16463
16464 sysv4*MP*)
16465 if test -d /usr/nec; then
16466 lt_prog_compiler_pic_GCJ=-Kconform_pic
16467 fi
16468 ;;
16469
16470 hpux*)
16471 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
16472 # not for PA HP-UX.
16473 case $host_cpu in
16474 hppa*64*|ia64*)
16475 # +Z the default
16476 ;;
16477 *)
16478 lt_prog_compiler_pic_GCJ='-fPIC'
16479 ;;
16480 esac
16481 ;;
16482
16483 *)
16484 lt_prog_compiler_pic_GCJ='-fPIC'
16485 ;;
16486 esac
16487 else
16488 # PORTME Check for flag to pass linker flags through the system compiler.
16489 case $host_os in
16490 aix*)
16491 lt_prog_compiler_wl_GCJ='-Wl,'
16492 if test "$host_cpu" = ia64; then
16493 # AIX 5 now supports IA64 processor
16494 lt_prog_compiler_static_GCJ='-Bstatic'
16495 else
16496 lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
16497 fi
16498 ;;
16499 darwin*)
16500 # PIC is the default on this platform
16501 # Common symbols not allowed in MH_DYLIB files
16502 case $cc_basename in
16503 xlc*)
16504 lt_prog_compiler_pic_GCJ='-qnocommon'
16505 lt_prog_compiler_wl_GCJ='-Wl,'
16506 ;;
16507 esac
16508 ;;
16509
16510 mingw* | pw32* | os2*)
16511 # This hack is so that the source file can tell whether it is being
16512 # built for inclusion in a dll (and should export symbols for example).
16513 lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
16514 ;;
16515
16516 hpux9* | hpux10* | hpux11*)
16517 lt_prog_compiler_wl_GCJ='-Wl,'
16518 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
16519 # not for PA HP-UX.
16520 case $host_cpu in
16521 hppa*64*|ia64*)
16522 # +Z the default
16523 ;;
16524 *)
16525 lt_prog_compiler_pic_GCJ='+Z'
16526 ;;
16527 esac
16528 # Is there a better lt_prog_compiler_static that works with the bundled CC?
16529 lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
16530 ;;
16531
16532 irix5* | irix6* | nonstopux*)
16533 lt_prog_compiler_wl_GCJ='-Wl,'
16534 # PIC (with -KPIC) is the default.
16535 lt_prog_compiler_static_GCJ='-non_shared'
16536 ;;
16537
16538 newsos6)
16539 lt_prog_compiler_pic_GCJ='-KPIC'
16540 lt_prog_compiler_static_GCJ='-Bstatic'
16541 ;;
16542
16543 linux*)
16544 case $cc_basename in
16545 icc* | ecc*)
16546 lt_prog_compiler_wl_GCJ='-Wl,'
16547 lt_prog_compiler_pic_GCJ='-KPIC'
16548 lt_prog_compiler_static_GCJ='-static'
16549 ;;
16550 pgcc* | pgf77* | pgf90* | pgf95*)
16551 # Portland Group compilers (*not* the Pentium gcc compiler,
16552 # which looks to be a dead project)
16553 lt_prog_compiler_wl_GCJ='-Wl,'
16554 lt_prog_compiler_pic_GCJ='-fpic'
16555 lt_prog_compiler_static_GCJ='-Bstatic'
16556 ;;
16557 ccc*)
16558 lt_prog_compiler_wl_GCJ='-Wl,'
16559 # All Alpha code is PIC.
16560 lt_prog_compiler_static_GCJ='-non_shared'
16561 ;;
16562 esac
16563 ;;
16564
16565 osf3* | osf4* | osf5*)
16566 lt_prog_compiler_wl_GCJ='-Wl,'
16567 # All OSF/1 code is PIC.
16568 lt_prog_compiler_static_GCJ='-non_shared'
16569 ;;
16570
16571 sco3.2v5*)
16572 lt_prog_compiler_pic_GCJ='-Kpic'
16573 lt_prog_compiler_static_GCJ='-dn'
16574 ;;
16575
16576 solaris*)
16577 lt_prog_compiler_pic_GCJ='-KPIC'
16578 lt_prog_compiler_static_GCJ='-Bstatic'
16579 case $cc_basename in
16580 f77* | f90* | f95*)
16581 lt_prog_compiler_wl_GCJ='-Qoption ld ';;
16582 *)
16583 lt_prog_compiler_wl_GCJ='-Wl,';;
16584 esac
16585 ;;
16586
16587 sunos4*)
16588 lt_prog_compiler_wl_GCJ='-Qoption ld '
16589 lt_prog_compiler_pic_GCJ='-PIC'
16590 lt_prog_compiler_static_GCJ='-Bstatic'
16591 ;;
16592
16593 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
16594 lt_prog_compiler_wl_GCJ='-Wl,'
16595 lt_prog_compiler_pic_GCJ='-KPIC'
16596 lt_prog_compiler_static_GCJ='-Bstatic'
16597 ;;
16598
16599 sysv4*MP*)
16600 if test -d /usr/nec ;then
16601 lt_prog_compiler_pic_GCJ='-Kconform_pic'
16602 lt_prog_compiler_static_GCJ='-Bstatic'
16603 fi
16604 ;;
16605
16606 unicos*)
16607 lt_prog_compiler_wl_GCJ='-Wl,'
16608 lt_prog_compiler_can_build_shared_GCJ=no
16609 ;;
16610
16611 uts4*)
16612 lt_prog_compiler_pic_GCJ='-pic'
16613 lt_prog_compiler_static_GCJ='-Bstatic'
16614 ;;
16615
16616 *)
16617 lt_prog_compiler_can_build_shared_GCJ=no
16618 ;;
16619 esac
16620 fi
16621
16622 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
16623 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6
16624
16625 #
16626 # Check to make sure the PIC flag actually works.
16627 #
16628 if test -n "$lt_prog_compiler_pic_GCJ"; then
16629
16630 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
16631 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6
16632 if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
16633 echo $ECHO_N "(cached) $ECHO_C" >&6
16634 else
16635 lt_prog_compiler_pic_works_GCJ=no
16636 ac_outfile=conftest.$ac_objext
16637 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
16638 lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
16639 # Insert the option either (1) after the last *FLAGS variable, or
16640 # (2) before a word containing "conftest.", or (3) at the end.
16641 # Note that $ac_compile itself does not contain backslashes and begins
16642 # with a dollar sign (not a hyphen), so the echo should work correctly.
16643 # The option is referenced via a variable to avoid confusing sed.
16644 lt_compile=`echo "$ac_compile" | $SED \
16645 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16646 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16647 -e 's:$: $lt_compiler_flag:'`
16648 (eval echo "\"\$as_me:16649: $lt_compile\"" >&5)
16649 (eval "$lt_compile" 2>conftest.err)
16650 ac_status=$?
16651 cat conftest.err >&5
16652 echo "$as_me:16653: \$? = $ac_status" >&5
16653 if (exit $ac_status) && test -s "$ac_outfile"; then
16654 # The compiler can only warn and ignore the option if not recognized
16655 # So say no if there are warnings other than the usual output.
16656 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
16657 $SED '/^$/d' conftest.err >conftest.er2
16658 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
16659 lt_prog_compiler_pic_works_GCJ=yes
16660 fi
16661 fi
16662 $rm conftest*
16663
16664 fi
16665 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
16666 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6
16667
16668 if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
16669 case $lt_prog_compiler_pic_GCJ in
16670 "" | " "*) ;;
16671 *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
16672 esac
16673 else
16674 lt_prog_compiler_pic_GCJ=
16675 lt_prog_compiler_can_build_shared_GCJ=no
16676 fi
16677
16678 fi
16679 case $host_os in
16680 # For platforms which do not support PIC, -DPIC is meaningless:
16681 *djgpp*)
16682 lt_prog_compiler_pic_GCJ=
16683 ;;
16684 *)
16685 lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
16686 ;;
16687 esac
16688
16689 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
16690 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
16691 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
16692 echo $ECHO_N "(cached) $ECHO_C" >&6
16693 else
16694 lt_cv_prog_compiler_c_o_GCJ=no
16695 $rm -r conftest 2>/dev/null
16696 mkdir conftest
16697 cd conftest
16698 mkdir out
16699 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
16700
16701 lt_compiler_flag="-o out/conftest2.$ac_objext"
16702 # Insert the option either (1) after the last *FLAGS variable, or
16703 # (2) before a word containing "conftest.", or (3) at the end.
16704 # Note that $ac_compile itself does not contain backslashes and begins
16705 # with a dollar sign (not a hyphen), so the echo should work correctly.
16706 lt_compile=`echo "$ac_compile" | $SED \
16707 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16708 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16709 -e 's:$: $lt_compiler_flag:'`
16710 (eval echo "\"\$as_me:16711: $lt_compile\"" >&5)
16711 (eval "$lt_compile" 2>out/conftest.err)
16712 ac_status=$?
16713 cat out/conftest.err >&5
16714 echo "$as_me:16715: \$? = $ac_status" >&5
16715 if (exit $ac_status) && test -s out/conftest2.$ac_objext
16716 then
16717 # The compiler can only warn and ignore the option if not recognized
16718 # So say no if there are warnings
16719 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
16720 $SED '/^$/d' out/conftest.err >out/conftest.er2
16721 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
16722 lt_cv_prog_compiler_c_o_GCJ=yes
16723 fi
16724 fi
16725 chmod u+w . 2>&5
16726 $rm conftest*
16727 # SGI C++ compiler will create directory out/ii_files/ for
16728 # template instantiation
16729 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
16730 $rm out/* && rmdir out
16731 cd ..
16732 rmdir conftest
16733 $rm conftest*
16734
16735 fi
16736 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
16737 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6
16738
16739
16740 hard_links="nottested"
16741 if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
16742 # do not overwrite the value of need_locks provided by the user
16743 echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
16744 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
16745 hard_links=yes
16746 $rm conftest*
16747 ln conftest.a conftest.b 2>/dev/null && hard_links=no
16748 touch conftest.a
16749 ln conftest.a conftest.b 2>&5 || hard_links=no
16750 ln conftest.a conftest.b 2>/dev/null && hard_links=no
16751 echo "$as_me:$LINENO: result: $hard_links" >&5
16752 echo "${ECHO_T}$hard_links" >&6
16753 if test "$hard_links" = no; then
16754 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
16755 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
16756 need_locks=warn
16757 fi
16758 else
16759 need_locks=no
16760 fi
16761
16762 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
16763 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
16764
16765 runpath_var=
16766 allow_undefined_flag_GCJ=
16767 enable_shared_with_static_runtimes_GCJ=no
16768 archive_cmds_GCJ=
16769 archive_expsym_cmds_GCJ=
16770 old_archive_From_new_cmds_GCJ=
16771 old_archive_from_expsyms_cmds_GCJ=
16772 export_dynamic_flag_spec_GCJ=
16773 whole_archive_flag_spec_GCJ=
16774 thread_safe_flag_spec_GCJ=
16775 hardcode_libdir_flag_spec_GCJ=
16776 hardcode_libdir_flag_spec_ld_GCJ=
16777 hardcode_libdir_separator_GCJ=
16778 hardcode_direct_GCJ=no
16779 hardcode_minus_L_GCJ=no
16780 hardcode_shlibpath_var_GCJ=unsupported
16781 link_all_deplibs_GCJ=unknown
16782 hardcode_automatic_GCJ=no
16783 module_cmds_GCJ=
16784 module_expsym_cmds_GCJ=
16785 always_export_symbols_GCJ=no
16786 export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
16787 # include_expsyms should be a list of space-separated symbols to be *always*
16788 # included in the symbol list
16789 include_expsyms_GCJ=
16790 # exclude_expsyms can be an extended regexp of symbols to exclude
16791 # it will be wrapped by ` (' and `)$', so one must not match beginning or
16792 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
16793 # as well as any symbol that contains `d'.
16794 exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
16795 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
16796 # platforms (ab)use it in PIC code, but their linkers get confused if
16797 # the symbol is explicitly referenced. Since portable code cannot
16798 # rely on this symbol name, it's probably fine to never include it in
16799 # preloaded symbol tables.
16800 extract_expsyms_cmds=
16801 # Just being paranoid about ensuring that cc_basename is set.
16802 for cc_temp in $compiler""; do
16803 case $cc_temp in
16804 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
16805 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
16806 \-*) ;;
16807 *) break;;
16808 esac
16809 done
16810 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
16811
16812 case $host_os in
16813 cygwin* | mingw* | pw32*)
16814 # FIXME: the MSVC++ port hasn't been tested in a loooong time
16815 # When not using gcc, we currently assume that we are using
16816 # Microsoft Visual C++.
16817 if test "$GCC" != yes; then
16818 with_gnu_ld=no
16819 fi
16820 ;;
16821 openbsd*)
16822 with_gnu_ld=no
16823 ;;
16824 esac
16825
16826 ld_shlibs_GCJ=yes
16827 if test "$with_gnu_ld" = yes; then
16828 # If archive_cmds runs LD, not CC, wlarc should be empty
16829 wlarc='${wl}'
16830
16831 # Set some defaults for GNU ld with shared library support. These
16832 # are reset later if shared libraries are not supported. Putting them
16833 # here allows them to be overridden if necessary.
16834 runpath_var=LD_RUN_PATH
16835 hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
16836 export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
16837 # ancient GNU ld didn't support --whole-archive et. al.
16838 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
16839 whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
16840 else
16841 whole_archive_flag_spec_GCJ=
16842 fi
16843 supports_anon_versioning=no
16844 case `$LD -v 2>/dev/null` in
16845 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
16846 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
16847 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
16848 *\ 2.11.*) ;; # other 2.11 versions
16849 *) supports_anon_versioning=yes ;;
16850 esac
16851
16852 # See if GNU ld supports shared libraries.
16853 case $host_os in
16854 aix3* | aix4* | aix5*)
16855 # On AIX/PPC, the GNU linker is very broken
16856 if test "$host_cpu" != ia64; then
16857 ld_shlibs_GCJ=no
16858 cat <<EOF 1>&2
16859
16860 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
16861 *** to be unable to reliably create shared libraries on AIX.
16862 *** Therefore, libtool is disabling shared libraries support. If you
16863 *** really care for shared libraries, you may want to modify your PATH
16864 *** so that a non-GNU linker is found, and then restart.
16865
16866 EOF
16867 fi
16868 ;;
16869
16870 amigaos*)
16871 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)'
16872 hardcode_libdir_flag_spec_GCJ='-L$libdir'
16873 hardcode_minus_L_GCJ=yes
16874
16875 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
16876 # that the semantics of dynamic libraries on AmigaOS, at least up
16877 # to version 4, is to share data among multiple programs linked
16878 # with the same dynamic library. Since this doesn't match the
16879 # behavior of shared libraries on other platforms, we can't use
16880 # them.
16881 ld_shlibs_GCJ=no
16882 ;;
16883
16884 beos*)
16885 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
16886 allow_undefined_flag_GCJ=unsupported
16887 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
16888 # support --undefined. This deserves some investigation. FIXME
16889 archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
16890 else
16891 ld_shlibs_GCJ=no
16892 fi
16893 ;;
16894
16895 cygwin* | mingw* | pw32*)
16896 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
16897 # as there is no search path for DLLs.
16898 hardcode_libdir_flag_spec_GCJ='-L$libdir'
16899 allow_undefined_flag_GCJ=unsupported
16900 always_export_symbols_GCJ=no
16901 enable_shared_with_static_runtimes_GCJ=yes
16902 export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
16903
16904 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
16905 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
16906 # If the export-symbols file already is a .def file (1st line
16907 # is EXPORTS), use it as is; otherwise, prepend...
16908 archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
16909 cp $export_symbols $output_objdir/$soname.def;
16910 else
16911 echo EXPORTS > $output_objdir/$soname.def;
16912 cat $export_symbols >> $output_objdir/$soname.def;
16913 fi~
16914 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
16915 else
16916 ld_shlibs_GCJ=no
16917 fi
16918 ;;
16919
16920 linux*)
16921 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
16922 tmp_addflag=
16923 case $cc_basename,$host_cpu in
16924 pgcc*) # Portland Group C compiler
16925 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'
16926 tmp_addflag=' $pic_flag'
16927 ;;
16928 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
16929 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'
16930 tmp_addflag=' $pic_flag -Mnomain' ;;
16931 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
16932 tmp_addflag=' -i_dynamic' ;;
16933 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
16934 tmp_addflag=' -i_dynamic -nofor_main' ;;
16935 ifc* | ifort*) # Intel Fortran compiler
16936 tmp_addflag=' -nofor_main' ;;
16937 esac
16938 archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
16939
16940 if test $supports_anon_versioning = yes; then
16941 archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
16942 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
16943 $echo "local: *; };" >> $output_objdir/$libname.ver~
16944 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
16945 fi
16946 link_all_deplibs_GCJ=no
16947 else
16948 ld_shlibs_GCJ=no
16949 fi
16950 ;;
16951
16952 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
16953 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
16954 archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
16955 wlarc=
16956 else
16957 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
16958 archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
16959 fi
16960 ;;
16961
16962 solaris* | sysv5*)
16963 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
16964 ld_shlibs_GCJ=no
16965 cat <<EOF 1>&2
16966
16967 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
16968 *** create shared libraries on Solaris systems. Therefore, libtool
16969 *** is disabling shared libraries support. We urge you to upgrade GNU
16970 *** binutils to release 2.9.1 or newer. Another option is to modify
16971 *** your PATH or compiler configuration so that the native linker is
16972 *** used, and then restart.
16973
16974 EOF
16975 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
16976 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
16977 archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
16978 else
16979 ld_shlibs_GCJ=no
16980 fi
16981 ;;
16982
16983 sunos4*)
16984 archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
16985 wlarc=
16986 hardcode_direct_GCJ=yes
16987 hardcode_shlibpath_var_GCJ=no
16988 ;;
16989
16990 *)
16991 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
16992 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
16993 archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
16994 else
16995 ld_shlibs_GCJ=no
16996 fi
16997 ;;
16998 esac
16999
17000 if test "$ld_shlibs_GCJ" = no; then
17001 runpath_var=
17002 hardcode_libdir_flag_spec_GCJ=
17003 export_dynamic_flag_spec_GCJ=
17004 whole_archive_flag_spec_GCJ=
17005 fi
17006 else
17007 # PORTME fill in a description of your system's linker (not GNU ld)
17008 case $host_os in
17009 aix3*)
17010 allow_undefined_flag_GCJ=unsupported
17011 always_export_symbols_GCJ=yes
17012 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'
17013 # Note: this linker hardcodes the directories in LIBPATH if there
17014 # are no directories specified by -L.
17015 hardcode_minus_L_GCJ=yes
17016 if test "$GCC" = yes && test -z "$link_static_flag"; then
17017 # Neither direct hardcoding nor static linking is supported with a
17018 # broken collect2.
17019 hardcode_direct_GCJ=unsupported
17020 fi
17021 ;;
17022
17023 aix4* | aix5*)
17024 if test "$host_cpu" = ia64; then
17025 # On IA64, the linker does run time linking by default, so we don't
17026 # have to do anything special.
17027 aix_use_runtimelinking=no
17028 exp_sym_flag='-Bexport'
17029 no_entry_flag=""
17030 else
17031 # If we're using GNU nm, then we don't want the "-C" option.
17032 # -C means demangle to AIX nm, but means don't demangle with GNU nm
17033 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
17034 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'
17035 else
17036 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'
17037 fi
17038 aix_use_runtimelinking=no
17039
17040 # Test if we are trying to use run time linking or normal
17041 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
17042 # need to do runtime linking.
17043 case $host_os in aix4.[23]|aix4.[23].*|aix5*)
17044 for ld_flag in $LDFLAGS; do
17045 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
17046 aix_use_runtimelinking=yes
17047 break
17048 fi
17049 done
17050 esac
17051
17052 exp_sym_flag='-bexport'
17053 no_entry_flag='-bnoentry'
17054 fi
17055
17056 # When large executables or shared objects are built, AIX ld can
17057 # have problems creating the table of contents. If linking a library
17058 # or program results in "error TOC overflow" add -mminimal-toc to
17059 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
17060 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
17061
17062 archive_cmds_GCJ=''
17063 hardcode_direct_GCJ=yes
17064 hardcode_libdir_separator_GCJ=':'
17065 link_all_deplibs_GCJ=yes
17066
17067 if test "$GCC" = yes; then
17068 case $host_os in aix4.[012]|aix4.[012].*)
17069 # We only want to do this on AIX 4.2 and lower, the check
17070 # below for broken collect2 doesn't work under 4.3+
17071 collect2name=`${CC} -print-prog-name=collect2`
17072 if test -f "$collect2name" && \
17073 strings "$collect2name" | grep resolve_lib_name >/dev/null
17074 then
17075 # We have reworked collect2
17076 hardcode_direct_GCJ=yes
17077 else
17078 # We have old collect2
17079 hardcode_direct_GCJ=unsupported
17080 # It fails to find uninstalled libraries when the uninstalled
17081 # path is not listed in the libpath. Setting hardcode_minus_L
17082 # to unsupported forces relinking
17083 hardcode_minus_L_GCJ=yes
17084 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17085 hardcode_libdir_separator_GCJ=
17086 fi
17087 esac
17088 shared_flag='-shared'
17089 if test "$aix_use_runtimelinking" = yes; then
17090 shared_flag="$shared_flag "'${wl}-G'
17091 fi
17092 else
17093 # not using gcc
17094 if test "$host_cpu" = ia64; then
17095 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
17096 # chokes on -Wl,-G. The following line is correct:
17097 shared_flag='-G'
17098 else
17099 if test "$aix_use_runtimelinking" = yes; then
17100 shared_flag='${wl}-G'
17101 else
17102 shared_flag='${wl}-bM:SRE'
17103 fi
17104 fi
17105 fi
17106
17107 # It seems that -bexpall does not export symbols beginning with
17108 # underscore (_), so it is better to generate a list of symbols to export.
17109 always_export_symbols_GCJ=yes
17110 if test "$aix_use_runtimelinking" = yes; then
17111 # Warning - without using the other runtime loading flags (-brtl),
17112 # -berok will link without error, but may produce a broken library.
17113 allow_undefined_flag_GCJ='-berok'
17114 # Determine the default libpath from the value encoded in an empty executable.
17115 cat >conftest.$ac_ext <<_ACEOF
17116 /* confdefs.h. */
17117 _ACEOF
17118 cat confdefs.h >>conftest.$ac_ext
17119 cat >>conftest.$ac_ext <<_ACEOF
17120 /* end confdefs.h. */
17121
17122 int
17123 main ()
17124 {
17125
17126 ;
17127 return 0;
17128 }
17129 _ACEOF
17130 rm -f conftest.$ac_objext conftest$ac_exeext
17131 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17132 (eval $ac_link) 2>conftest.er1
17133 ac_status=$?
17134 grep -v '^ *+' conftest.er1 >conftest.err
17135 rm -f conftest.er1
17136 cat conftest.err >&5
17137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17138 (exit $ac_status); } &&
17139 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17141 (eval $ac_try) 2>&5
17142 ac_status=$?
17143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17144 (exit $ac_status); }; } &&
17145 { ac_try='test -s conftest$ac_exeext'
17146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17147 (eval $ac_try) 2>&5
17148 ac_status=$?
17149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17150 (exit $ac_status); }; }; then
17151
17152 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
17153 }'`
17154 # Check for a 64-bit object if we didn't find anything.
17155 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; }
17156 }'`; fi
17157 else
17158 echo "$as_me: failed program was:" >&5
17159 sed 's/^/| /' conftest.$ac_ext >&5
17160
17161 fi
17162 rm -f conftest.err conftest.$ac_objext \
17163 conftest$ac_exeext conftest.$ac_ext
17164 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17165
17166 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
17167 archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
17168 else
17169 if test "$host_cpu" = ia64; then
17170 hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
17171 allow_undefined_flag_GCJ="-z nodefs"
17172 archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
17173 else
17174 # Determine the default libpath from the value encoded in an empty executable.
17175 cat >conftest.$ac_ext <<_ACEOF
17176 /* confdefs.h. */
17177 _ACEOF
17178 cat confdefs.h >>conftest.$ac_ext
17179 cat >>conftest.$ac_ext <<_ACEOF
17180 /* end confdefs.h. */
17181
17182 int
17183 main ()
17184 {
17185
17186 ;
17187 return 0;
17188 }
17189 _ACEOF
17190 rm -f conftest.$ac_objext conftest$ac_exeext
17191 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17192 (eval $ac_link) 2>conftest.er1
17193 ac_status=$?
17194 grep -v '^ *+' conftest.er1 >conftest.err
17195 rm -f conftest.er1
17196 cat conftest.err >&5
17197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17198 (exit $ac_status); } &&
17199 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17201 (eval $ac_try) 2>&5
17202 ac_status=$?
17203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17204 (exit $ac_status); }; } &&
17205 { ac_try='test -s conftest$ac_exeext'
17206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17207 (eval $ac_try) 2>&5
17208 ac_status=$?
17209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17210 (exit $ac_status); }; }; then
17211
17212 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
17213 }'`
17214 # Check for a 64-bit object if we didn't find anything.
17215 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; }
17216 }'`; fi
17217 else
17218 echo "$as_me: failed program was:" >&5
17219 sed 's/^/| /' conftest.$ac_ext >&5
17220
17221 fi
17222 rm -f conftest.err conftest.$ac_objext \
17223 conftest$ac_exeext conftest.$ac_ext
17224 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17225
17226 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
17227 # Warning - without using the other run time loading flags,
17228 # -berok will link without error, but may produce a broken library.
17229 no_undefined_flag_GCJ=' ${wl}-bernotok'
17230 allow_undefined_flag_GCJ=' ${wl}-berok'
17231 # -bexpall does not export symbols beginning with underscore (_)
17232 always_export_symbols_GCJ=yes
17233 # Exported symbols can be pulled into shared objects from archives
17234 whole_archive_flag_spec_GCJ=' '
17235 archive_cmds_need_lc_GCJ=yes
17236 # This is similar to how AIX traditionally builds its shared libraries.
17237 archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
17238 fi
17239 fi
17240 ;;
17241
17242 amigaos*)
17243 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)'
17244 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17245 hardcode_minus_L_GCJ=yes
17246 # see comment about different semantics on the GNU ld section
17247 ld_shlibs_GCJ=no
17248 ;;
17249
17250 bsdi[45]*)
17251 export_dynamic_flag_spec_GCJ=-rdynamic
17252 ;;
17253
17254 cygwin* | mingw* | pw32*)
17255 # When not using gcc, we currently assume that we are using
17256 # Microsoft Visual C++.
17257 # hardcode_libdir_flag_spec is actually meaningless, as there is
17258 # no search path for DLLs.
17259 hardcode_libdir_flag_spec_GCJ=' '
17260 allow_undefined_flag_GCJ=unsupported
17261 # Tell ltmain to make .lib files, not .a files.
17262 libext=lib
17263 # Tell ltmain to make .dll files, not .so files.
17264 shrext_cmds=".dll"
17265 # FIXME: Setting linknames here is a bad hack.
17266 archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
17267 # The linker will automatically build a .lib file if we build a DLL.
17268 old_archive_From_new_cmds_GCJ='true'
17269 # FIXME: Should let the user specify the lib program.
17270 old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
17271 fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
17272 enable_shared_with_static_runtimes_GCJ=yes
17273 ;;
17274
17275 darwin* | rhapsody*)
17276 case $host_os in
17277 rhapsody* | darwin1.[012])
17278 allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
17279 ;;
17280 *) # Darwin 1.3 on
17281 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
17282 allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
17283 else
17284 case ${MACOSX_DEPLOYMENT_TARGET} in
17285 10.[012])
17286 allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
17287 ;;
17288 10.*)
17289 allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
17290 ;;
17291 esac
17292 fi
17293 ;;
17294 esac
17295 archive_cmds_need_lc_GCJ=no
17296 hardcode_direct_GCJ=no
17297 hardcode_automatic_GCJ=yes
17298 hardcode_shlibpath_var_GCJ=unsupported
17299 whole_archive_flag_spec_GCJ=''
17300 link_all_deplibs_GCJ=yes
17301 if test "$GCC" = yes ; then
17302 output_verbose_link_cmd='echo'
17303 archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
17304 module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
17305 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
17306 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}'
17307 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}'
17308 else
17309 case $cc_basename in
17310 xlc*)
17311 output_verbose_link_cmd='echo'
17312 archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
17313 module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
17314 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
17315 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}'
17316 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}'
17317 ;;
17318 *)
17319 ld_shlibs_GCJ=no
17320 ;;
17321 esac
17322 fi
17323 ;;
17324
17325 dgux*)
17326 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17327 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17328 hardcode_shlibpath_var_GCJ=no
17329 ;;
17330
17331 freebsd1*)
17332 ld_shlibs_GCJ=no
17333 ;;
17334
17335 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
17336 # support. Future versions do this automatically, but an explicit c++rt0.o
17337 # does not break anything, and helps significantly (at the cost of a little
17338 # extra space).
17339 freebsd2.2*)
17340 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
17341 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17342 hardcode_direct_GCJ=yes
17343 hardcode_shlibpath_var_GCJ=no
17344 ;;
17345
17346 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
17347 freebsd2*)
17348 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17349 hardcode_direct_GCJ=yes
17350 hardcode_minus_L_GCJ=yes
17351 hardcode_shlibpath_var_GCJ=no
17352 ;;
17353
17354 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
17355 freebsd* | kfreebsd*-gnu | dragonfly*)
17356 archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
17357 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17358 hardcode_direct_GCJ=yes
17359 hardcode_shlibpath_var_GCJ=no
17360 ;;
17361
17362 hpux9*)
17363 if test "$GCC" = yes; then
17364 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'
17365 else
17366 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'
17367 fi
17368 hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
17369 hardcode_libdir_separator_GCJ=:
17370 hardcode_direct_GCJ=yes
17371
17372 # hardcode_minus_L: Not really in the search PATH,
17373 # but as the default location of the library.
17374 hardcode_minus_L_GCJ=yes
17375 export_dynamic_flag_spec_GCJ='${wl}-E'
17376 ;;
17377
17378 hpux10* | hpux11*)
17379 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
17380 case $host_cpu in
17381 hppa*64*|ia64*)
17382 archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17383 ;;
17384 *)
17385 archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17386 ;;
17387 esac
17388 else
17389 case $host_cpu in
17390 hppa*64*|ia64*)
17391 archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
17392 ;;
17393 *)
17394 archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
17395 ;;
17396 esac
17397 fi
17398 if test "$with_gnu_ld" = no; then
17399 case $host_cpu in
17400 hppa*64*)
17401 hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
17402 hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
17403 hardcode_libdir_separator_GCJ=:
17404 hardcode_direct_GCJ=no
17405 hardcode_shlibpath_var_GCJ=no
17406 ;;
17407 ia64*)
17408 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17409 hardcode_direct_GCJ=no
17410 hardcode_shlibpath_var_GCJ=no
17411
17412 # hardcode_minus_L: Not really in the search PATH,
17413 # but as the default location of the library.
17414 hardcode_minus_L_GCJ=yes
17415 ;;
17416 *)
17417 hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
17418 hardcode_libdir_separator_GCJ=:
17419 hardcode_direct_GCJ=yes
17420 export_dynamic_flag_spec_GCJ='${wl}-E'
17421
17422 # hardcode_minus_L: Not really in the search PATH,
17423 # but as the default location of the library.
17424 hardcode_minus_L_GCJ=yes
17425 ;;
17426 esac
17427 fi
17428 ;;
17429
17430 irix5* | irix6* | nonstopux*)
17431 if test "$GCC" = yes; then
17432 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'
17433 else
17434 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'
17435 hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
17436 fi
17437 hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
17438 hardcode_libdir_separator_GCJ=:
17439 link_all_deplibs_GCJ=yes
17440 ;;
17441
17442 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
17443 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
17444 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
17445 else
17446 archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
17447 fi
17448 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17449 hardcode_direct_GCJ=yes
17450 hardcode_shlibpath_var_GCJ=no
17451 ;;
17452
17453 newsos6)
17454 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17455 hardcode_direct_GCJ=yes
17456 hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
17457 hardcode_libdir_separator_GCJ=:
17458 hardcode_shlibpath_var_GCJ=no
17459 ;;
17460
17461 openbsd*)
17462 hardcode_direct_GCJ=yes
17463 hardcode_shlibpath_var_GCJ=no
17464 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
17465 archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17466 archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
17467 hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
17468 export_dynamic_flag_spec_GCJ='${wl}-E'
17469 else
17470 case $host_os in
17471 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
17472 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17473 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17474 ;;
17475 *)
17476 archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17477 hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
17478 ;;
17479 esac
17480 fi
17481 ;;
17482
17483 os2*)
17484 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17485 hardcode_minus_L_GCJ=yes
17486 allow_undefined_flag_GCJ=unsupported
17487 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'
17488 old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
17489 ;;
17490
17491 osf3*)
17492 if test "$GCC" = yes; then
17493 allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
17494 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'
17495 else
17496 allow_undefined_flag_GCJ=' -expect_unresolved \*'
17497 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'
17498 fi
17499 hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
17500 hardcode_libdir_separator_GCJ=:
17501 ;;
17502
17503 osf4* | osf5*) # as osf3* with the addition of -msym flag
17504 if test "$GCC" = yes; then
17505 allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
17506 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'
17507 hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
17508 else
17509 allow_undefined_flag_GCJ=' -expect_unresolved \*'
17510 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'
17511 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~
17512 $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'
17513
17514 # Both c and cxx compiler support -rpath directly
17515 hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
17516 fi
17517 hardcode_libdir_separator_GCJ=:
17518 ;;
17519
17520 sco3.2v5*)
17521 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17522 hardcode_shlibpath_var_GCJ=no
17523 export_dynamic_flag_spec_GCJ='${wl}-Bexport'
17524 runpath_var=LD_RUN_PATH
17525 hardcode_runpath_var=yes
17526 ;;
17527
17528 solaris*)
17529 no_undefined_flag_GCJ=' -z text'
17530 if test "$GCC" = yes; then
17531 wlarc='${wl}'
17532 archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17533 archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
17534 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
17535 else
17536 wlarc=''
17537 archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
17538 archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
17539 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
17540 fi
17541 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17542 hardcode_shlibpath_var_GCJ=no
17543 case $host_os in
17544 solaris2.[0-5] | solaris2.[0-5].*) ;;
17545 *)
17546 # The compiler driver will combine linker options so we
17547 # cannot just pass the convience library names through
17548 # without $wl, iff we do not link with $LD.
17549 # Luckily, gcc supports the same syntax we need for Sun Studio.
17550 # Supported since Solaris 2.6 (maybe 2.5.1?)
17551 case $wlarc in
17552 '')
17553 whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
17554 *)
17555 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' ;;
17556 esac ;;
17557 esac
17558 link_all_deplibs_GCJ=yes
17559 ;;
17560
17561 sunos4*)
17562 if test "x$host_vendor" = xsequent; then
17563 # Use $CC to link under sequent, because it throws in some extra .o
17564 # files that make .init and .fini sections work.
17565 archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
17566 else
17567 archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
17568 fi
17569 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17570 hardcode_direct_GCJ=yes
17571 hardcode_minus_L_GCJ=yes
17572 hardcode_shlibpath_var_GCJ=no
17573 ;;
17574
17575 sysv4)
17576 case $host_vendor in
17577 sni)
17578 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17579 hardcode_direct_GCJ=yes # is this really true???
17580 ;;
17581 siemens)
17582 ## LD is ld it makes a PLAMLIB
17583 ## CC just makes a GrossModule.
17584 archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
17585 reload_cmds_GCJ='$CC -r -o $output$reload_objs'
17586 hardcode_direct_GCJ=no
17587 ;;
17588 motorola)
17589 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17590 hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
17591 ;;
17592 esac
17593 runpath_var='LD_RUN_PATH'
17594 hardcode_shlibpath_var_GCJ=no
17595 ;;
17596
17597 sysv4.3*)
17598 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17599 hardcode_shlibpath_var_GCJ=no
17600 export_dynamic_flag_spec_GCJ='-Bexport'
17601 ;;
17602
17603 sysv4*MP*)
17604 if test -d /usr/nec; then
17605 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17606 hardcode_shlibpath_var_GCJ=no
17607 runpath_var=LD_RUN_PATH
17608 hardcode_runpath_var=yes
17609 ld_shlibs_GCJ=yes
17610 fi
17611 ;;
17612
17613 sysv4.2uw2*)
17614 archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
17615 hardcode_direct_GCJ=yes
17616 hardcode_minus_L_GCJ=no
17617 hardcode_shlibpath_var_GCJ=no
17618 hardcode_runpath_var=yes
17619 runpath_var=LD_RUN_PATH
17620 ;;
17621
17622 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
17623 no_undefined_flag_GCJ='${wl}-z ${wl}text'
17624 if test "$GCC" = yes; then
17625 archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17626 else
17627 archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17628 fi
17629 runpath_var='LD_RUN_PATH'
17630 hardcode_shlibpath_var_GCJ=no
17631 ;;
17632
17633 sysv5*)
17634 no_undefined_flag_GCJ=' -z text'
17635 # $CC -shared without GNU ld will not create a library from C++
17636 # object files and a static libstdc++, better avoid it by now
17637 archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
17638 archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
17639 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
17640 hardcode_libdir_flag_spec_GCJ=
17641 hardcode_shlibpath_var_GCJ=no
17642 runpath_var='LD_RUN_PATH'
17643 ;;
17644
17645 uts4*)
17646 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17647 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17648 hardcode_shlibpath_var_GCJ=no
17649 ;;
17650
17651 *)
17652 ld_shlibs_GCJ=no
17653 ;;
17654 esac
17655 fi
17656
17657 echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
17658 echo "${ECHO_T}$ld_shlibs_GCJ" >&6
17659 test "$ld_shlibs_GCJ" = no && can_build_shared=no
17660
17661 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
17662 if test "$GCC" = yes; then
17663 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
17664 fi
17665
17666 #
17667 # Do we need to explicitly link libc?
17668 #
17669 case "x$archive_cmds_need_lc_GCJ" in
17670 x|xyes)
17671 # Assume -lc should be added
17672 archive_cmds_need_lc_GCJ=yes
17673
17674 if test "$enable_shared" = yes && test "$GCC" = yes; then
17675 case $archive_cmds_GCJ in
17676 *'~'*)
17677 # FIXME: we may have to deal with multi-command sequences.
17678 ;;
17679 '$CC '*)
17680 # Test whether the compiler implicitly links with -lc since on some
17681 # systems, -lgcc has to come before -lc. If gcc already passes -lc
17682 # to ld, don't add -lc before -lgcc.
17683 echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
17684 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
17685 $rm conftest*
17686 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
17687
17688 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17689 (eval $ac_compile) 2>&5
17690 ac_status=$?
17691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17692 (exit $ac_status); } 2>conftest.err; then
17693 soname=conftest
17694 lib=conftest
17695 libobjs=conftest.$ac_objext
17696 deplibs=
17697 wl=$lt_prog_compiler_wl_GCJ
17698 compiler_flags=-v
17699 linker_flags=-v
17700 verstring=
17701 output_objdir=.
17702 libname=conftest
17703 lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
17704 allow_undefined_flag_GCJ=
17705 if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
17706 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
17707 ac_status=$?
17708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17709 (exit $ac_status); }
17710 then
17711 archive_cmds_need_lc_GCJ=no
17712 else
17713 archive_cmds_need_lc_GCJ=yes
17714 fi
17715 allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
17716 else
17717 cat conftest.err 1>&5
17718 fi
17719 $rm conftest*
17720 echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
17721 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6
17722 ;;
17723 esac
17724 fi
17725 ;;
17726 esac
17727
17728 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
17729 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
17730 library_names_spec=
17731 libname_spec='lib$name'
17732 soname_spec=
17733 shrext_cmds=".so"
17734 postinstall_cmds=
17735 postuninstall_cmds=
17736 finish_cmds=
17737 finish_eval=
17738 shlibpath_var=
17739 shlibpath_overrides_runpath=unknown
17740 version_type=none
17741 dynamic_linker="$host_os ld.so"
17742 sys_lib_dlsearch_path_spec="/lib /usr/lib"
17743 if test "$GCC" = yes; then
17744 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
17745 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
17746 # if the path contains ";" then we assume it to be the separator
17747 # otherwise default to the standard path separator (i.e. ":") - it is
17748 # assumed that no part of a normal pathname contains ";" but that should
17749 # okay in the real world where ";" in dirpaths is itself problematic.
17750 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
17751 else
17752 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
17753 fi
17754 else
17755 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
17756 fi
17757 need_lib_prefix=unknown
17758 hardcode_into_libs=no
17759
17760 # when you set need_version to no, make sure it does not cause -set_version
17761 # flags to be left without arguments
17762 need_version=unknown
17763
17764 case $host_os in
17765 aix3*)
17766 version_type=linux
17767 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
17768 shlibpath_var=LIBPATH
17769
17770 # AIX 3 has no versioning support, so we append a major version to the name.
17771 soname_spec='${libname}${release}${shared_ext}$major'
17772 ;;
17773
17774 aix4* | aix5*)
17775 version_type=linux
17776 need_lib_prefix=no
17777 need_version=no
17778 hardcode_into_libs=yes
17779 if test "$host_cpu" = ia64; then
17780 # AIX 5 supports IA64
17781 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
17782 shlibpath_var=LD_LIBRARY_PATH
17783 else
17784 # With GCC up to 2.95.x, collect2 would create an import file
17785 # for dependence libraries. The import file would start with
17786 # the line `#! .'. This would cause the generated library to
17787 # depend on `.', always an invalid library. This was fixed in
17788 # development snapshots of GCC prior to 3.0.
17789 case $host_os in
17790 aix4 | aix4.[01] | aix4.[01].*)
17791 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
17792 echo ' yes '
17793 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
17794 :
17795 else
17796 can_build_shared=no
17797 fi
17798 ;;
17799 esac
17800 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
17801 # soname into executable. Probably we can add versioning support to
17802 # collect2, so additional links can be useful in future.
17803 if test "$aix_use_runtimelinking" = yes; then
17804 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
17805 # instead of lib<name>.a to let people know that these are not
17806 # typical AIX shared libraries.
17807 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17808 else
17809 # We preserve .a as extension for shared libraries through AIX4.2
17810 # and later when we are not doing run time linking.
17811 library_names_spec='${libname}${release}.a $libname.a'
17812 soname_spec='${libname}${release}${shared_ext}$major'
17813 fi
17814 shlibpath_var=LIBPATH
17815 fi
17816 ;;
17817
17818 amigaos*)
17819 library_names_spec='$libname.ixlibrary $libname.a'
17820 # Create ${libname}_ixlibrary.a entries in /sys/libs.
17821 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'
17822 ;;
17823
17824 beos*)
17825 library_names_spec='${libname}${shared_ext}'
17826 dynamic_linker="$host_os ld.so"
17827 shlibpath_var=LIBRARY_PATH
17828 ;;
17829
17830 bsdi[45]*)
17831 version_type=linux
17832 need_version=no
17833 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
17834 soname_spec='${libname}${release}${shared_ext}$major'
17835 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
17836 shlibpath_var=LD_LIBRARY_PATH
17837 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
17838 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
17839 # the default ld.so.conf also contains /usr/contrib/lib and
17840 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
17841 # libtool to hard-code these into programs
17842 ;;
17843
17844 cygwin* | mingw* | pw32*)
17845 version_type=windows
17846 shrext_cmds=".dll"
17847 need_version=no
17848 need_lib_prefix=no
17849
17850 case $GCC,$host_os in
17851 yes,cygwin* | yes,mingw* | yes,pw32*)
17852 library_names_spec='$libname.dll.a'
17853 # DLL is installed to $(libdir)/../bin by postinstall_cmds
17854 postinstall_cmds='base_file=`basename \${file}`~
17855 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
17856 dldir=$destdir/`dirname \$dlpath`~
17857 test -d \$dldir || mkdir -p \$dldir~
17858 $install_prog $dir/$dlname \$dldir/$dlname~
17859 chmod a+x \$dldir/$dlname'
17860 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
17861 dlpath=$dir/\$dldll~
17862 $rm \$dlpath'
17863 shlibpath_overrides_runpath=yes
17864
17865 case $host_os in
17866 cygwin*)
17867 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
17868 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
17869 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
17870 ;;
17871 mingw*)
17872 # MinGW DLLs use traditional 'lib' prefix
17873 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
17874 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
17875 if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
17876 # It is most probably a Windows format PATH printed by
17877 # mingw gcc, but we are running on Cygwin. Gcc prints its search
17878 # path with ; separators, and with drive letters. We can handle the
17879 # drive letters (cygwin fileutils understands them), so leave them,
17880 # especially as we might pass files found there to a mingw objdump,
17881 # which wouldn't understand a cygwinified path. Ahh.
17882 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
17883 else
17884 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
17885 fi
17886 ;;
17887 pw32*)
17888 # pw32 DLLs use 'pw' prefix rather than 'lib'
17889 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
17890 ;;
17891 esac
17892 ;;
17893
17894 *)
17895 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
17896 ;;
17897 esac
17898 dynamic_linker='Win32 ld.exe'
17899 # FIXME: first we should search . and the directory the executable is in
17900 shlibpath_var=PATH
17901 ;;
17902
17903 darwin* | rhapsody*)
17904 dynamic_linker="$host_os dyld"
17905 version_type=darwin
17906 need_lib_prefix=no
17907 need_version=no
17908 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
17909 soname_spec='${libname}${release}${major}$shared_ext'
17910 shlibpath_overrides_runpath=yes
17911 shlibpath_var=DYLD_LIBRARY_PATH
17912 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
17913 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
17914 if test "$GCC" = yes; then
17915 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"`
17916 else
17917 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
17918 fi
17919 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
17920 ;;
17921
17922 dgux*)
17923 version_type=linux
17924 need_lib_prefix=no
17925 need_version=no
17926 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
17927 soname_spec='${libname}${release}${shared_ext}$major'
17928 shlibpath_var=LD_LIBRARY_PATH
17929 ;;
17930
17931 freebsd1*)
17932 dynamic_linker=no
17933 ;;
17934
17935 kfreebsd*-gnu)
17936 version_type=linux
17937 need_lib_prefix=no
17938 need_version=no
17939 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
17940 soname_spec='${libname}${release}${shared_ext}$major'
17941 shlibpath_var=LD_LIBRARY_PATH
17942 shlibpath_overrides_runpath=no
17943 hardcode_into_libs=yes
17944 dynamic_linker='GNU ld.so'
17945 ;;
17946
17947 freebsd* | dragonfly*)
17948 # DragonFly does not have aout. When/if they implement a new
17949 # versioning mechanism, adjust this.
17950 if test -x /usr/bin/objformat; then
17951 objformat=`/usr/bin/objformat`
17952 else
17953 case $host_os in
17954 freebsd[123]*) objformat=aout ;;
17955 *) objformat=elf ;;
17956 esac
17957 fi
17958 version_type=freebsd-$objformat
17959 case $version_type in
17960 freebsd-elf*)
17961 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
17962 need_version=no
17963 need_lib_prefix=no
17964 ;;
17965 freebsd-*)
17966 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
17967 need_version=yes
17968 ;;
17969 esac
17970 shlibpath_var=LD_LIBRARY_PATH
17971 case $host_os in
17972 freebsd2*)
17973 shlibpath_overrides_runpath=yes
17974 ;;
17975 freebsd3.[01]* | freebsdelf3.[01]*)
17976 shlibpath_overrides_runpath=yes
17977 hardcode_into_libs=yes
17978 ;;
17979 *) # from 3.2 on
17980 shlibpath_overrides_runpath=no
17981 hardcode_into_libs=yes
17982 ;;
17983 esac
17984 ;;
17985
17986 gnu*)
17987 version_type=linux
17988 need_lib_prefix=no
17989 need_version=no
17990 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
17991 soname_spec='${libname}${release}${shared_ext}$major'
17992 shlibpath_var=LD_LIBRARY_PATH
17993 hardcode_into_libs=yes
17994 ;;
17995
17996 hpux9* | hpux10* | hpux11*)
17997 # Give a soname corresponding to the major version so that dld.sl refuses to
17998 # link against other versions.
17999 version_type=sunos
18000 need_lib_prefix=no
18001 need_version=no
18002 case $host_cpu in
18003 ia64*)
18004 shrext_cmds='.so'
18005 hardcode_into_libs=yes
18006 dynamic_linker="$host_os dld.so"
18007 shlibpath_var=LD_LIBRARY_PATH
18008 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
18009 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18010 soname_spec='${libname}${release}${shared_ext}$major'
18011 if test "X$HPUX_IA64_MODE" = X32; then
18012 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
18013 else
18014 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
18015 fi
18016 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
18017 ;;
18018 hppa*64*)
18019 shrext_cmds='.sl'
18020 hardcode_into_libs=yes
18021 dynamic_linker="$host_os dld.sl"
18022 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
18023 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
18024 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18025 soname_spec='${libname}${release}${shared_ext}$major'
18026 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
18027 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
18028 ;;
18029 *)
18030 shrext_cmds='.sl'
18031 dynamic_linker="$host_os dld.sl"
18032 shlibpath_var=SHLIB_PATH
18033 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
18034 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18035 soname_spec='${libname}${release}${shared_ext}$major'
18036 ;;
18037 esac
18038 # HP-UX runs *really* slowly unless shared libraries are mode 555.
18039 postinstall_cmds='chmod 555 $lib'
18040 ;;
18041
18042 irix5* | irix6* | nonstopux*)
18043 case $host_os in
18044 nonstopux*) version_type=nonstopux ;;
18045 *)
18046 if test "$lt_cv_prog_gnu_ld" = yes; then
18047 version_type=linux
18048 else
18049 version_type=irix
18050 fi ;;
18051 esac
18052 need_lib_prefix=no
18053 need_version=no
18054 soname_spec='${libname}${release}${shared_ext}$major'
18055 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
18056 case $host_os in
18057 irix5* | nonstopux*)
18058 libsuff= shlibsuff=
18059 ;;
18060 *)
18061 case $LD in # libtool.m4 will add one of these switches to LD
18062 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
18063 libsuff= shlibsuff= libmagic=32-bit;;
18064 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
18065 libsuff=32 shlibsuff=N32 libmagic=N32;;
18066 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
18067 libsuff=64 shlibsuff=64 libmagic=64-bit;;
18068 *) libsuff= shlibsuff= libmagic=never-match;;
18069 esac
18070 ;;
18071 esac
18072 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
18073 shlibpath_overrides_runpath=no
18074 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
18075 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
18076 hardcode_into_libs=yes
18077 ;;
18078
18079 # No shared lib support for Linux oldld, aout, or coff.
18080 linux*oldld* | linux*aout* | linux*coff*)
18081 dynamic_linker=no
18082 ;;
18083
18084 # This must be Linux ELF.
18085 linux*)
18086 version_type=linux
18087 need_lib_prefix=no
18088 need_version=no
18089 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18090 soname_spec='${libname}${release}${shared_ext}$major'
18091 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
18092 shlibpath_var=LD_LIBRARY_PATH
18093 shlibpath_overrides_runpath=no
18094 # This implies no fast_install, which is unacceptable.
18095 # Some rework will be needed to allow for fast_install
18096 # before this can be enabled.
18097 hardcode_into_libs=yes
18098
18099 # Append ld.so.conf contents to the search path
18100 if test -f /etc/ld.so.conf; then
18101 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' ' '`
18102 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
18103 fi
18104
18105 # We used to test for /lib/ld.so.1 and disable shared libraries on
18106 # powerpc, because MkLinux only supported shared libraries with the
18107 # GNU dynamic linker. Since this was broken with cross compilers,
18108 # most powerpc-linux boxes support dynamic linking these days and
18109 # people can always --disable-shared, the test was removed, and we
18110 # assume the GNU/Linux dynamic linker is in use.
18111 dynamic_linker='GNU/Linux ld.so'
18112 ;;
18113
18114 netbsdelf*-gnu)
18115 version_type=linux
18116 need_lib_prefix=no
18117 need_version=no
18118 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
18119 soname_spec='${libname}${release}${shared_ext}$major'
18120 shlibpath_var=LD_LIBRARY_PATH
18121 shlibpath_overrides_runpath=no
18122 hardcode_into_libs=yes
18123 dynamic_linker='NetBSD ld.elf_so'
18124 ;;
18125
18126 knetbsd*-gnu)
18127 version_type=linux
18128 need_lib_prefix=no
18129 need_version=no
18130 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
18131 soname_spec='${libname}${release}${shared_ext}$major'
18132 shlibpath_var=LD_LIBRARY_PATH
18133 shlibpath_overrides_runpath=no
18134 hardcode_into_libs=yes
18135 dynamic_linker='GNU ld.so'
18136 ;;
18137
18138 netbsd*)
18139 version_type=sunos
18140 need_lib_prefix=no
18141 need_version=no
18142 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
18143 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18144 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
18145 dynamic_linker='NetBSD (a.out) ld.so'
18146 else
18147 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
18148 soname_spec='${libname}${release}${shared_ext}$major'
18149 dynamic_linker='NetBSD ld.elf_so'
18150 fi
18151 shlibpath_var=LD_LIBRARY_PATH
18152 shlibpath_overrides_runpath=yes
18153 hardcode_into_libs=yes
18154 ;;
18155
18156 newsos6)
18157 version_type=linux
18158 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18159 shlibpath_var=LD_LIBRARY_PATH
18160 shlibpath_overrides_runpath=yes
18161 ;;
18162
18163 nto-qnx*)
18164 version_type=linux
18165 need_lib_prefix=no
18166 need_version=no
18167 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18168 soname_spec='${libname}${release}${shared_ext}$major'
18169 shlibpath_var=LD_LIBRARY_PATH
18170 shlibpath_overrides_runpath=yes
18171 ;;
18172
18173 openbsd*)
18174 version_type=sunos
18175 need_lib_prefix=no
18176 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
18177 case $host_os in
18178 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
18179 *) need_version=no ;;
18180 esac
18181 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18182 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
18183 shlibpath_var=LD_LIBRARY_PATH
18184 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
18185 case $host_os in
18186 openbsd2.[89] | openbsd2.[89].*)
18187 shlibpath_overrides_runpath=no
18188 ;;
18189 *)
18190 shlibpath_overrides_runpath=yes
18191 ;;
18192 esac
18193 else
18194 shlibpath_overrides_runpath=yes
18195 fi
18196 ;;
18197
18198 os2*)
18199 libname_spec='$name'
18200 shrext_cmds=".dll"
18201 need_lib_prefix=no
18202 library_names_spec='$libname${shared_ext} $libname.a'
18203 dynamic_linker='OS/2 ld.exe'
18204 shlibpath_var=LIBPATH
18205 ;;
18206
18207 osf3* | osf4* | osf5*)
18208 version_type=osf
18209 need_lib_prefix=no
18210 need_version=no
18211 soname_spec='${libname}${release}${shared_ext}$major'
18212 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18213 shlibpath_var=LD_LIBRARY_PATH
18214 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
18215 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
18216 ;;
18217
18218 sco3.2v5*)
18219 version_type=osf
18220 soname_spec='${libname}${release}${shared_ext}$major'
18221 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18222 shlibpath_var=LD_LIBRARY_PATH
18223 ;;
18224
18225 solaris*)
18226 version_type=linux
18227 need_lib_prefix=no
18228 need_version=no
18229 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18230 soname_spec='${libname}${release}${shared_ext}$major'
18231 shlibpath_var=LD_LIBRARY_PATH
18232 shlibpath_overrides_runpath=yes
18233 hardcode_into_libs=yes
18234 # ldd complains unless libraries are executable
18235 postinstall_cmds='chmod +x $lib'
18236 ;;
18237
18238 sunos4*)
18239 version_type=sunos
18240 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18241 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
18242 shlibpath_var=LD_LIBRARY_PATH
18243 shlibpath_overrides_runpath=yes
18244 if test "$with_gnu_ld" = yes; then
18245 need_lib_prefix=no
18246 fi
18247 need_version=yes
18248 ;;
18249
18250 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
18251 version_type=linux
18252 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18253 soname_spec='${libname}${release}${shared_ext}$major'
18254 shlibpath_var=LD_LIBRARY_PATH
18255 case $host_vendor in
18256 sni)
18257 shlibpath_overrides_runpath=no
18258 need_lib_prefix=no
18259 export_dynamic_flag_spec='${wl}-Blargedynsym'
18260 runpath_var=LD_RUN_PATH
18261 ;;
18262 siemens)
18263 need_lib_prefix=no
18264 ;;
18265 motorola)
18266 need_lib_prefix=no
18267 need_version=no
18268 shlibpath_overrides_runpath=no
18269 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
18270 ;;
18271 esac
18272 ;;
18273
18274 sysv4*MP*)
18275 if test -d /usr/nec ;then
18276 version_type=linux
18277 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
18278 soname_spec='$libname${shared_ext}.$major'
18279 shlibpath_var=LD_LIBRARY_PATH
18280 fi
18281 ;;
18282
18283 uts4*)
18284 version_type=linux
18285 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18286 soname_spec='${libname}${release}${shared_ext}$major'
18287 shlibpath_var=LD_LIBRARY_PATH
18288 ;;
18289
18290 *)
18291 dynamic_linker=no
18292 ;;
18293 esac
18294 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
18295 echo "${ECHO_T}$dynamic_linker" >&6
18296 test "$dynamic_linker" = no && can_build_shared=no
18297
18298 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
18299 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
18300 hardcode_action_GCJ=
18301 if test -n "$hardcode_libdir_flag_spec_GCJ" || \
18302 test -n "$runpath_var_GCJ" || \
18303 test "X$hardcode_automatic_GCJ" = "Xyes" ; then
18304
18305 # We can hardcode non-existant directories.
18306 if test "$hardcode_direct_GCJ" != no &&
18307 # If the only mechanism to avoid hardcoding is shlibpath_var, we
18308 # have to relink, otherwise we might link with an installed library
18309 # when we should be linking with a yet-to-be-installed one
18310 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
18311 test "$hardcode_minus_L_GCJ" != no; then
18312 # Linking always hardcodes the temporary library directory.
18313 hardcode_action_GCJ=relink
18314 else
18315 # We can link without hardcoding, and we can hardcode nonexisting dirs.
18316 hardcode_action_GCJ=immediate
18317 fi
18318 else
18319 # We cannot hardcode anything, or else we can only hardcode existing
18320 # directories.
18321 hardcode_action_GCJ=unsupported
18322 fi
18323 echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
18324 echo "${ECHO_T}$hardcode_action_GCJ" >&6
18325
18326 if test "$hardcode_action_GCJ" = relink; then
18327 # Fast installation is not supported
18328 enable_fast_install=no
18329 elif test "$shlibpath_overrides_runpath" = yes ||
18330 test "$enable_shared" = no; then
18331 # Fast installation is not necessary
18332 enable_fast_install=needless
18333 fi
18334
18335 striplib=
18336 old_striplib=
18337 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
18338 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
18339 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
18340 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
18341 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
18342 echo "$as_me:$LINENO: result: yes" >&5
18343 echo "${ECHO_T}yes" >&6
18344 else
18345 # FIXME - insert some real tests, host_os isn't really good enough
18346 case $host_os in
18347 darwin*)
18348 if test -n "$STRIP" ; then
18349 striplib="$STRIP -x"
18350 echo "$as_me:$LINENO: result: yes" >&5
18351 echo "${ECHO_T}yes" >&6
18352 else
18353 echo "$as_me:$LINENO: result: no" >&5
18354 echo "${ECHO_T}no" >&6
18355 fi
18356 ;;
18357 *)
18358 echo "$as_me:$LINENO: result: no" >&5
18359 echo "${ECHO_T}no" >&6
18360 ;;
18361 esac
18362 fi
18363
18364 if test "x$enable_dlopen" != xyes; then
18365 enable_dlopen=unknown
18366 enable_dlopen_self=unknown
18367 enable_dlopen_self_static=unknown
18368 else
18369 lt_cv_dlopen=no
18370 lt_cv_dlopen_libs=
18371
18372 case $host_os in
18373 beos*)
18374 lt_cv_dlopen="load_add_on"
18375 lt_cv_dlopen_libs=
18376 lt_cv_dlopen_self=yes
18377 ;;
18378
18379 mingw* | pw32*)
18380 lt_cv_dlopen="LoadLibrary"
18381 lt_cv_dlopen_libs=
18382 ;;
18383
18384 cygwin*)
18385 lt_cv_dlopen="dlopen"
18386 lt_cv_dlopen_libs=
18387 ;;
18388
18389 darwin*)
18390 # if libdl is installed we need to link against it
18391 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
18392 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
18393 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
18394 echo $ECHO_N "(cached) $ECHO_C" >&6
18395 else
18396 ac_check_lib_save_LIBS=$LIBS
18397 LIBS="-ldl $LIBS"
18398 cat >conftest.$ac_ext <<_ACEOF
18399 /* confdefs.h. */
18400 _ACEOF
18401 cat confdefs.h >>conftest.$ac_ext
18402 cat >>conftest.$ac_ext <<_ACEOF
18403 /* end confdefs.h. */
18404
18405 /* Override any gcc2 internal prototype to avoid an error. */
18406 #ifdef __cplusplus
18407 extern "C"
18408 #endif
18409 /* We use char because int might match the return type of a gcc2
18410 builtin and then its argument prototype would still apply. */
18411 char dlopen ();
18412 int
18413 main ()
18414 {
18415 dlopen ();
18416 ;
18417 return 0;
18418 }
18419 _ACEOF
18420 rm -f conftest.$ac_objext conftest$ac_exeext
18421 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18422 (eval $ac_link) 2>conftest.er1
18423 ac_status=$?
18424 grep -v '^ *+' conftest.er1 >conftest.err
18425 rm -f conftest.er1
18426 cat conftest.err >&5
18427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18428 (exit $ac_status); } &&
18429 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18431 (eval $ac_try) 2>&5
18432 ac_status=$?
18433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18434 (exit $ac_status); }; } &&
18435 { ac_try='test -s conftest$ac_exeext'
18436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18437 (eval $ac_try) 2>&5
18438 ac_status=$?
18439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18440 (exit $ac_status); }; }; then
18441 ac_cv_lib_dl_dlopen=yes
18442 else
18443 echo "$as_me: failed program was:" >&5
18444 sed 's/^/| /' conftest.$ac_ext >&5
18445
18446 ac_cv_lib_dl_dlopen=no
18447 fi
18448 rm -f conftest.err conftest.$ac_objext \
18449 conftest$ac_exeext conftest.$ac_ext
18450 LIBS=$ac_check_lib_save_LIBS
18451 fi
18452 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
18453 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
18454 if test $ac_cv_lib_dl_dlopen = yes; then
18455 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
18456 else
18457
18458 lt_cv_dlopen="dyld"
18459 lt_cv_dlopen_libs=
18460 lt_cv_dlopen_self=yes
18461
18462 fi
18463
18464 ;;
18465
18466 *)
18467 echo "$as_me:$LINENO: checking for shl_load" >&5
18468 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
18469 if test "${ac_cv_func_shl_load+set}" = set; then
18470 echo $ECHO_N "(cached) $ECHO_C" >&6
18471 else
18472 cat >conftest.$ac_ext <<_ACEOF
18473 /* confdefs.h. */
18474 _ACEOF
18475 cat confdefs.h >>conftest.$ac_ext
18476 cat >>conftest.$ac_ext <<_ACEOF
18477 /* end confdefs.h. */
18478 /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
18479 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18480 #define shl_load innocuous_shl_load
18481
18482 /* System header to define __stub macros and hopefully few prototypes,
18483 which can conflict with char shl_load (); below.
18484 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18485 <limits.h> exists even on freestanding compilers. */
18486
18487 #ifdef __STDC__
18488 # include <limits.h>
18489 #else
18490 # include <assert.h>
18491 #endif
18492
18493 #undef shl_load
18494
18495 /* Override any gcc2 internal prototype to avoid an error. */
18496 #ifdef __cplusplus
18497 extern "C"
18498 {
18499 #endif
18500 /* We use char because int might match the return type of a gcc2
18501 builtin and then its argument prototype would still apply. */
18502 char shl_load ();
18503 /* The GNU C library defines this for functions which it implements
18504 to always fail with ENOSYS. Some functions are actually named
18505 something starting with __ and the normal name is an alias. */
18506 #if defined (__stub_shl_load) || defined (__stub___shl_load)
18507 choke me
18508 #else
18509 char (*f) () = shl_load;
18510 #endif
18511 #ifdef __cplusplus
18512 }
18513 #endif
18514
18515 int
18516 main ()
18517 {
18518 return f != shl_load;
18519 ;
18520 return 0;
18521 }
18522 _ACEOF
18523 rm -f conftest.$ac_objext conftest$ac_exeext
18524 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18525 (eval $ac_link) 2>conftest.er1
18526 ac_status=$?
18527 grep -v '^ *+' conftest.er1 >conftest.err
18528 rm -f conftest.er1
18529 cat conftest.err >&5
18530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18531 (exit $ac_status); } &&
18532 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18534 (eval $ac_try) 2>&5
18535 ac_status=$?
18536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18537 (exit $ac_status); }; } &&
18538 { ac_try='test -s conftest$ac_exeext'
18539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18540 (eval $ac_try) 2>&5
18541 ac_status=$?
18542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18543 (exit $ac_status); }; }; then
18544 ac_cv_func_shl_load=yes
18545 else
18546 echo "$as_me: failed program was:" >&5
18547 sed 's/^/| /' conftest.$ac_ext >&5
18548
18549 ac_cv_func_shl_load=no
18550 fi
18551 rm -f conftest.err conftest.$ac_objext \
18552 conftest$ac_exeext conftest.$ac_ext
18553 fi
18554 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
18555 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
18556 if test $ac_cv_func_shl_load = yes; then
18557 lt_cv_dlopen="shl_load"
18558 else
18559 echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
18560 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
18561 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
18562 echo $ECHO_N "(cached) $ECHO_C" >&6
18563 else
18564 ac_check_lib_save_LIBS=$LIBS
18565 LIBS="-ldld $LIBS"
18566 cat >conftest.$ac_ext <<_ACEOF
18567 /* confdefs.h. */
18568 _ACEOF
18569 cat confdefs.h >>conftest.$ac_ext
18570 cat >>conftest.$ac_ext <<_ACEOF
18571 /* end confdefs.h. */
18572
18573 /* Override any gcc2 internal prototype to avoid an error. */
18574 #ifdef __cplusplus
18575 extern "C"
18576 #endif
18577 /* We use char because int might match the return type of a gcc2
18578 builtin and then its argument prototype would still apply. */
18579 char shl_load ();
18580 int
18581 main ()
18582 {
18583 shl_load ();
18584 ;
18585 return 0;
18586 }
18587 _ACEOF
18588 rm -f conftest.$ac_objext conftest$ac_exeext
18589 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18590 (eval $ac_link) 2>conftest.er1
18591 ac_status=$?
18592 grep -v '^ *+' conftest.er1 >conftest.err
18593 rm -f conftest.er1
18594 cat conftest.err >&5
18595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18596 (exit $ac_status); } &&
18597 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18599 (eval $ac_try) 2>&5
18600 ac_status=$?
18601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18602 (exit $ac_status); }; } &&
18603 { ac_try='test -s conftest$ac_exeext'
18604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18605 (eval $ac_try) 2>&5
18606 ac_status=$?
18607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18608 (exit $ac_status); }; }; then
18609 ac_cv_lib_dld_shl_load=yes
18610 else
18611 echo "$as_me: failed program was:" >&5
18612 sed 's/^/| /' conftest.$ac_ext >&5
18613
18614 ac_cv_lib_dld_shl_load=no
18615 fi
18616 rm -f conftest.err conftest.$ac_objext \
18617 conftest$ac_exeext conftest.$ac_ext
18618 LIBS=$ac_check_lib_save_LIBS
18619 fi
18620 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
18621 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
18622 if test $ac_cv_lib_dld_shl_load = yes; then
18623 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
18624 else
18625 echo "$as_me:$LINENO: checking for dlopen" >&5
18626 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
18627 if test "${ac_cv_func_dlopen+set}" = set; then
18628 echo $ECHO_N "(cached) $ECHO_C" >&6
18629 else
18630 cat >conftest.$ac_ext <<_ACEOF
18631 /* confdefs.h. */
18632 _ACEOF
18633 cat confdefs.h >>conftest.$ac_ext
18634 cat >>conftest.$ac_ext <<_ACEOF
18635 /* end confdefs.h. */
18636 /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
18637 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18638 #define dlopen innocuous_dlopen
18639
18640 /* System header to define __stub macros and hopefully few prototypes,
18641 which can conflict with char dlopen (); below.
18642 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18643 <limits.h> exists even on freestanding compilers. */
18644
18645 #ifdef __STDC__
18646 # include <limits.h>
18647 #else
18648 # include <assert.h>
18649 #endif
18650
18651 #undef dlopen
18652
18653 /* Override any gcc2 internal prototype to avoid an error. */
18654 #ifdef __cplusplus
18655 extern "C"
18656 {
18657 #endif
18658 /* We use char because int might match the return type of a gcc2
18659 builtin and then its argument prototype would still apply. */
18660 char dlopen ();
18661 /* The GNU C library defines this for functions which it implements
18662 to always fail with ENOSYS. Some functions are actually named
18663 something starting with __ and the normal name is an alias. */
18664 #if defined (__stub_dlopen) || defined (__stub___dlopen)
18665 choke me
18666 #else
18667 char (*f) () = dlopen;
18668 #endif
18669 #ifdef __cplusplus
18670 }
18671 #endif
18672
18673 int
18674 main ()
18675 {
18676 return f != dlopen;
18677 ;
18678 return 0;
18679 }
18680 _ACEOF
18681 rm -f conftest.$ac_objext conftest$ac_exeext
18682 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18683 (eval $ac_link) 2>conftest.er1
18684 ac_status=$?
18685 grep -v '^ *+' conftest.er1 >conftest.err
18686 rm -f conftest.er1
18687 cat conftest.err >&5
18688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18689 (exit $ac_status); } &&
18690 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18692 (eval $ac_try) 2>&5
18693 ac_status=$?
18694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18695 (exit $ac_status); }; } &&
18696 { ac_try='test -s conftest$ac_exeext'
18697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18698 (eval $ac_try) 2>&5
18699 ac_status=$?
18700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18701 (exit $ac_status); }; }; then
18702 ac_cv_func_dlopen=yes
18703 else
18704 echo "$as_me: failed program was:" >&5
18705 sed 's/^/| /' conftest.$ac_ext >&5
18706
18707 ac_cv_func_dlopen=no
18708 fi
18709 rm -f conftest.err conftest.$ac_objext \
18710 conftest$ac_exeext conftest.$ac_ext
18711 fi
18712 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
18713 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
18714 if test $ac_cv_func_dlopen = yes; then
18715 lt_cv_dlopen="dlopen"
18716 else
18717 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
18718 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
18719 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
18720 echo $ECHO_N "(cached) $ECHO_C" >&6
18721 else
18722 ac_check_lib_save_LIBS=$LIBS
18723 LIBS="-ldl $LIBS"
18724 cat >conftest.$ac_ext <<_ACEOF
18725 /* confdefs.h. */
18726 _ACEOF
18727 cat confdefs.h >>conftest.$ac_ext
18728 cat >>conftest.$ac_ext <<_ACEOF
18729 /* end confdefs.h. */
18730
18731 /* Override any gcc2 internal prototype to avoid an error. */
18732 #ifdef __cplusplus
18733 extern "C"
18734 #endif
18735 /* We use char because int might match the return type of a gcc2
18736 builtin and then its argument prototype would still apply. */
18737 char dlopen ();
18738 int
18739 main ()
18740 {
18741 dlopen ();
18742 ;
18743 return 0;
18744 }
18745 _ACEOF
18746 rm -f conftest.$ac_objext conftest$ac_exeext
18747 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18748 (eval $ac_link) 2>conftest.er1
18749 ac_status=$?
18750 grep -v '^ *+' conftest.er1 >conftest.err
18751 rm -f conftest.er1
18752 cat conftest.err >&5
18753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18754 (exit $ac_status); } &&
18755 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18757 (eval $ac_try) 2>&5
18758 ac_status=$?
18759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18760 (exit $ac_status); }; } &&
18761 { ac_try='test -s conftest$ac_exeext'
18762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18763 (eval $ac_try) 2>&5
18764 ac_status=$?
18765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18766 (exit $ac_status); }; }; then
18767 ac_cv_lib_dl_dlopen=yes
18768 else
18769 echo "$as_me: failed program was:" >&5
18770 sed 's/^/| /' conftest.$ac_ext >&5
18771
18772 ac_cv_lib_dl_dlopen=no
18773 fi
18774 rm -f conftest.err conftest.$ac_objext \
18775 conftest$ac_exeext conftest.$ac_ext
18776 LIBS=$ac_check_lib_save_LIBS
18777 fi
18778 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
18779 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
18780 if test $ac_cv_lib_dl_dlopen = yes; then
18781 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
18782 else
18783 echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
18784 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
18785 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
18786 echo $ECHO_N "(cached) $ECHO_C" >&6
18787 else
18788 ac_check_lib_save_LIBS=$LIBS
18789 LIBS="-lsvld $LIBS"
18790 cat >conftest.$ac_ext <<_ACEOF
18791 /* confdefs.h. */
18792 _ACEOF
18793 cat confdefs.h >>conftest.$ac_ext
18794 cat >>conftest.$ac_ext <<_ACEOF
18795 /* end confdefs.h. */
18796
18797 /* Override any gcc2 internal prototype to avoid an error. */
18798 #ifdef __cplusplus
18799 extern "C"
18800 #endif
18801 /* We use char because int might match the return type of a gcc2
18802 builtin and then its argument prototype would still apply. */
18803 char dlopen ();
18804 int
18805 main ()
18806 {
18807 dlopen ();
18808 ;
18809 return 0;
18810 }
18811 _ACEOF
18812 rm -f conftest.$ac_objext conftest$ac_exeext
18813 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18814 (eval $ac_link) 2>conftest.er1
18815 ac_status=$?
18816 grep -v '^ *+' conftest.er1 >conftest.err
18817 rm -f conftest.er1
18818 cat conftest.err >&5
18819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18820 (exit $ac_status); } &&
18821 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18823 (eval $ac_try) 2>&5
18824 ac_status=$?
18825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18826 (exit $ac_status); }; } &&
18827 { ac_try='test -s conftest$ac_exeext'
18828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18829 (eval $ac_try) 2>&5
18830 ac_status=$?
18831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18832 (exit $ac_status); }; }; then
18833 ac_cv_lib_svld_dlopen=yes
18834 else
18835 echo "$as_me: failed program was:" >&5
18836 sed 's/^/| /' conftest.$ac_ext >&5
18837
18838 ac_cv_lib_svld_dlopen=no
18839 fi
18840 rm -f conftest.err conftest.$ac_objext \
18841 conftest$ac_exeext conftest.$ac_ext
18842 LIBS=$ac_check_lib_save_LIBS
18843 fi
18844 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
18845 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
18846 if test $ac_cv_lib_svld_dlopen = yes; then
18847 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
18848 else
18849 echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
18850 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
18851 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
18852 echo $ECHO_N "(cached) $ECHO_C" >&6
18853 else
18854 ac_check_lib_save_LIBS=$LIBS
18855 LIBS="-ldld $LIBS"
18856 cat >conftest.$ac_ext <<_ACEOF
18857 /* confdefs.h. */
18858 _ACEOF
18859 cat confdefs.h >>conftest.$ac_ext
18860 cat >>conftest.$ac_ext <<_ACEOF
18861 /* end confdefs.h. */
18862
18863 /* Override any gcc2 internal prototype to avoid an error. */
18864 #ifdef __cplusplus
18865 extern "C"
18866 #endif
18867 /* We use char because int might match the return type of a gcc2
18868 builtin and then its argument prototype would still apply. */
18869 char dld_link ();
18870 int
18871 main ()
18872 {
18873 dld_link ();
18874 ;
18875 return 0;
18876 }
18877 _ACEOF
18878 rm -f conftest.$ac_objext conftest$ac_exeext
18879 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18880 (eval $ac_link) 2>conftest.er1
18881 ac_status=$?
18882 grep -v '^ *+' conftest.er1 >conftest.err
18883 rm -f conftest.er1
18884 cat conftest.err >&5
18885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18886 (exit $ac_status); } &&
18887 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18889 (eval $ac_try) 2>&5
18890 ac_status=$?
18891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18892 (exit $ac_status); }; } &&
18893 { ac_try='test -s conftest$ac_exeext'
18894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18895 (eval $ac_try) 2>&5
18896 ac_status=$?
18897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18898 (exit $ac_status); }; }; then
18899 ac_cv_lib_dld_dld_link=yes
18900 else
18901 echo "$as_me: failed program was:" >&5
18902 sed 's/^/| /' conftest.$ac_ext >&5
18903
18904 ac_cv_lib_dld_dld_link=no
18905 fi
18906 rm -f conftest.err conftest.$ac_objext \
18907 conftest$ac_exeext conftest.$ac_ext
18908 LIBS=$ac_check_lib_save_LIBS
18909 fi
18910 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
18911 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
18912 if test $ac_cv_lib_dld_dld_link = yes; then
18913 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
18914 fi
18915
18916
18917 fi
18918
18919
18920 fi
18921
18922
18923 fi
18924
18925
18926 fi
18927
18928
18929 fi
18930
18931 ;;
18932 esac
18933
18934 if test "x$lt_cv_dlopen" != xno; then
18935 enable_dlopen=yes
18936 else
18937 enable_dlopen=no
18938 fi
18939
18940 case $lt_cv_dlopen in
18941 dlopen)
18942 save_CPPFLAGS="$CPPFLAGS"
18943 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
18944
18945 save_LDFLAGS="$LDFLAGS"
18946 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
18947
18948 save_LIBS="$LIBS"
18949 LIBS="$lt_cv_dlopen_libs $LIBS"
18950
18951 echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
18952 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
18953 if test "${lt_cv_dlopen_self+set}" = set; then
18954 echo $ECHO_N "(cached) $ECHO_C" >&6
18955 else
18956 if test "$cross_compiling" = yes; then :
18957 lt_cv_dlopen_self=cross
18958 else
18959 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
18960 lt_status=$lt_dlunknown
18961 cat > conftest.$ac_ext <<EOF
18962 #line 18963 "configure"
18963 #include "confdefs.h"
18964
18965 #if HAVE_DLFCN_H
18966 #include <dlfcn.h>
18967 #endif
18968
18969 #include <stdio.h>
18970
18971 #ifdef RTLD_GLOBAL
18972 # define LT_DLGLOBAL RTLD_GLOBAL
18973 #else
18974 # ifdef DL_GLOBAL
18975 # define LT_DLGLOBAL DL_GLOBAL
18976 # else
18977 # define LT_DLGLOBAL 0
18978 # endif
18979 #endif
18980
18981 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
18982 find out it does not work in some platform. */
18983 #ifndef LT_DLLAZY_OR_NOW
18984 # ifdef RTLD_LAZY
18985 # define LT_DLLAZY_OR_NOW RTLD_LAZY
18986 # else
18987 # ifdef DL_LAZY
18988 # define LT_DLLAZY_OR_NOW DL_LAZY
18989 # else
18990 # ifdef RTLD_NOW
18991 # define LT_DLLAZY_OR_NOW RTLD_NOW
18992 # else
18993 # ifdef DL_NOW
18994 # define LT_DLLAZY_OR_NOW DL_NOW
18995 # else
18996 # define LT_DLLAZY_OR_NOW 0
18997 # endif
18998 # endif
18999 # endif
19000 # endif
19001 #endif
19002
19003 #ifdef __cplusplus
19004 extern "C" void exit (int);
19005 #endif
19006
19007 void fnord() { int i=42;}
19008 int main ()
19009 {
19010 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
19011 int status = $lt_dlunknown;
19012
19013 if (self)
19014 {
19015 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
19016 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
19017 /* dlclose (self); */
19018 }
19019
19020 exit (status);
19021 }
19022 EOF
19023 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19024 (eval $ac_link) 2>&5
19025 ac_status=$?
19026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19027 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
19028 (./conftest; exit; ) >&5 2>/dev/null
19029 lt_status=$?
19030 case x$lt_status in
19031 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
19032 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
19033 x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
19034 esac
19035 else :
19036 # compilation failed
19037 lt_cv_dlopen_self=no
19038 fi
19039 fi
19040 rm -fr conftest*
19041
19042
19043 fi
19044 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
19045 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
19046
19047 if test "x$lt_cv_dlopen_self" = xyes; then
19048 LDFLAGS="$LDFLAGS $link_static_flag"
19049 echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
19050 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
19051 if test "${lt_cv_dlopen_self_static+set}" = set; then
19052 echo $ECHO_N "(cached) $ECHO_C" >&6
19053 else
19054 if test "$cross_compiling" = yes; then :
19055 lt_cv_dlopen_self_static=cross
19056 else
19057 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
19058 lt_status=$lt_dlunknown
19059 cat > conftest.$ac_ext <<EOF
19060 #line 19061 "configure"
19061 #include "confdefs.h"
19062
19063 #if HAVE_DLFCN_H
19064 #include <dlfcn.h>
19065 #endif
19066
19067 #include <stdio.h>
19068
19069 #ifdef RTLD_GLOBAL
19070 # define LT_DLGLOBAL RTLD_GLOBAL
19071 #else
19072 # ifdef DL_GLOBAL
19073 # define LT_DLGLOBAL DL_GLOBAL
19074 # else
19075 # define LT_DLGLOBAL 0
19076 # endif
19077 #endif
19078
19079 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
19080 find out it does not work in some platform. */
19081 #ifndef LT_DLLAZY_OR_NOW
19082 # ifdef RTLD_LAZY
19083 # define LT_DLLAZY_OR_NOW RTLD_LAZY
19084 # else
19085 # ifdef DL_LAZY
19086 # define LT_DLLAZY_OR_NOW DL_LAZY
19087 # else
19088 # ifdef RTLD_NOW
19089 # define LT_DLLAZY_OR_NOW RTLD_NOW
19090 # else
19091 # ifdef DL_NOW
19092 # define LT_DLLAZY_OR_NOW DL_NOW
19093 # else
19094 # define LT_DLLAZY_OR_NOW 0
19095 # endif
19096 # endif
19097 # endif
19098 # endif
19099 #endif
19100
19101 #ifdef __cplusplus
19102 extern "C" void exit (int);
19103 #endif
19104
19105 void fnord() { int i=42;}
19106 int main ()
19107 {
19108 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
19109 int status = $lt_dlunknown;
19110
19111 if (self)
19112 {
19113 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
19114 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
19115 /* dlclose (self); */
19116 }
19117
19118 exit (status);
19119 }
19120 EOF
19121 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19122 (eval $ac_link) 2>&5
19123 ac_status=$?
19124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19125 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
19126 (./conftest; exit; ) >&5 2>/dev/null
19127 lt_status=$?
19128 case x$lt_status in
19129 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
19130 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
19131 x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
19132 esac
19133 else :
19134 # compilation failed
19135 lt_cv_dlopen_self_static=no
19136 fi
19137 fi
19138 rm -fr conftest*
19139
19140
19141 fi
19142 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
19143 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
19144 fi
19145
19146 CPPFLAGS="$save_CPPFLAGS"
19147 LDFLAGS="$save_LDFLAGS"
19148 LIBS="$save_LIBS"
19149 ;;
19150 esac
19151
19152 case $lt_cv_dlopen_self in
19153 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
19154 *) enable_dlopen_self=unknown ;;
19155 esac
19156
19157 case $lt_cv_dlopen_self_static in
19158 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
19159 *) enable_dlopen_self_static=unknown ;;
19160 esac
19161 fi
19162
19163
19164 # The else clause should only fire when bootstrapping the
19165 # libtool distribution, otherwise you forgot to ship ltmain.sh
19166 # with your package, and you will get complaints that there are
19167 # no rules to generate ltmain.sh.
19168 if test -f "$ltmain"; then
19169 # See if we are running on zsh, and set the options which allow our commands through
19170 # without removal of \ escapes.
19171 if test -n "${ZSH_VERSION+set}" ; then
19172 setopt NO_GLOB_SUBST
19173 fi
19174 # Now quote all the things that may contain metacharacters while being
19175 # careful not to overquote the AC_SUBSTed values. We take copies of the
19176 # variables and quote the copies for generation of the libtool script.
19177 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
19178 SED SHELL STRIP \
19179 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
19180 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
19181 deplibs_check_method reload_flag reload_cmds need_locks \
19182 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
19183 lt_cv_sys_global_symbol_to_c_name_address \
19184 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
19185 old_postinstall_cmds old_postuninstall_cmds \
19186 compiler_GCJ \
19187 CC_GCJ \
19188 LD_GCJ \
19189 lt_prog_compiler_wl_GCJ \
19190 lt_prog_compiler_pic_GCJ \
19191 lt_prog_compiler_static_GCJ \
19192 lt_prog_compiler_no_builtin_flag_GCJ \
19193 export_dynamic_flag_spec_GCJ \
19194 thread_safe_flag_spec_GCJ \
19195 whole_archive_flag_spec_GCJ \
19196 enable_shared_with_static_runtimes_GCJ \
19197 old_archive_cmds_GCJ \
19198 old_archive_from_new_cmds_GCJ \
19199 predep_objects_GCJ \
19200 postdep_objects_GCJ \
19201 predeps_GCJ \
19202 postdeps_GCJ \
19203 compiler_lib_search_path_GCJ \
19204 archive_cmds_GCJ \
19205 archive_expsym_cmds_GCJ \
19206 postinstall_cmds_GCJ \
19207 postuninstall_cmds_GCJ \
19208 old_archive_from_expsyms_cmds_GCJ \
19209 allow_undefined_flag_GCJ \
19210 no_undefined_flag_GCJ \
19211 export_symbols_cmds_GCJ \
19212 hardcode_libdir_flag_spec_GCJ \
19213 hardcode_libdir_flag_spec_ld_GCJ \
19214 hardcode_libdir_separator_GCJ \
19215 hardcode_automatic_GCJ \
19216 module_cmds_GCJ \
19217 module_expsym_cmds_GCJ \
19218 lt_cv_prog_compiler_c_o_GCJ \
19219 exclude_expsyms_GCJ \
19220 include_expsyms_GCJ; do
19221
19222 case $var in
19223 old_archive_cmds_GCJ | \
19224 old_archive_from_new_cmds_GCJ | \
19225 archive_cmds_GCJ | \
19226 archive_expsym_cmds_GCJ | \
19227 module_cmds_GCJ | \
19228 module_expsym_cmds_GCJ | \
19229 old_archive_from_expsyms_cmds_GCJ | \
19230 export_symbols_cmds_GCJ | \
19231 extract_expsyms_cmds | reload_cmds | finish_cmds | \
19232 postinstall_cmds | postuninstall_cmds | \
19233 old_postinstall_cmds | old_postuninstall_cmds | \
19234 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
19235 # Double-quote double-evaled strings.
19236 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
19237 ;;
19238 *)
19239 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
19240 ;;
19241 esac
19242 done
19243
19244 case $lt_echo in
19245 *'\$0 --fallback-echo"')
19246 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
19247 ;;
19248 esac
19249
19250 cfgfile="$ofile"
19251
19252 cat <<__EOF__ >> "$cfgfile"
19253 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
19254
19255 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
19256
19257 # Shell to use when invoking shell scripts.
19258 SHELL=$lt_SHELL
19259
19260 # Whether or not to build shared libraries.
19261 build_libtool_libs=$enable_shared
19262
19263 # Whether or not to build static libraries.
19264 build_old_libs=$enable_static
19265
19266 # Whether or not to add -lc for building shared libraries.
19267 build_libtool_need_lc=$archive_cmds_need_lc_GCJ
19268
19269 # Whether or not to disallow shared libs when runtime libs are static
19270 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
19271
19272 # Whether or not to optimize for fast installation.
19273 fast_install=$enable_fast_install
19274
19275 # The host system.
19276 host_alias=$host_alias
19277 host=$host
19278 host_os=$host_os
19279
19280 # The build system.
19281 build_alias=$build_alias
19282 build=$build
19283 build_os=$build_os
19284
19285 # An echo program that does not interpret backslashes.
19286 echo=$lt_echo
19287
19288 # The archiver.
19289 AR=$lt_AR
19290 AR_FLAGS=$lt_AR_FLAGS
19291
19292 # A C compiler.
19293 LTCC=$lt_LTCC
19294
19295 # A language-specific compiler.
19296 CC=$lt_compiler_GCJ
19297
19298 # Is the compiler the GNU C compiler?
19299 with_gcc=$GCC_GCJ
19300
19301 # An ERE matcher.
19302 EGREP=$lt_EGREP
19303
19304 # The linker used to build libraries.
19305 LD=$lt_LD_GCJ
19306
19307 # Whether we need hard or soft links.
19308 LN_S=$lt_LN_S
19309
19310 # A BSD-compatible nm program.
19311 NM=$lt_NM
19312
19313 # A symbol stripping program
19314 STRIP=$lt_STRIP
19315
19316 # Used to examine libraries when file_magic_cmd begins "file"
19317 MAGIC_CMD=$MAGIC_CMD
19318
19319 # Used on cygwin: DLL creation program.
19320 DLLTOOL="$DLLTOOL"
19321
19322 # Used on cygwin: object dumper.
19323 OBJDUMP="$OBJDUMP"
19324
19325 # Used on cygwin: assembler.
19326 AS="$AS"
19327
19328 # The name of the directory that contains temporary libtool files.
19329 objdir=$objdir
19330
19331 # How to create reloadable object files.
19332 reload_flag=$lt_reload_flag
19333 reload_cmds=$lt_reload_cmds
19334
19335 # How to pass a linker flag through the compiler.
19336 wl=$lt_lt_prog_compiler_wl_GCJ
19337
19338 # Object file suffix (normally "o").
19339 objext="$ac_objext"
19340
19341 # Old archive suffix (normally "a").
19342 libext="$libext"
19343
19344 # Shared library suffix (normally ".so").
19345 shrext_cmds='$shrext_cmds'
19346
19347 # Executable file suffix (normally "").
19348 exeext="$exeext"
19349
19350 # Additional compiler flags for building library objects.
19351 pic_flag=$lt_lt_prog_compiler_pic_GCJ
19352 pic_mode=$pic_mode
19353
19354 # What is the maximum length of a command?
19355 max_cmd_len=$lt_cv_sys_max_cmd_len
19356
19357 # Does compiler simultaneously support -c and -o options?
19358 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
19359
19360 # Must we lock files when doing compilation?
19361 need_locks=$lt_need_locks
19362
19363 # Do we need the lib prefix for modules?
19364 need_lib_prefix=$need_lib_prefix
19365
19366 # Do we need a version for libraries?
19367 need_version=$need_version
19368
19369 # Whether dlopen is supported.
19370 dlopen_support=$enable_dlopen
19371
19372 # Whether dlopen of programs is supported.
19373 dlopen_self=$enable_dlopen_self
19374
19375 # Whether dlopen of statically linked programs is supported.
19376 dlopen_self_static=$enable_dlopen_self_static
19377
19378 # Compiler flag to prevent dynamic linking.
19379 link_static_flag=$lt_lt_prog_compiler_static_GCJ
19380
19381 # Compiler flag to turn off builtin functions.
19382 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
19383
19384 # Compiler flag to allow reflexive dlopens.
19385 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
19386
19387 # Compiler flag to generate shared objects directly from archives.
19388 whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
19389
19390 # Compiler flag to generate thread-safe objects.
19391 thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
19392
19393 # Library versioning type.
19394 version_type=$version_type
19395
19396 # Format of library name prefix.
19397 libname_spec=$lt_libname_spec
19398
19399 # List of archive names. First name is the real one, the rest are links.
19400 # The last name is the one that the linker finds with -lNAME.
19401 library_names_spec=$lt_library_names_spec
19402
19403 # The coded name of the library, if different from the real name.
19404 soname_spec=$lt_soname_spec
19405
19406 # Commands used to build and install an old-style archive.
19407 RANLIB=$lt_RANLIB
19408 old_archive_cmds=$lt_old_archive_cmds_GCJ
19409 old_postinstall_cmds=$lt_old_postinstall_cmds
19410 old_postuninstall_cmds=$lt_old_postuninstall_cmds
19411
19412 # Create an old-style archive from a shared archive.
19413 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
19414
19415 # Create a temporary old-style archive to link instead of a shared archive.
19416 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
19417
19418 # Commands used to build and install a shared archive.
19419 archive_cmds=$lt_archive_cmds_GCJ
19420 archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
19421 postinstall_cmds=$lt_postinstall_cmds
19422 postuninstall_cmds=$lt_postuninstall_cmds
19423
19424 # Commands used to build a loadable module (assumed same as above if empty)
19425 module_cmds=$lt_module_cmds_GCJ
19426 module_expsym_cmds=$lt_module_expsym_cmds_GCJ
19427
19428 # Commands to strip libraries.
19429 old_striplib=$lt_old_striplib
19430 striplib=$lt_striplib
19431
19432 # Dependencies to place before the objects being linked to create a
19433 # shared library.
19434 predep_objects=$lt_predep_objects_GCJ
19435
19436 # Dependencies to place after the objects being linked to create a
19437 # shared library.
19438 postdep_objects=$lt_postdep_objects_GCJ
19439
19440 # Dependencies to place before the objects being linked to create a
19441 # shared library.
19442 predeps=$lt_predeps_GCJ
19443
19444 # Dependencies to place after the objects being linked to create a
19445 # shared library.
19446 postdeps=$lt_postdeps_GCJ
19447
19448 # The library search path used internally by the compiler when linking
19449 # a shared library.
19450 compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
19451
19452 # Method to check whether dependent libraries are shared objects.
19453 deplibs_check_method=$lt_deplibs_check_method
19454
19455 # Command to use when deplibs_check_method == file_magic.
19456 file_magic_cmd=$lt_file_magic_cmd
19457
19458 # Flag that allows shared libraries with undefined symbols to be built.
19459 allow_undefined_flag=$lt_allow_undefined_flag_GCJ
19460
19461 # Flag that forces no undefined symbols.
19462 no_undefined_flag=$lt_no_undefined_flag_GCJ
19463
19464 # Commands used to finish a libtool library installation in a directory.
19465 finish_cmds=$lt_finish_cmds
19466
19467 # Same as above, but a single script fragment to be evaled but not shown.
19468 finish_eval=$lt_finish_eval
19469
19470 # Take the output of nm and produce a listing of raw symbols and C names.
19471 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
19472
19473 # Transform the output of nm in a proper C declaration
19474 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
19475
19476 # Transform the output of nm in a C name address pair
19477 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
19478
19479 # This is the shared library runtime path variable.
19480 runpath_var=$runpath_var
19481
19482 # This is the shared library path variable.
19483 shlibpath_var=$shlibpath_var
19484
19485 # Is shlibpath searched before the hard-coded library search path?
19486 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
19487
19488 # How to hardcode a shared library path into an executable.
19489 hardcode_action=$hardcode_action_GCJ
19490
19491 # Whether we should hardcode library paths into libraries.
19492 hardcode_into_libs=$hardcode_into_libs
19493
19494 # Flag to hardcode \$libdir into a binary during linking.
19495 # This must work even if \$libdir does not exist.
19496 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
19497
19498 # If ld is used when linking, flag to hardcode \$libdir into
19499 # a binary during linking. This must work even if \$libdir does
19500 # not exist.
19501 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
19502
19503 # Whether we need a single -rpath flag with a separated argument.
19504 hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
19505
19506 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
19507 # resulting binary.
19508 hardcode_direct=$hardcode_direct_GCJ
19509
19510 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
19511 # resulting binary.
19512 hardcode_minus_L=$hardcode_minus_L_GCJ
19513
19514 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
19515 # the resulting binary.
19516 hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
19517
19518 # Set to yes if building a shared library automatically hardcodes DIR into the library
19519 # and all subsequent libraries and executables linked against it.
19520 hardcode_automatic=$hardcode_automatic_GCJ
19521
19522 # Variables whose values should be saved in libtool wrapper scripts and
19523 # restored at relink time.
19524 variables_saved_for_relink="$variables_saved_for_relink"
19525
19526 # Whether libtool must link a program against all its dependency libraries.
19527 link_all_deplibs=$link_all_deplibs_GCJ
19528
19529 # Compile-time system search path for libraries
19530 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
19531
19532 # Run-time system search path for libraries
19533 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
19534
19535 # Fix the shell variable \$srcfile for the compiler.
19536 fix_srcfile_path="$fix_srcfile_path_GCJ"
19537
19538 # Set to yes if exported symbols are required.
19539 always_export_symbols=$always_export_symbols_GCJ
19540
19541 # The commands to list exported symbols.
19542 export_symbols_cmds=$lt_export_symbols_cmds_GCJ
19543
19544 # The commands to extract the exported symbol list from a shared archive.
19545 extract_expsyms_cmds=$lt_extract_expsyms_cmds
19546
19547 # Symbols that should not be listed in the preloaded symbols.
19548 exclude_expsyms=$lt_exclude_expsyms_GCJ
19549
19550 # Symbols that must always be exported.
19551 include_expsyms=$lt_include_expsyms_GCJ
19552
19553 # ### END LIBTOOL TAG CONFIG: $tagname
19554
19555 __EOF__
19556
19557
19558 else
19559 # If there is no Makefile yet, we rely on a make rule to execute
19560 # `config.status --recheck' to rerun these tests and create the
19561 # libtool script then.
19562 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
19563 if test -f "$ltmain_in"; then
19564 test -f Makefile && make "$ltmain"
19565 fi
19566 fi
19567
19568
19569 ac_ext=c
19570 ac_cpp='$CPP $CPPFLAGS'
19571 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19572 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19573 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19574
19575 CC="$lt_save_CC"
19576
19577 else
19578 tagname=""
19579 fi
19580 ;;
19581
19582 RC)
19583
19584
19585
19586 # Source file extension for RC test sources.
19587 ac_ext=rc
19588
19589 # Object file extension for compiled RC test sources.
19590 objext=o
19591 objext_RC=$objext
19592
19593 # Code to be used in simple compile tests
19594 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
19595
19596 # Code to be used in simple link tests
19597 lt_simple_link_test_code="$lt_simple_compile_test_code"
19598
19599 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
19600
19601 # If no C compiler was specified, use CC.
19602 LTCC=${LTCC-"$CC"}
19603
19604 # Allow CC to be a program name with arguments.
19605 compiler=$CC
19606
19607
19608 # save warnings/boilerplate of simple test code
19609 ac_outfile=conftest.$ac_objext
19610 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
19611 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
19612 _lt_compiler_boilerplate=`cat conftest.err`
19613 $rm conftest*
19614
19615 ac_outfile=conftest.$ac_objext
19616 printf "$lt_simple_link_test_code" >conftest.$ac_ext
19617 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
19618 _lt_linker_boilerplate=`cat conftest.err`
19619 $rm conftest*
19620
19621
19622 # Allow CC to be a program name with arguments.
19623 lt_save_CC="$CC"
19624 CC=${RC-"windres"}
19625 compiler=$CC
19626 compiler_RC=$CC
19627 for cc_temp in $compiler""; do
19628 case $cc_temp in
19629 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
19630 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
19631 \-*) ;;
19632 *) break;;
19633 esac
19634 done
19635 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
19636
19637 lt_cv_prog_compiler_c_o_RC=yes
19638
19639 # The else clause should only fire when bootstrapping the
19640 # libtool distribution, otherwise you forgot to ship ltmain.sh
19641 # with your package, and you will get complaints that there are
19642 # no rules to generate ltmain.sh.
19643 if test -f "$ltmain"; then
19644 # See if we are running on zsh, and set the options which allow our commands through
19645 # without removal of \ escapes.
19646 if test -n "${ZSH_VERSION+set}" ; then
19647 setopt NO_GLOB_SUBST
19648 fi
19649 # Now quote all the things that may contain metacharacters while being
19650 # careful not to overquote the AC_SUBSTed values. We take copies of the
19651 # variables and quote the copies for generation of the libtool script.
19652 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
19653 SED SHELL STRIP \
19654 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
19655 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
19656 deplibs_check_method reload_flag reload_cmds need_locks \
19657 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
19658 lt_cv_sys_global_symbol_to_c_name_address \
19659 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
19660 old_postinstall_cmds old_postuninstall_cmds \
19661 compiler_RC \
19662 CC_RC \
19663 LD_RC \
19664 lt_prog_compiler_wl_RC \
19665 lt_prog_compiler_pic_RC \
19666 lt_prog_compiler_static_RC \
19667 lt_prog_compiler_no_builtin_flag_RC \
19668 export_dynamic_flag_spec_RC \
19669 thread_safe_flag_spec_RC \
19670 whole_archive_flag_spec_RC \
19671 enable_shared_with_static_runtimes_RC \
19672 old_archive_cmds_RC \
19673 old_archive_from_new_cmds_RC \
19674 predep_objects_RC \
19675 postdep_objects_RC \
19676 predeps_RC \
19677 postdeps_RC \
19678 compiler_lib_search_path_RC \
19679 archive_cmds_RC \
19680 archive_expsym_cmds_RC \
19681 postinstall_cmds_RC \
19682 postuninstall_cmds_RC \
19683 old_archive_from_expsyms_cmds_RC \
19684 allow_undefined_flag_RC \
19685 no_undefined_flag_RC \
19686 export_symbols_cmds_RC \
19687 hardcode_libdir_flag_spec_RC \
19688 hardcode_libdir_flag_spec_ld_RC \
19689 hardcode_libdir_separator_RC \
19690 hardcode_automatic_RC \
19691 module_cmds_RC \
19692 module_expsym_cmds_RC \
19693 lt_cv_prog_compiler_c_o_RC \
19694 exclude_expsyms_RC \
19695 include_expsyms_RC; do
19696
19697 case $var in
19698 old_archive_cmds_RC | \
19699 old_archive_from_new_cmds_RC | \
19700 archive_cmds_RC | \
19701 archive_expsym_cmds_RC | \
19702 module_cmds_RC | \
19703 module_expsym_cmds_RC | \
19704 old_archive_from_expsyms_cmds_RC | \
19705 export_symbols_cmds_RC | \
19706 extract_expsyms_cmds | reload_cmds | finish_cmds | \
19707 postinstall_cmds | postuninstall_cmds | \
19708 old_postinstall_cmds | old_postuninstall_cmds | \
19709 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
19710 # Double-quote double-evaled strings.
19711 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
19712 ;;
19713 *)
19714 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
19715 ;;
19716 esac
19717 done
19718
19719 case $lt_echo in
19720 *'\$0 --fallback-echo"')
19721 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
19722 ;;
19723 esac
19724
19725 cfgfile="$ofile"
19726
19727 cat <<__EOF__ >> "$cfgfile"
19728 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
19729
19730 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
19731
19732 # Shell to use when invoking shell scripts.
19733 SHELL=$lt_SHELL
19734
19735 # Whether or not to build shared libraries.
19736 build_libtool_libs=$enable_shared
19737
19738 # Whether or not to build static libraries.
19739 build_old_libs=$enable_static
19740
19741 # Whether or not to add -lc for building shared libraries.
19742 build_libtool_need_lc=$archive_cmds_need_lc_RC
19743
19744 # Whether or not to disallow shared libs when runtime libs are static
19745 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
19746
19747 # Whether or not to optimize for fast installation.
19748 fast_install=$enable_fast_install
19749
19750 # The host system.
19751 host_alias=$host_alias
19752 host=$host
19753 host_os=$host_os
19754
19755 # The build system.
19756 build_alias=$build_alias
19757 build=$build
19758 build_os=$build_os
19759
19760 # An echo program that does not interpret backslashes.
19761 echo=$lt_echo
19762
19763 # The archiver.
19764 AR=$lt_AR
19765 AR_FLAGS=$lt_AR_FLAGS
19766
19767 # A C compiler.
19768 LTCC=$lt_LTCC
19769
19770 # A language-specific compiler.
19771 CC=$lt_compiler_RC
19772
19773 # Is the compiler the GNU C compiler?
19774 with_gcc=$GCC_RC
19775
19776 # An ERE matcher.
19777 EGREP=$lt_EGREP
19778
19779 # The linker used to build libraries.
19780 LD=$lt_LD_RC
19781
19782 # Whether we need hard or soft links.
19783 LN_S=$lt_LN_S
19784
19785 # A BSD-compatible nm program.
19786 NM=$lt_NM
19787
19788 # A symbol stripping program
19789 STRIP=$lt_STRIP
19790
19791 # Used to examine libraries when file_magic_cmd begins "file"
19792 MAGIC_CMD=$MAGIC_CMD
19793
19794 # Used on cygwin: DLL creation program.
19795 DLLTOOL="$DLLTOOL"
19796
19797 # Used on cygwin: object dumper.
19798 OBJDUMP="$OBJDUMP"
19799
19800 # Used on cygwin: assembler.
19801 AS="$AS"
19802
19803 # The name of the directory that contains temporary libtool files.
19804 objdir=$objdir
19805
19806 # How to create reloadable object files.
19807 reload_flag=$lt_reload_flag
19808 reload_cmds=$lt_reload_cmds
19809
19810 # How to pass a linker flag through the compiler.
19811 wl=$lt_lt_prog_compiler_wl_RC
19812
19813 # Object file suffix (normally "o").
19814 objext="$ac_objext"
19815
19816 # Old archive suffix (normally "a").
19817 libext="$libext"
19818
19819 # Shared library suffix (normally ".so").
19820 shrext_cmds='$shrext_cmds'
19821
19822 # Executable file suffix (normally "").
19823 exeext="$exeext"
19824
19825 # Additional compiler flags for building library objects.
19826 pic_flag=$lt_lt_prog_compiler_pic_RC
19827 pic_mode=$pic_mode
19828
19829 # What is the maximum length of a command?
19830 max_cmd_len=$lt_cv_sys_max_cmd_len
19831
19832 # Does compiler simultaneously support -c and -o options?
19833 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
19834
19835 # Must we lock files when doing compilation?
19836 need_locks=$lt_need_locks
19837
19838 # Do we need the lib prefix for modules?
19839 need_lib_prefix=$need_lib_prefix
19840
19841 # Do we need a version for libraries?
19842 need_version=$need_version
19843
19844 # Whether dlopen is supported.
19845 dlopen_support=$enable_dlopen
19846
19847 # Whether dlopen of programs is supported.
19848 dlopen_self=$enable_dlopen_self
19849
19850 # Whether dlopen of statically linked programs is supported.
19851 dlopen_self_static=$enable_dlopen_self_static
19852
19853 # Compiler flag to prevent dynamic linking.
19854 link_static_flag=$lt_lt_prog_compiler_static_RC
19855
19856 # Compiler flag to turn off builtin functions.
19857 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
19858
19859 # Compiler flag to allow reflexive dlopens.
19860 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
19861
19862 # Compiler flag to generate shared objects directly from archives.
19863 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
19864
19865 # Compiler flag to generate thread-safe objects.
19866 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
19867
19868 # Library versioning type.
19869 version_type=$version_type
19870
19871 # Format of library name prefix.
19872 libname_spec=$lt_libname_spec
19873
19874 # List of archive names. First name is the real one, the rest are links.
19875 # The last name is the one that the linker finds with -lNAME.
19876 library_names_spec=$lt_library_names_spec
19877
19878 # The coded name of the library, if different from the real name.
19879 soname_spec=$lt_soname_spec
19880
19881 # Commands used to build and install an old-style archive.
19882 RANLIB=$lt_RANLIB
19883 old_archive_cmds=$lt_old_archive_cmds_RC
19884 old_postinstall_cmds=$lt_old_postinstall_cmds
19885 old_postuninstall_cmds=$lt_old_postuninstall_cmds
19886
19887 # Create an old-style archive from a shared archive.
19888 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
19889
19890 # Create a temporary old-style archive to link instead of a shared archive.
19891 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
19892
19893 # Commands used to build and install a shared archive.
19894 archive_cmds=$lt_archive_cmds_RC
19895 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
19896 postinstall_cmds=$lt_postinstall_cmds
19897 postuninstall_cmds=$lt_postuninstall_cmds
19898
19899 # Commands used to build a loadable module (assumed same as above if empty)
19900 module_cmds=$lt_module_cmds_RC
19901 module_expsym_cmds=$lt_module_expsym_cmds_RC
19902
19903 # Commands to strip libraries.
19904 old_striplib=$lt_old_striplib
19905 striplib=$lt_striplib
19906
19907 # Dependencies to place before the objects being linked to create a
19908 # shared library.
19909 predep_objects=$lt_predep_objects_RC
19910
19911 # Dependencies to place after the objects being linked to create a
19912 # shared library.
19913 postdep_objects=$lt_postdep_objects_RC
19914
19915 # Dependencies to place before the objects being linked to create a
19916 # shared library.
19917 predeps=$lt_predeps_RC
19918
19919 # Dependencies to place after the objects being linked to create a
19920 # shared library.
19921 postdeps=$lt_postdeps_RC
19922
19923 # The library search path used internally by the compiler when linking
19924 # a shared library.
19925 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
19926
19927 # Method to check whether dependent libraries are shared objects.
19928 deplibs_check_method=$lt_deplibs_check_method
19929
19930 # Command to use when deplibs_check_method == file_magic.
19931 file_magic_cmd=$lt_file_magic_cmd
19932
19933 # Flag that allows shared libraries with undefined symbols to be built.
19934 allow_undefined_flag=$lt_allow_undefined_flag_RC
19935
19936 # Flag that forces no undefined symbols.
19937 no_undefined_flag=$lt_no_undefined_flag_RC
19938
19939 # Commands used to finish a libtool library installation in a directory.
19940 finish_cmds=$lt_finish_cmds
19941
19942 # Same as above, but a single script fragment to be evaled but not shown.
19943 finish_eval=$lt_finish_eval
19944
19945 # Take the output of nm and produce a listing of raw symbols and C names.
19946 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
19947
19948 # Transform the output of nm in a proper C declaration
19949 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
19950
19951 # Transform the output of nm in a C name address pair
19952 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
19953
19954 # This is the shared library runtime path variable.
19955 runpath_var=$runpath_var
19956
19957 # This is the shared library path variable.
19958 shlibpath_var=$shlibpath_var
19959
19960 # Is shlibpath searched before the hard-coded library search path?
19961 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
19962
19963 # How to hardcode a shared library path into an executable.
19964 hardcode_action=$hardcode_action_RC
19965
19966 # Whether we should hardcode library paths into libraries.
19967 hardcode_into_libs=$hardcode_into_libs
19968
19969 # Flag to hardcode \$libdir into a binary during linking.
19970 # This must work even if \$libdir does not exist.
19971 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
19972
19973 # If ld is used when linking, flag to hardcode \$libdir into
19974 # a binary during linking. This must work even if \$libdir does
19975 # not exist.
19976 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
19977
19978 # Whether we need a single -rpath flag with a separated argument.
19979 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
19980
19981 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
19982 # resulting binary.
19983 hardcode_direct=$hardcode_direct_RC
19984
19985 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
19986 # resulting binary.
19987 hardcode_minus_L=$hardcode_minus_L_RC
19988
19989 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
19990 # the resulting binary.
19991 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
19992
19993 # Set to yes if building a shared library automatically hardcodes DIR into the library
19994 # and all subsequent libraries and executables linked against it.
19995 hardcode_automatic=$hardcode_automatic_RC
19996
19997 # Variables whose values should be saved in libtool wrapper scripts and
19998 # restored at relink time.
19999 variables_saved_for_relink="$variables_saved_for_relink"
20000
20001 # Whether libtool must link a program against all its dependency libraries.
20002 link_all_deplibs=$link_all_deplibs_RC
20003
20004 # Compile-time system search path for libraries
20005 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
20006
20007 # Run-time system search path for libraries
20008 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
20009
20010 # Fix the shell variable \$srcfile for the compiler.
20011 fix_srcfile_path="$fix_srcfile_path_RC"
20012
20013 # Set to yes if exported symbols are required.
20014 always_export_symbols=$always_export_symbols_RC
20015
20016 # The commands to list exported symbols.
20017 export_symbols_cmds=$lt_export_symbols_cmds_RC
20018
20019 # The commands to extract the exported symbol list from a shared archive.
20020 extract_expsyms_cmds=$lt_extract_expsyms_cmds
20021
20022 # Symbols that should not be listed in the preloaded symbols.
20023 exclude_expsyms=$lt_exclude_expsyms_RC
20024
20025 # Symbols that must always be exported.
20026 include_expsyms=$lt_include_expsyms_RC
20027
20028 # ### END LIBTOOL TAG CONFIG: $tagname
20029
20030 __EOF__
20031
20032
20033 else
20034 # If there is no Makefile yet, we rely on a make rule to execute
20035 # `config.status --recheck' to rerun these tests and create the
20036 # libtool script then.
20037 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
20038 if test -f "$ltmain_in"; then
20039 test -f Makefile && make "$ltmain"
20040 fi
20041 fi
20042
20043
20044 ac_ext=c
20045 ac_cpp='$CPP $CPPFLAGS'
20046 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20047 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20048 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20049
20050 CC="$lt_save_CC"
20051
20052 ;;
20053
20054 *)
20055 { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
20056 echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
20057 { (exit 1); exit 1; }; }
20058 ;;
20059 esac
20060
20061 # Append the new tag name to the list of available tags.
20062 if test -n "$tagname" ; then
20063 available_tags="$available_tags $tagname"
20064 fi
20065 fi
20066 done
20067 IFS="$lt_save_ifs"
20068
20069 # Now substitute the updated list of available tags.
20070 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
20071 mv "${ofile}T" "$ofile"
20072 chmod +x "$ofile"
20073 else
20074 rm -f "${ofile}T"
20075 { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
20076 echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
20077 { (exit 1); exit 1; }; }
20078 fi
20079 fi
20080
20081
20082
20083 # This can be used to rebuild libtool when needed
20084 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
20085
20086 # Always use our own libtool.
20087 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
20088
20089 # Prevent multiple expansion
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111 echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
20112 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
20113 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
20114 if test "${enable_maintainer_mode+set}" = set; then
20115 enableval="$enable_maintainer_mode"
20116 USE_MAINTAINER_MODE=$enableval
20117 else
20118 USE_MAINTAINER_MODE=no
20119 fi;
20120 echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
20121 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
20122
20123
20124 if test $USE_MAINTAINER_MODE = yes; then
20125 MAINTAINER_MODE_TRUE=
20126 MAINTAINER_MODE_FALSE='#'
20127 else
20128 MAINTAINER_MODE_TRUE='#'
20129 MAINTAINER_MODE_FALSE=
20130 fi
20131 MAINT=$MAINTAINER_MODE_TRUE
20132
20133
20134
20135 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20136 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20137 if test "${ac_cv_c_const+set}" = set; then
20138 echo $ECHO_N "(cached) $ECHO_C" >&6
20139 else
20140 cat >conftest.$ac_ext <<_ACEOF
20141 /* confdefs.h. */
20142 _ACEOF
20143 cat confdefs.h >>conftest.$ac_ext
20144 cat >>conftest.$ac_ext <<_ACEOF
20145 /* end confdefs.h. */
20146
20147 int
20148 main ()
20149 {
20150 /* FIXME: Include the comments suggested by Paul. */
20151 #ifndef __cplusplus
20152 /* Ultrix mips cc rejects this. */
20153 typedef int charset[2];
20154 const charset x;
20155 /* SunOS 4.1.1 cc rejects this. */
20156 char const *const *ccp;
20157 char **p;
20158 /* NEC SVR4.0.2 mips cc rejects this. */
20159 struct point {int x, y;};
20160 static struct point const zero = {0,0};
20161 /* AIX XL C 1.02.0.0 rejects this.
20162 It does not let you subtract one const X* pointer from another in
20163 an arm of an if-expression whose if-part is not a constant
20164 expression */
20165 const char *g = "string";
20166 ccp = &g + (g ? g-g : 0);
20167 /* HPUX 7.0 cc rejects these. */
20168 ++ccp;
20169 p = (char**) ccp;
20170 ccp = (char const *const *) p;
20171 { /* SCO 3.2v4 cc rejects this. */
20172 char *t;
20173 char const *s = 0 ? (char *) 0 : (char const *) 0;
20174
20175 *t++ = 0;
20176 }
20177 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20178 int x[] = {25, 17};
20179 const int *foo = &x[0];
20180 ++foo;
20181 }
20182 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20183 typedef const int *iptr;
20184 iptr p = 0;
20185 ++p;
20186 }
20187 { /* AIX XL C 1.02.0.0 rejects this saying
20188 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20189 struct s { int j; const int *ap[3]; };
20190 struct s *b; b->j = 5;
20191 }
20192 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20193 const int foo = 10;
20194 }
20195 #endif
20196
20197 ;
20198 return 0;
20199 }
20200 _ACEOF
20201 rm -f conftest.$ac_objext
20202 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20203 (eval $ac_compile) 2>conftest.er1
20204 ac_status=$?
20205 grep -v '^ *+' conftest.er1 >conftest.err
20206 rm -f conftest.er1
20207 cat conftest.err >&5
20208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20209 (exit $ac_status); } &&
20210 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20212 (eval $ac_try) 2>&5
20213 ac_status=$?
20214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20215 (exit $ac_status); }; } &&
20216 { ac_try='test -s conftest.$ac_objext'
20217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20218 (eval $ac_try) 2>&5
20219 ac_status=$?
20220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20221 (exit $ac_status); }; }; then
20222 ac_cv_c_const=yes
20223 else
20224 echo "$as_me: failed program was:" >&5
20225 sed 's/^/| /' conftest.$ac_ext >&5
20226
20227 ac_cv_c_const=no
20228 fi
20229 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20230 fi
20231 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20232 echo "${ECHO_T}$ac_cv_c_const" >&6
20233 if test $ac_cv_c_const = no; then
20234
20235 cat >>confdefs.h <<\_ACEOF
20236 #define const
20237 _ACEOF
20238
20239 fi
20240
20241
20242 # Extract the first word of "pkg-config", so it can be a program name with args.
20243 set dummy pkg-config; ac_word=$2
20244 echo "$as_me:$LINENO: checking for $ac_word" >&5
20245 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20246 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
20247 echo $ECHO_N "(cached) $ECHO_C" >&6
20248 else
20249 case $PKG_CONFIG in
20250 [\\/]* | ?:[\\/]*)
20251 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
20252 ;;
20253 *)
20254 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20255 for as_dir in $PATH
20256 do
20257 IFS=$as_save_IFS
20258 test -z "$as_dir" && as_dir=.
20259 for ac_exec_ext in '' $ac_executable_extensions; do
20260 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20261 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
20262 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20263 break 2
20264 fi
20265 done
20266 done
20267
20268 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
20269 ;;
20270 esac
20271 fi
20272 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
20273
20274 if test -n "$PKG_CONFIG"; then
20275 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
20276 echo "${ECHO_T}$PKG_CONFIG" >&6
20277 else
20278 echo "$as_me:$LINENO: result: no" >&5
20279 echo "${ECHO_T}no" >&6
20280 fi
20281
20282
20283 CFLAGS=
20284 LIBS=-lm
20285
20286
20287 # Extract the first word of ""swig"", so it can be a program name with args.
20288 set dummy "swig"; ac_word=$2
20289 echo "$as_me:$LINENO: checking for $ac_word" >&5
20290 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20291 if test "${ac_cv_prog_have_swig+set}" = set; then
20292 echo $ECHO_N "(cached) $ECHO_C" >&6
20293 else
20294 if test -n "$have_swig"; then
20295 ac_cv_prog_have_swig="$have_swig" # Let the user override the test.
20296 else
20297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20298 for as_dir in $PATH
20299 do
20300 IFS=$as_save_IFS
20301 test -z "$as_dir" && as_dir=.
20302 for ac_exec_ext in '' $ac_executable_extensions; do
20303 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20304 ac_cv_prog_have_swig="yes"
20305 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20306 break 2
20307 fi
20308 done
20309 done
20310
20311 test -z "$ac_cv_prog_have_swig" && ac_cv_prog_have_swig="no"
20312 fi
20313 fi
20314 have_swig=$ac_cv_prog_have_swig
20315 if test -n "$have_swig"; then
20316 echo "$as_me:$LINENO: result: $have_swig" >&5
20317 echo "${ECHO_T}$have_swig" >&6
20318 else
20319 echo "$as_me:$LINENO: result: no" >&5
20320 echo "${ECHO_T}no" >&6
20321 fi
20322
20323
20324
20325 build_pascal=no
20326
20327 # Extract the first word of ""fpc"", so it can be a program name with args.
20328 set dummy "fpc"; ac_word=$2
20329 echo "$as_me:$LINENO: checking for $ac_word" >&5
20330 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20331 if test "${ac_cv_prog_have_pascal+set}" = set; then
20332 echo $ECHO_N "(cached) $ECHO_C" >&6
20333 else
20334 if test -n "$have_pascal"; then
20335 ac_cv_prog_have_pascal="$have_pascal" # Let the user override the test.
20336 else
20337 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20338 for as_dir in $PATH
20339 do
20340 IFS=$as_save_IFS
20341 test -z "$as_dir" && as_dir=.
20342 for ac_exec_ext in '' $ac_executable_extensions; do
20343 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20344 ac_cv_prog_have_pascal="yes"
20345 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20346 break 2
20347 fi
20348 done
20349 done
20350
20351 test -z "$ac_cv_prog_have_pascal" && ac_cv_prog_have_pascal="no"
20352 fi
20353 fi
20354 have_pascal=$ac_cv_prog_have_pascal
20355 if test -n "$have_pascal"; then
20356 echo "$as_me:$LINENO: result: $have_pascal" >&5
20357 echo "${ECHO_T}$have_pascal" >&6
20358 else
20359 echo "$as_me:$LINENO: result: no" >&5
20360 echo "${ECHO_T}no" >&6
20361 fi
20362
20363
20364 # Check whether --enable-pascal or --disable-pascal was given.
20365 if test "${enable_pascal+set}" = set; then
20366 enableval="$enable_pascal"
20367 build_pascal="$enableval"
20368 else
20369 build_pascal=no
20370 fi;
20371
20372 if test "x$have_pascal" = "xno"; then
20373 build_pascal=no
20374 else
20375 PA_VERSION=`fpc -iV`
20376 PA_TPR=`fpc -iTP`
20377 PA_TOS=`fpc -iTO`
20378 PA_MODULES_PATH="/usr/lib/fpc/$PA_VERSION/units/$PA_TPR-$PA_TOS"
20379
20380
20381 fi
20382
20383
20384
20385 if test "x$build_pascal" = "xyes"; then
20386 WITH_PASCAL_TRUE=
20387 WITH_PASCAL_FALSE='#'
20388 else
20389 WITH_PASCAL_TRUE='#'
20390 WITH_PASCAL_FALSE=
20391 fi
20392
20393
20394 build_python=no
20395
20396 # Check whether --enable-python or --disable-python was given.
20397 if test "${enable_python+set}" = set; then
20398 enableval="$enable_python"
20399 build_python="$enableval"
20400 else
20401 build_python=no
20402 fi;
20403
20404
20405 # Check whether --with-python-sitelib-dir or --without-python-sitelib-dir was given.
20406 if test "${with_python_sitelib_dir+set}" = set; then
20407 withval="$with_python_sitelib_dir"
20408
20409 fi;
20410
20411 # Extract the first word of ""python"", so it can be a program name with args.
20412 set dummy "python"; ac_word=$2
20413 echo "$as_me:$LINENO: checking for $ac_word" >&5
20414 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20415 if test "${ac_cv_prog_have_python+set}" = set; then
20416 echo $ECHO_N "(cached) $ECHO_C" >&6
20417 else
20418 if test -n "$have_python"; then
20419 ac_cv_prog_have_python="$have_python" # Let the user override the test.
20420 else
20421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20422 for as_dir in $PATH
20423 do
20424 IFS=$as_save_IFS
20425 test -z "$as_dir" && as_dir=.
20426 for ac_exec_ext in '' $ac_executable_extensions; do
20427 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20428 ac_cv_prog_have_python="yes"
20429 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20430 break 2
20431 fi
20432 done
20433 done
20434
20435 test -z "$ac_cv_prog_have_python" && ac_cv_prog_have_python="no"
20436 fi
20437 fi
20438 have_python=$ac_cv_prog_have_python
20439 if test -n "$have_python"; then
20440 echo "$as_me:$LINENO: result: $have_python" >&5
20441 echo "${ECHO_T}$have_python" >&6
20442 else
20443 echo "$as_me:$LINENO: result: no" >&5
20444 echo "${ECHO_T}no" >&6
20445 fi
20446
20447
20448 if test "x$have_python" = "xyes"; then
20449 PY_PREFIX=`python -c 'import sys ; print sys.prefix'`
20450 PY_VERSION=`python -c 'import sys ; print sys.version[0:3]'`
20451 echo "$as_me:$LINENO: checking for $PY_PREFIX/include/python$PY_VERSION/Python.h" >&5
20452 echo $ECHO_N "checking for $PY_PREFIX/include/python$PY_VERSION/Python.h... $ECHO_C" >&6
20453 if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h; then
20454 echo "$as_me:$LINENO: result: yes" >&5
20455 echo "${ECHO_T}yes" >&6
20456 PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
20457
20458 if test "x$with_python_sitelib_dir" = "x" ; then
20459 PY_MODULES_PATH="$PY_PREFIX/lib/python$PY_VERSION/site-packages"
20460 else
20461 PY_MODULES_PATH=$with_python_sitelib_dir
20462 fi
20463
20464
20465
20466
20467 if test "x$have_swig" = "xno"; then
20468 build_python=no
20469 fi
20470 else
20471 echo "$as_me:$LINENO: result: no" >&5
20472 echo "${ECHO_T}no" >&6
20473 build_python=no
20474 fi
20475 fi
20476
20477
20478
20479 if test "x$build_python" = "xyes"; then
20480 WITH_PYTHON_TRUE=
20481 WITH_PYTHON_FALSE='#'
20482 else
20483 WITH_PYTHON_TRUE='#'
20484 WITH_PYTHON_FALSE=
20485 fi
20486
20487
20488 build_perl=no
20489
20490 # Check whether --enable-perl or --disable-perl was given.
20491 if test "${enable_perl+set}" = set; then
20492 enableval="$enable_perl"
20493 build_perl="$enableval"
20494 else
20495 build_perl=no
20496 fi;
20497
20498
20499 # Check whether --with-perl-sitelib-dir or --without-perl-sitelib-dir was given.
20500 if test "${with_perl_sitelib_dir+set}" = set; then
20501 withval="$with_perl_sitelib_dir"
20502
20503 fi;
20504
20505 # Extract the first word of ""perl"", so it can be a program name with args.
20506 set dummy "perl"; ac_word=$2
20507 echo "$as_me:$LINENO: checking for $ac_word" >&5
20508 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20509 if test "${ac_cv_prog_have_perl+set}" = set; then
20510 echo $ECHO_N "(cached) $ECHO_C" >&6
20511 else
20512 if test -n "$have_perl"; then
20513 ac_cv_prog_have_perl="$have_perl" # Let the user override the test.
20514 else
20515 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20516 for as_dir in $PATH
20517 do
20518 IFS=$as_save_IFS
20519 test -z "$as_dir" && as_dir=.
20520 for ac_exec_ext in '' $ac_executable_extensions; do
20521 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20522 ac_cv_prog_have_perl="yes"
20523 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20524 break 2
20525 fi
20526 done
20527 done
20528
20529 test -z "$ac_cv_prog_have_perl" && ac_cv_prog_have_perl="no"
20530 fi
20531 fi
20532 have_perl=$ac_cv_prog_have_perl
20533 if test -n "$have_perl"; then
20534 echo "$as_me:$LINENO: result: $have_perl" >&5
20535 echo "${ECHO_T}$have_perl" >&6
20536 else
20537 echo "$as_me:$LINENO: result: no" >&5
20538 echo "${ECHO_T}no" >&6
20539 fi
20540
20541
20542 if test "x$have_perl" = "xyes"; then
20543 PE_PREFIX=`(perl -e 'use Config; print $Config{archlib};')`
20544 echo "$as_me:$LINENO: checking for $PE_PREFIX/CORE/perl.h" >&5
20545 echo $ECHO_N "checking for $PE_PREFIX/CORE/perl.h... $ECHO_C" >&6
20546 if test -f $PE_PREFIX/CORE/perl.h; then
20547 echo "$as_me:$LINENO: result: yes" >&5
20548 echo "${ECHO_T}yes" >&6
20549 PE_CFLAGS="-I$PE_PREFIX/CORE "
20550 PE_CFLAGS=$PE_CFLAGS`(perl -e 'use Config; print $Config{cppflags};')`
20551
20552 if test "x$with_perl_sitelib_dir" = "x" ; then
20553 PE_MODULES_PATH=`(perl -e 'use Config; print $Config{sitelib};')`
20554 else
20555 PE_MODULES_PATH=$with_perl_sitelib_dir
20556 fi
20557
20558
20559
20560 if test "x$have_swig" = "xno"; then
20561 build_perl=no
20562 fi
20563 else
20564 echo "$as_me:$LINENO: result: no" >&5
20565 echo "${ECHO_T}no" >&6
20566 build_perl=no
20567 fi
20568 fi
20569
20570
20571
20572
20573 if test "x$build_perl" = "xyes"; then
20574 WITH_PERL_TRUE=
20575 WITH_PERL_FALSE='#'
20576 else
20577 WITH_PERL_TRUE='#'
20578 WITH_PERL_FALSE=
20579 fi
20580
20581
20582
20583 ALL_LINGUAS="he es_MX ru fr"
20584
20585
20586 MKINSTALLDIRS=
20587 if test -n "$ac_aux_dir"; then
20588 case "$ac_aux_dir" in
20589 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
20590 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
20591 esac
20592 fi
20593 if test -z "$MKINSTALLDIRS"; then
20594 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
20595 fi
20596
20597
20598
20599 echo "$as_me:$LINENO: checking whether NLS is requested" >&5
20600 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
20601 # Check whether --enable-nls or --disable-nls was given.
20602 if test "${enable_nls+set}" = set; then
20603 enableval="$enable_nls"
20604 USE_NLS=$enableval
20605 else
20606 USE_NLS=yes
20607 fi;
20608 echo "$as_me:$LINENO: result: $USE_NLS" >&5
20609 echo "${ECHO_T}$USE_NLS" >&6
20610
20611
20612
20613
20614
20615
20616 # Prepare PATH_SEPARATOR.
20617 # The user is always right.
20618 if test "${PATH_SEPARATOR+set}" != set; then
20619 echo "#! /bin/sh" >conf$$.sh
20620 echo "exit 0" >>conf$$.sh
20621 chmod +x conf$$.sh
20622 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20623 PATH_SEPARATOR=';'
20624 else
20625 PATH_SEPARATOR=:
20626 fi
20627 rm -f conf$$.sh
20628 fi
20629
20630 # Find out how to test for executable files. Don't use a zero-byte file,
20631 # as systems may use methods other than mode bits to determine executability.
20632 cat >conf$$.file <<_ASEOF
20633 #! /bin/sh
20634 exit 0
20635 _ASEOF
20636 chmod +x conf$$.file
20637 if test -x conf$$.file >/dev/null 2>&1; then
20638 ac_executable_p="test -x"
20639 else
20640 ac_executable_p="test -f"
20641 fi
20642 rm -f conf$$.file
20643
20644 # Extract the first word of "msgfmt", so it can be a program name with args.
20645 set dummy msgfmt; ac_word=$2
20646 echo "$as_me:$LINENO: checking for $ac_word" >&5
20647 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20648 if test "${ac_cv_path_MSGFMT+set}" = set; then
20649 echo $ECHO_N "(cached) $ECHO_C" >&6
20650 else
20651 case "$MSGFMT" in
20652 [\\/]* | ?:[\\/]*)
20653 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
20654 ;;
20655 *)
20656 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
20657 for ac_dir in $PATH; do
20658 IFS="$ac_save_IFS"
20659 test -z "$ac_dir" && ac_dir=.
20660 for ac_exec_ext in '' $ac_executable_extensions; do
20661 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
20662 echo "$as_me: trying $ac_dir/$ac_word..." >&5
20663 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
20664 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
20665 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
20666 break 2
20667 fi
20668 fi
20669 done
20670 done
20671 IFS="$ac_save_IFS"
20672 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
20673 ;;
20674 esac
20675 fi
20676 MSGFMT="$ac_cv_path_MSGFMT"
20677 if test "$MSGFMT" != ":"; then
20678 echo "$as_me:$LINENO: result: $MSGFMT" >&5
20679 echo "${ECHO_T}$MSGFMT" >&6
20680 else
20681 echo "$as_me:$LINENO: result: no" >&5
20682 echo "${ECHO_T}no" >&6
20683 fi
20684
20685 # Extract the first word of "gmsgfmt", so it can be a program name with args.
20686 set dummy gmsgfmt; ac_word=$2
20687 echo "$as_me:$LINENO: checking for $ac_word" >&5
20688 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20689 if test "${ac_cv_path_GMSGFMT+set}" = set; then
20690 echo $ECHO_N "(cached) $ECHO_C" >&6
20691 else
20692 case $GMSGFMT in
20693 [\\/]* | ?:[\\/]*)
20694 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
20695 ;;
20696 *)
20697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20698 for as_dir in $PATH
20699 do
20700 IFS=$as_save_IFS
20701 test -z "$as_dir" && as_dir=.
20702 for ac_exec_ext in '' $ac_executable_extensions; do
20703 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20704 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
20705 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20706 break 2
20707 fi
20708 done
20709 done
20710
20711 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
20712 ;;
20713 esac
20714 fi
20715 GMSGFMT=$ac_cv_path_GMSGFMT
20716
20717 if test -n "$GMSGFMT"; then
20718 echo "$as_me:$LINENO: result: $GMSGFMT" >&5
20719 echo "${ECHO_T}$GMSGFMT" >&6
20720 else
20721 echo "$as_me:$LINENO: result: no" >&5
20722 echo "${ECHO_T}no" >&6
20723 fi
20724
20725
20726
20727 # Prepare PATH_SEPARATOR.
20728 # The user is always right.
20729 if test "${PATH_SEPARATOR+set}" != set; then
20730 echo "#! /bin/sh" >conf$$.sh
20731 echo "exit 0" >>conf$$.sh
20732 chmod +x conf$$.sh
20733 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20734 PATH_SEPARATOR=';'
20735 else
20736 PATH_SEPARATOR=:
20737 fi
20738 rm -f conf$$.sh
20739 fi
20740
20741 # Find out how to test for executable files. Don't use a zero-byte file,
20742 # as systems may use methods other than mode bits to determine executability.
20743 cat >conf$$.file <<_ASEOF
20744 #! /bin/sh
20745 exit 0
20746 _ASEOF
20747 chmod +x conf$$.file
20748 if test -x conf$$.file >/dev/null 2>&1; then
20749 ac_executable_p="test -x"
20750 else
20751 ac_executable_p="test -f"
20752 fi
20753 rm -f conf$$.file
20754
20755 # Extract the first word of "xgettext", so it can be a program name with args.
20756 set dummy xgettext; ac_word=$2
20757 echo "$as_me:$LINENO: checking for $ac_word" >&5
20758 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20759 if test "${ac_cv_path_XGETTEXT+set}" = set; then
20760 echo $ECHO_N "(cached) $ECHO_C" >&6
20761 else
20762 case "$XGETTEXT" in
20763 [\\/]* | ?:[\\/]*)
20764 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
20765 ;;
20766 *)
20767 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
20768 for ac_dir in $PATH; do
20769 IFS="$ac_save_IFS"
20770 test -z "$ac_dir" && ac_dir=.
20771 for ac_exec_ext in '' $ac_executable_extensions; do
20772 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
20773 echo "$as_me: trying $ac_dir/$ac_word..." >&5
20774 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
20775 (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
20776 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
20777 break 2
20778 fi
20779 fi
20780 done
20781 done
20782 IFS="$ac_save_IFS"
20783 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
20784 ;;
20785 esac
20786 fi
20787 XGETTEXT="$ac_cv_path_XGETTEXT"
20788 if test "$XGETTEXT" != ":"; then
20789 echo "$as_me:$LINENO: result: $XGETTEXT" >&5
20790 echo "${ECHO_T}$XGETTEXT" >&6
20791 else
20792 echo "$as_me:$LINENO: result: no" >&5
20793 echo "${ECHO_T}no" >&6
20794 fi
20795
20796 rm -f messages.po
20797
20798
20799 # Prepare PATH_SEPARATOR.
20800 # The user is always right.
20801 if test "${PATH_SEPARATOR+set}" != set; then
20802 echo "#! /bin/sh" >conf$$.sh
20803 echo "exit 0" >>conf$$.sh
20804 chmod +x conf$$.sh
20805 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20806 PATH_SEPARATOR=';'
20807 else
20808 PATH_SEPARATOR=:
20809 fi
20810 rm -f conf$$.sh
20811 fi
20812
20813 # Find out how to test for executable files. Don't use a zero-byte file,
20814 # as systems may use methods other than mode bits to determine executability.
20815 cat >conf$$.file <<_ASEOF
20816 #! /bin/sh
20817 exit 0
20818 _ASEOF
20819 chmod +x conf$$.file
20820 if test -x conf$$.file >/dev/null 2>&1; then
20821 ac_executable_p="test -x"
20822 else
20823 ac_executable_p="test -f"
20824 fi
20825 rm -f conf$$.file
20826
20827 # Extract the first word of "msgmerge", so it can be a program name with args.
20828 set dummy msgmerge; ac_word=$2
20829 echo "$as_me:$LINENO: checking for $ac_word" >&5
20830 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20831 if test "${ac_cv_path_MSGMERGE+set}" = set; then
20832 echo $ECHO_N "(cached) $ECHO_C" >&6
20833 else
20834 case "$MSGMERGE" in
20835 [\\/]* | ?:[\\/]*)
20836 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
20837 ;;
20838 *)
20839 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
20840 for ac_dir in $PATH; do
20841 IFS="$ac_save_IFS"
20842 test -z "$ac_dir" && ac_dir=.
20843 for ac_exec_ext in '' $ac_executable_extensions; do
20844 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
20845 echo "$as_me: trying $ac_dir/$ac_word..." >&5
20846 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
20847 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
20848 break 2
20849 fi
20850 fi
20851 done
20852 done
20853 IFS="$ac_save_IFS"
20854 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
20855 ;;
20856 esac
20857 fi
20858 MSGMERGE="$ac_cv_path_MSGMERGE"
20859 if test "$MSGMERGE" != ":"; then
20860 echo "$as_me:$LINENO: result: $MSGMERGE" >&5
20861 echo "${ECHO_T}$MSGMERGE" >&6
20862 else
20863 echo "$as_me:$LINENO: result: no" >&5
20864 echo "${ECHO_T}no" >&6
20865 fi
20866
20867
20868 if test "$GMSGFMT" != ":"; then
20869 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
20870 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
20871 : ;
20872 else
20873 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
20874 echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
20875 echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6
20876 GMSGFMT=":"
20877 fi
20878 fi
20879
20880 if test "$XGETTEXT" != ":"; then
20881 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
20882 (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
20883 : ;
20884 else
20885 echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
20886 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
20887 XGETTEXT=":"
20888 fi
20889 rm -f messages.po
20890 fi
20891
20892 ac_config_commands="$ac_config_commands default-1"
20893
20894
20895
20896 echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2 or newer" >&5
20897 echo $ECHO_N "checking whether we are using the GNU C Library 2 or newer... $ECHO_C" >&6
20898 if test "${ac_cv_gnu_library_2+set}" = set; then
20899 echo $ECHO_N "(cached) $ECHO_C" >&6
20900 else
20901 cat >conftest.$ac_ext <<_ACEOF
20902 /* confdefs.h. */
20903 _ACEOF
20904 cat confdefs.h >>conftest.$ac_ext
20905 cat >>conftest.$ac_ext <<_ACEOF
20906 /* end confdefs.h. */
20907
20908 #include <features.h>
20909 #ifdef __GNU_LIBRARY__
20910 #if (__GLIBC__ >= 2)
20911 Lucky GNU user
20912 #endif
20913 #endif
20914
20915 _ACEOF
20916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20917 $EGREP "Lucky GNU user" >/dev/null 2>&1; then
20918 ac_cv_gnu_library_2=yes
20919 else
20920 ac_cv_gnu_library_2=no
20921 fi
20922 rm -f conftest*
20923
20924
20925
20926 fi
20927 echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2" >&5
20928 echo "${ECHO_T}$ac_cv_gnu_library_2" >&6
20929
20930 GLIBC2="$ac_cv_gnu_library_2"
20931
20932
20933 if test -n "$ac_tool_prefix"; then
20934 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
20935 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
20936 echo "$as_me:$LINENO: checking for $ac_word" >&5
20937 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20938 if test "${ac_cv_prog_RANLIB+set}" = set; then
20939 echo $ECHO_N "(cached) $ECHO_C" >&6
20940 else
20941 if test -n "$RANLIB"; then
20942 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
20943 else
20944 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20945 for as_dir in $PATH
20946 do
20947 IFS=$as_save_IFS
20948 test -z "$as_dir" && as_dir=.
20949 for ac_exec_ext in '' $ac_executable_extensions; do
20950 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20951 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
20952 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20953 break 2
20954 fi
20955 done
20956 done
20957
20958 fi
20959 fi
20960 RANLIB=$ac_cv_prog_RANLIB
20961 if test -n "$RANLIB"; then
20962 echo "$as_me:$LINENO: result: $RANLIB" >&5
20963 echo "${ECHO_T}$RANLIB" >&6
20964 else
20965 echo "$as_me:$LINENO: result: no" >&5
20966 echo "${ECHO_T}no" >&6
20967 fi
20968
20969 fi
20970 if test -z "$ac_cv_prog_RANLIB"; then
20971 ac_ct_RANLIB=$RANLIB
20972 # Extract the first word of "ranlib", so it can be a program name with args.
20973 set dummy ranlib; ac_word=$2
20974 echo "$as_me:$LINENO: checking for $ac_word" >&5
20975 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20976 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
20977 echo $ECHO_N "(cached) $ECHO_C" >&6
20978 else
20979 if test -n "$ac_ct_RANLIB"; then
20980 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
20981 else
20982 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20983 for as_dir in $PATH
20984 do
20985 IFS=$as_save_IFS
20986 test -z "$as_dir" && as_dir=.
20987 for ac_exec_ext in '' $ac_executable_extensions; do
20988 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20989 ac_cv_prog_ac_ct_RANLIB="ranlib"
20990 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20991 break 2
20992 fi
20993 done
20994 done
20995
20996 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
20997 fi
20998 fi
20999 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
21000 if test -n "$ac_ct_RANLIB"; then
21001 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
21002 echo "${ECHO_T}$ac_ct_RANLIB" >&6
21003 else
21004 echo "$as_me:$LINENO: result: no" >&5
21005 echo "${ECHO_T}no" >&6
21006 fi
21007
21008 RANLIB=$ac_ct_RANLIB
21009 else
21010 RANLIB="$ac_cv_prog_RANLIB"
21011 fi
21012
21013
21014 echo "$as_me:$LINENO: checking for signed" >&5
21015 echo $ECHO_N "checking for signed... $ECHO_C" >&6
21016 if test "${bh_cv_c_signed+set}" = set; then
21017 echo $ECHO_N "(cached) $ECHO_C" >&6
21018 else
21019 cat >conftest.$ac_ext <<_ACEOF
21020 /* confdefs.h. */
21021 _ACEOF
21022 cat confdefs.h >>conftest.$ac_ext
21023 cat >>conftest.$ac_ext <<_ACEOF
21024 /* end confdefs.h. */
21025
21026 int
21027 main ()
21028 {
21029 signed char x;
21030 ;
21031 return 0;
21032 }
21033 _ACEOF
21034 rm -f conftest.$ac_objext
21035 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21036 (eval $ac_compile) 2>conftest.er1
21037 ac_status=$?
21038 grep -v '^ *+' conftest.er1 >conftest.err
21039 rm -f conftest.er1
21040 cat conftest.err >&5
21041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21042 (exit $ac_status); } &&
21043 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21045 (eval $ac_try) 2>&5
21046 ac_status=$?
21047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21048 (exit $ac_status); }; } &&
21049 { ac_try='test -s conftest.$ac_objext'
21050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21051 (eval $ac_try) 2>&5
21052 ac_status=$?
21053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21054 (exit $ac_status); }; }; then
21055 bh_cv_c_signed=yes
21056 else
21057 echo "$as_me: failed program was:" >&5
21058 sed 's/^/| /' conftest.$ac_ext >&5
21059
21060 bh_cv_c_signed=no
21061 fi
21062 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21063 fi
21064 echo "$as_me:$LINENO: result: $bh_cv_c_signed" >&5
21065 echo "${ECHO_T}$bh_cv_c_signed" >&6
21066 if test $bh_cv_c_signed = no; then
21067
21068 cat >>confdefs.h <<\_ACEOF
21069 #define signed
21070 _ACEOF
21071
21072 fi
21073
21074 echo "$as_me:$LINENO: checking for inline" >&5
21075 echo $ECHO_N "checking for inline... $ECHO_C" >&6
21076 if test "${ac_cv_c_inline+set}" = set; then
21077 echo $ECHO_N "(cached) $ECHO_C" >&6
21078 else
21079 ac_cv_c_inline=no
21080 for ac_kw in inline __inline__ __inline; do
21081 cat >conftest.$ac_ext <<_ACEOF
21082 /* confdefs.h. */
21083 _ACEOF
21084 cat confdefs.h >>conftest.$ac_ext
21085 cat >>conftest.$ac_ext <<_ACEOF
21086 /* end confdefs.h. */
21087 #ifndef __cplusplus
21088 typedef int foo_t;
21089 static $ac_kw foo_t static_foo () {return 0; }
21090 $ac_kw foo_t foo () {return 0; }
21091 #endif
21092
21093 _ACEOF
21094 rm -f conftest.$ac_objext
21095 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21096 (eval $ac_compile) 2>conftest.er1
21097 ac_status=$?
21098 grep -v '^ *+' conftest.er1 >conftest.err
21099 rm -f conftest.er1
21100 cat conftest.err >&5
21101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21102 (exit $ac_status); } &&
21103 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
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); }; } &&
21109 { ac_try='test -s conftest.$ac_objext'
21110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21111 (eval $ac_try) 2>&5
21112 ac_status=$?
21113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21114 (exit $ac_status); }; }; then
21115 ac_cv_c_inline=$ac_kw; break
21116 else
21117 echo "$as_me: failed program was:" >&5
21118 sed 's/^/| /' conftest.$ac_ext >&5
21119
21120 fi
21121 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21122 done
21123
21124 fi
21125 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
21126 echo "${ECHO_T}$ac_cv_c_inline" >&6
21127
21128
21129 case $ac_cv_c_inline in
21130 inline | yes) ;;
21131 *)
21132 case $ac_cv_c_inline in
21133 no) ac_val=;;
21134 *) ac_val=$ac_cv_c_inline;;
21135 esac
21136 cat >>confdefs.h <<_ACEOF
21137 #ifndef __cplusplus
21138 #define inline $ac_val
21139 #endif
21140 _ACEOF
21141 ;;
21142 esac
21143
21144 echo "$as_me:$LINENO: checking for off_t" >&5
21145 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
21146 if test "${ac_cv_type_off_t+set}" = set; then
21147 echo $ECHO_N "(cached) $ECHO_C" >&6
21148 else
21149 cat >conftest.$ac_ext <<_ACEOF
21150 /* confdefs.h. */
21151 _ACEOF
21152 cat confdefs.h >>conftest.$ac_ext
21153 cat >>conftest.$ac_ext <<_ACEOF
21154 /* end confdefs.h. */
21155 $ac_includes_default
21156 int
21157 main ()
21158 {
21159 if ((off_t *) 0)
21160 return 0;
21161 if (sizeof (off_t))
21162 return 0;
21163 ;
21164 return 0;
21165 }
21166 _ACEOF
21167 rm -f conftest.$ac_objext
21168 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21169 (eval $ac_compile) 2>conftest.er1
21170 ac_status=$?
21171 grep -v '^ *+' conftest.er1 >conftest.err
21172 rm -f conftest.er1
21173 cat conftest.err >&5
21174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21175 (exit $ac_status); } &&
21176 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21178 (eval $ac_try) 2>&5
21179 ac_status=$?
21180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21181 (exit $ac_status); }; } &&
21182 { ac_try='test -s conftest.$ac_objext'
21183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21184 (eval $ac_try) 2>&5
21185 ac_status=$?
21186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21187 (exit $ac_status); }; }; then
21188 ac_cv_type_off_t=yes
21189 else
21190 echo "$as_me: failed program was:" >&5
21191 sed 's/^/| /' conftest.$ac_ext >&5
21192
21193 ac_cv_type_off_t=no
21194 fi
21195 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21196 fi
21197 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
21198 echo "${ECHO_T}$ac_cv_type_off_t" >&6
21199 if test $ac_cv_type_off_t = yes; then
21200 :
21201 else
21202
21203 cat >>confdefs.h <<_ACEOF
21204 #define off_t long
21205 _ACEOF
21206
21207 fi
21208
21209 echo "$as_me:$LINENO: checking for size_t" >&5
21210 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
21211 if test "${ac_cv_type_size_t+set}" = set; then
21212 echo $ECHO_N "(cached) $ECHO_C" >&6
21213 else
21214 cat >conftest.$ac_ext <<_ACEOF
21215 /* confdefs.h. */
21216 _ACEOF
21217 cat confdefs.h >>conftest.$ac_ext
21218 cat >>conftest.$ac_ext <<_ACEOF
21219 /* end confdefs.h. */
21220 $ac_includes_default
21221 int
21222 main ()
21223 {
21224 if ((size_t *) 0)
21225 return 0;
21226 if (sizeof (size_t))
21227 return 0;
21228 ;
21229 return 0;
21230 }
21231 _ACEOF
21232 rm -f conftest.$ac_objext
21233 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21234 (eval $ac_compile) 2>conftest.er1
21235 ac_status=$?
21236 grep -v '^ *+' conftest.er1 >conftest.err
21237 rm -f conftest.er1
21238 cat conftest.err >&5
21239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21240 (exit $ac_status); } &&
21241 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21243 (eval $ac_try) 2>&5
21244 ac_status=$?
21245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21246 (exit $ac_status); }; } &&
21247 { ac_try='test -s conftest.$ac_objext'
21248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21249 (eval $ac_try) 2>&5
21250 ac_status=$?
21251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21252 (exit $ac_status); }; }; then
21253 ac_cv_type_size_t=yes
21254 else
21255 echo "$as_me: failed program was:" >&5
21256 sed 's/^/| /' conftest.$ac_ext >&5
21257
21258 ac_cv_type_size_t=no
21259 fi
21260 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21261 fi
21262 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
21263 echo "${ECHO_T}$ac_cv_type_size_t" >&6
21264 if test $ac_cv_type_size_t = yes; then
21265 :
21266 else
21267
21268 cat >>confdefs.h <<_ACEOF
21269 #define size_t unsigned
21270 _ACEOF
21271
21272 fi
21273
21274
21275 echo "$as_me:$LINENO: checking for long long" >&5
21276 echo $ECHO_N "checking for long long... $ECHO_C" >&6
21277 if test "${ac_cv_type_long_long+set}" = set; then
21278 echo $ECHO_N "(cached) $ECHO_C" >&6
21279 else
21280 cat >conftest.$ac_ext <<_ACEOF
21281 /* confdefs.h. */
21282 _ACEOF
21283 cat confdefs.h >>conftest.$ac_ext
21284 cat >>conftest.$ac_ext <<_ACEOF
21285 /* end confdefs.h. */
21286 long long ll = 1LL; int i = 63;
21287 int
21288 main ()
21289 {
21290 long long llmax = (long long) -1;
21291 return ll << i | ll >> i | llmax / ll | llmax % ll;
21292 ;
21293 return 0;
21294 }
21295 _ACEOF
21296 rm -f conftest.$ac_objext conftest$ac_exeext
21297 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21298 (eval $ac_link) 2>conftest.er1
21299 ac_status=$?
21300 grep -v '^ *+' conftest.er1 >conftest.err
21301 rm -f conftest.er1
21302 cat conftest.err >&5
21303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21304 (exit $ac_status); } &&
21305 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21307 (eval $ac_try) 2>&5
21308 ac_status=$?
21309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21310 (exit $ac_status); }; } &&
21311 { ac_try='test -s conftest$ac_exeext'
21312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21313 (eval $ac_try) 2>&5
21314 ac_status=$?
21315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21316 (exit $ac_status); }; }; then
21317 ac_cv_type_long_long=yes
21318 else
21319 echo "$as_me: failed program was:" >&5
21320 sed 's/^/| /' conftest.$ac_ext >&5
21321
21322 ac_cv_type_long_long=no
21323 fi
21324 rm -f conftest.err conftest.$ac_objext \
21325 conftest$ac_exeext conftest.$ac_ext
21326 fi
21327 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
21328 echo "${ECHO_T}$ac_cv_type_long_long" >&6
21329 if test $ac_cv_type_long_long = yes; then
21330
21331 cat >>confdefs.h <<\_ACEOF
21332 #define HAVE_LONG_LONG 1
21333 _ACEOF
21334
21335 fi
21336
21337
21338 echo "$as_me:$LINENO: checking for long double" >&5
21339 echo $ECHO_N "checking for long double... $ECHO_C" >&6
21340 if test "${gt_cv_c_long_double+set}" = set; then
21341 echo $ECHO_N "(cached) $ECHO_C" >&6
21342 else
21343 if test "$GCC" = yes; then
21344 gt_cv_c_long_double=yes
21345 else
21346 cat >conftest.$ac_ext <<_ACEOF
21347 /* confdefs.h. */
21348 _ACEOF
21349 cat confdefs.h >>conftest.$ac_ext
21350 cat >>conftest.$ac_ext <<_ACEOF
21351 /* end confdefs.h. */
21352
21353 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
21354 long double foo = 0.0;
21355 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
21356 int array [2*(sizeof(long double) >= sizeof(double)) - 1];
21357
21358 int
21359 main ()
21360 {
21361
21362 ;
21363 return 0;
21364 }
21365 _ACEOF
21366 rm -f conftest.$ac_objext
21367 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21368 (eval $ac_compile) 2>conftest.er1
21369 ac_status=$?
21370 grep -v '^ *+' conftest.er1 >conftest.err
21371 rm -f conftest.er1
21372 cat conftest.err >&5
21373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21374 (exit $ac_status); } &&
21375 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21377 (eval $ac_try) 2>&5
21378 ac_status=$?
21379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21380 (exit $ac_status); }; } &&
21381 { ac_try='test -s conftest.$ac_objext'
21382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21383 (eval $ac_try) 2>&5
21384 ac_status=$?
21385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21386 (exit $ac_status); }; }; then
21387 gt_cv_c_long_double=yes
21388 else
21389 echo "$as_me: failed program was:" >&5
21390 sed 's/^/| /' conftest.$ac_ext >&5
21391
21392 gt_cv_c_long_double=no
21393 fi
21394 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21395 fi
21396 fi
21397 echo "$as_me:$LINENO: result: $gt_cv_c_long_double" >&5
21398 echo "${ECHO_T}$gt_cv_c_long_double" >&6
21399 if test $gt_cv_c_long_double = yes; then
21400
21401 cat >>confdefs.h <<\_ACEOF
21402 #define HAVE_LONG_DOUBLE 1
21403 _ACEOF
21404
21405 fi
21406
21407
21408 echo "$as_me:$LINENO: checking for wchar_t" >&5
21409 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21410 if test "${gt_cv_c_wchar_t+set}" = set; then
21411 echo $ECHO_N "(cached) $ECHO_C" >&6
21412 else
21413 cat >conftest.$ac_ext <<_ACEOF
21414 /* confdefs.h. */
21415 _ACEOF
21416 cat confdefs.h >>conftest.$ac_ext
21417 cat >>conftest.$ac_ext <<_ACEOF
21418 /* end confdefs.h. */
21419 #include <stddef.h>
21420 wchar_t foo = (wchar_t)'\0';
21421 int
21422 main ()
21423 {
21424
21425 ;
21426 return 0;
21427 }
21428 _ACEOF
21429 rm -f conftest.$ac_objext
21430 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21431 (eval $ac_compile) 2>conftest.er1
21432 ac_status=$?
21433 grep -v '^ *+' conftest.er1 >conftest.err
21434 rm -f conftest.er1
21435 cat conftest.err >&5
21436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21437 (exit $ac_status); } &&
21438 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21440 (eval $ac_try) 2>&5
21441 ac_status=$?
21442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21443 (exit $ac_status); }; } &&
21444 { ac_try='test -s conftest.$ac_objext'
21445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21446 (eval $ac_try) 2>&5
21447 ac_status=$?
21448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21449 (exit $ac_status); }; }; then
21450 gt_cv_c_wchar_t=yes
21451 else
21452 echo "$as_me: failed program was:" >&5
21453 sed 's/^/| /' conftest.$ac_ext >&5
21454
21455 gt_cv_c_wchar_t=no
21456 fi
21457 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21458 fi
21459 echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5
21460 echo "${ECHO_T}$gt_cv_c_wchar_t" >&6
21461 if test $gt_cv_c_wchar_t = yes; then
21462
21463 cat >>confdefs.h <<\_ACEOF
21464 #define HAVE_WCHAR_T 1
21465 _ACEOF
21466
21467 fi
21468
21469
21470 echo "$as_me:$LINENO: checking for wint_t" >&5
21471 echo $ECHO_N "checking for wint_t... $ECHO_C" >&6
21472 if test "${gt_cv_c_wint_t+set}" = set; then
21473 echo $ECHO_N "(cached) $ECHO_C" >&6
21474 else
21475 cat >conftest.$ac_ext <<_ACEOF
21476 /* confdefs.h. */
21477 _ACEOF
21478 cat confdefs.h >>conftest.$ac_ext
21479 cat >>conftest.$ac_ext <<_ACEOF
21480 /* end confdefs.h. */
21481 #include <wchar.h>
21482 wint_t foo = (wchar_t)'\0';
21483 int
21484 main ()
21485 {
21486
21487 ;
21488 return 0;
21489 }
21490 _ACEOF
21491 rm -f conftest.$ac_objext
21492 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21493 (eval $ac_compile) 2>conftest.er1
21494 ac_status=$?
21495 grep -v '^ *+' conftest.er1 >conftest.err
21496 rm -f conftest.er1
21497 cat conftest.err >&5
21498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21499 (exit $ac_status); } &&
21500 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21502 (eval $ac_try) 2>&5
21503 ac_status=$?
21504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21505 (exit $ac_status); }; } &&
21506 { ac_try='test -s conftest.$ac_objext'
21507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21508 (eval $ac_try) 2>&5
21509 ac_status=$?
21510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21511 (exit $ac_status); }; }; then
21512 gt_cv_c_wint_t=yes
21513 else
21514 echo "$as_me: failed program was:" >&5
21515 sed 's/^/| /' conftest.$ac_ext >&5
21516
21517 gt_cv_c_wint_t=no
21518 fi
21519 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21520 fi
21521 echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5
21522 echo "${ECHO_T}$gt_cv_c_wint_t" >&6
21523 if test $gt_cv_c_wint_t = yes; then
21524
21525 cat >>confdefs.h <<\_ACEOF
21526 #define HAVE_WINT_T 1
21527 _ACEOF
21528
21529 fi
21530
21531
21532 echo "$as_me:$LINENO: checking for inttypes.h" >&5
21533 echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
21534 if test "${gl_cv_header_inttypes_h+set}" = set; then
21535 echo $ECHO_N "(cached) $ECHO_C" >&6
21536 else
21537 cat >conftest.$ac_ext <<_ACEOF
21538 /* confdefs.h. */
21539 _ACEOF
21540 cat confdefs.h >>conftest.$ac_ext
21541 cat >>conftest.$ac_ext <<_ACEOF
21542 /* end confdefs.h. */
21543 #include <sys/types.h>
21544 #include <inttypes.h>
21545 int
21546 main ()
21547 {
21548 uintmax_t i = (uintmax_t) -1;
21549 ;
21550 return 0;
21551 }
21552 _ACEOF
21553 rm -f conftest.$ac_objext
21554 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21555 (eval $ac_compile) 2>conftest.er1
21556 ac_status=$?
21557 grep -v '^ *+' conftest.er1 >conftest.err
21558 rm -f conftest.er1
21559 cat conftest.err >&5
21560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21561 (exit $ac_status); } &&
21562 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21564 (eval $ac_try) 2>&5
21565 ac_status=$?
21566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21567 (exit $ac_status); }; } &&
21568 { ac_try='test -s conftest.$ac_objext'
21569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21570 (eval $ac_try) 2>&5
21571 ac_status=$?
21572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21573 (exit $ac_status); }; }; then
21574 gl_cv_header_inttypes_h=yes
21575 else
21576 echo "$as_me: failed program was:" >&5
21577 sed 's/^/| /' conftest.$ac_ext >&5
21578
21579 gl_cv_header_inttypes_h=no
21580 fi
21581 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21582 fi
21583 echo "$as_me:$LINENO: result: $gl_cv_header_inttypes_h" >&5
21584 echo "${ECHO_T}$gl_cv_header_inttypes_h" >&6
21585 if test $gl_cv_header_inttypes_h = yes; then
21586
21587 cat >>confdefs.h <<_ACEOF
21588 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
21589 _ACEOF
21590
21591 fi
21592
21593
21594 echo "$as_me:$LINENO: checking for stdint.h" >&5
21595 echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6
21596 if test "${gl_cv_header_stdint_h+set}" = set; then
21597 echo $ECHO_N "(cached) $ECHO_C" >&6
21598 else
21599 cat >conftest.$ac_ext <<_ACEOF
21600 /* confdefs.h. */
21601 _ACEOF
21602 cat confdefs.h >>conftest.$ac_ext
21603 cat >>conftest.$ac_ext <<_ACEOF
21604 /* end confdefs.h. */
21605 #include <sys/types.h>
21606 #include <stdint.h>
21607 int
21608 main ()
21609 {
21610 uintmax_t i = (uintmax_t) -1;
21611 ;
21612 return 0;
21613 }
21614 _ACEOF
21615 rm -f conftest.$ac_objext
21616 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21617 (eval $ac_compile) 2>conftest.er1
21618 ac_status=$?
21619 grep -v '^ *+' conftest.er1 >conftest.err
21620 rm -f conftest.er1
21621 cat conftest.err >&5
21622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21623 (exit $ac_status); } &&
21624 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21626 (eval $ac_try) 2>&5
21627 ac_status=$?
21628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21629 (exit $ac_status); }; } &&
21630 { ac_try='test -s conftest.$ac_objext'
21631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21632 (eval $ac_try) 2>&5
21633 ac_status=$?
21634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21635 (exit $ac_status); }; }; then
21636 gl_cv_header_stdint_h=yes
21637 else
21638 echo "$as_me: failed program was:" >&5
21639 sed 's/^/| /' conftest.$ac_ext >&5
21640
21641 gl_cv_header_stdint_h=no
21642 fi
21643 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21644 fi
21645 echo "$as_me:$LINENO: result: $gl_cv_header_stdint_h" >&5
21646 echo "${ECHO_T}$gl_cv_header_stdint_h" >&6
21647 if test $gl_cv_header_stdint_h = yes; then
21648
21649 cat >>confdefs.h <<_ACEOF
21650 #define HAVE_STDINT_H_WITH_UINTMAX 1
21651 _ACEOF
21652
21653 fi
21654
21655
21656
21657
21658 echo "$as_me:$LINENO: checking for intmax_t" >&5
21659 echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6
21660 if test "${gt_cv_c_intmax_t+set}" = set; then
21661 echo $ECHO_N "(cached) $ECHO_C" >&6
21662 else
21663 cat >conftest.$ac_ext <<_ACEOF
21664 /* confdefs.h. */
21665 _ACEOF
21666 cat confdefs.h >>conftest.$ac_ext
21667 cat >>conftest.$ac_ext <<_ACEOF
21668 /* end confdefs.h. */
21669
21670 #include <stddef.h>
21671 #include <stdlib.h>
21672 #if HAVE_STDINT_H_WITH_UINTMAX
21673 #include <stdint.h>
21674 #endif
21675 #if HAVE_INTTYPES_H_WITH_UINTMAX
21676 #include <inttypes.h>
21677 #endif
21678
21679 int
21680 main ()
21681 {
21682 intmax_t x = -1;
21683 ;
21684 return 0;
21685 }
21686 _ACEOF
21687 rm -f conftest.$ac_objext
21688 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21689 (eval $ac_compile) 2>conftest.er1
21690 ac_status=$?
21691 grep -v '^ *+' conftest.er1 >conftest.err
21692 rm -f conftest.er1
21693 cat conftest.err >&5
21694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21695 (exit $ac_status); } &&
21696 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21698 (eval $ac_try) 2>&5
21699 ac_status=$?
21700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21701 (exit $ac_status); }; } &&
21702 { ac_try='test -s conftest.$ac_objext'
21703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21704 (eval $ac_try) 2>&5
21705 ac_status=$?
21706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21707 (exit $ac_status); }; }; then
21708 gt_cv_c_intmax_t=yes
21709 else
21710 echo "$as_me: failed program was:" >&5
21711 sed 's/^/| /' conftest.$ac_ext >&5
21712
21713 gt_cv_c_intmax_t=no
21714 fi
21715 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21716 fi
21717 echo "$as_me:$LINENO: result: $gt_cv_c_intmax_t" >&5
21718 echo "${ECHO_T}$gt_cv_c_intmax_t" >&6
21719 if test $gt_cv_c_intmax_t = yes; then
21720
21721 cat >>confdefs.h <<\_ACEOF
21722 #define HAVE_INTMAX_T 1
21723 _ACEOF
21724
21725 fi
21726
21727
21728
21729 echo "$as_me:$LINENO: checking whether printf() supports POSIX/XSI format strings" >&5
21730 echo $ECHO_N "checking whether printf() supports POSIX/XSI format strings... $ECHO_C" >&6
21731 if test "${gt_cv_func_printf_posix+set}" = set; then
21732 echo $ECHO_N "(cached) $ECHO_C" >&6
21733 else
21734
21735 if test "$cross_compiling" = yes; then
21736
21737 cat >conftest.$ac_ext <<_ACEOF
21738 /* confdefs.h. */
21739 _ACEOF
21740 cat confdefs.h >>conftest.$ac_ext
21741 cat >>conftest.$ac_ext <<_ACEOF
21742 /* end confdefs.h. */
21743
21744 #if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
21745 notposix
21746 #endif
21747
21748 _ACEOF
21749 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21750 $EGREP "notposix" >/dev/null 2>&1; then
21751 gt_cv_func_printf_posix="guessing no"
21752 else
21753 gt_cv_func_printf_posix="guessing yes"
21754 fi
21755 rm -f conftest*
21756
21757
21758 else
21759 cat >conftest.$ac_ext <<_ACEOF
21760 /* confdefs.h. */
21761 _ACEOF
21762 cat confdefs.h >>conftest.$ac_ext
21763 cat >>conftest.$ac_ext <<_ACEOF
21764 /* end confdefs.h. */
21765
21766 #include <stdio.h>
21767 #include <string.h>
21768 /* The string "%2$d %1$d", with dollar characters protected from the shell's
21769 dollar expansion (possibly an autoconf bug). */
21770 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
21771 static char buf[100];
21772 int main ()
21773 {
21774 sprintf (buf, format, 33, 55);
21775 return (strcmp (buf, "55 33") != 0);
21776 }
21777 _ACEOF
21778 rm -f conftest$ac_exeext
21779 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21780 (eval $ac_link) 2>&5
21781 ac_status=$?
21782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21783 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21785 (eval $ac_try) 2>&5
21786 ac_status=$?
21787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21788 (exit $ac_status); }; }; then
21789 gt_cv_func_printf_posix=yes
21790 else
21791 echo "$as_me: program exited with status $ac_status" >&5
21792 echo "$as_me: failed program was:" >&5
21793 sed 's/^/| /' conftest.$ac_ext >&5
21794
21795 ( exit $ac_status )
21796 gt_cv_func_printf_posix=no
21797 fi
21798 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21799 fi
21800
21801 fi
21802 echo "$as_me:$LINENO: result: $gt_cv_func_printf_posix" >&5
21803 echo "${ECHO_T}$gt_cv_func_printf_posix" >&6
21804 case $gt_cv_func_printf_posix in
21805 *yes)
21806
21807 cat >>confdefs.h <<\_ACEOF
21808 #define HAVE_POSIX_PRINTF 1
21809 _ACEOF
21810
21811 ;;
21812 esac
21813
21814 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
21815 # for constant arguments. Useless!
21816 echo "$as_me:$LINENO: checking for working alloca.h" >&5
21817 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
21818 if test "${ac_cv_working_alloca_h+set}" = set; then
21819 echo $ECHO_N "(cached) $ECHO_C" >&6
21820 else
21821 cat >conftest.$ac_ext <<_ACEOF
21822 /* confdefs.h. */
21823 _ACEOF
21824 cat confdefs.h >>conftest.$ac_ext
21825 cat >>conftest.$ac_ext <<_ACEOF
21826 /* end confdefs.h. */
21827 #include <alloca.h>
21828 int
21829 main ()
21830 {
21831 char *p = (char *) alloca (2 * sizeof (int));
21832 ;
21833 return 0;
21834 }
21835 _ACEOF
21836 rm -f conftest.$ac_objext conftest$ac_exeext
21837 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21838 (eval $ac_link) 2>conftest.er1
21839 ac_status=$?
21840 grep -v '^ *+' conftest.er1 >conftest.err
21841 rm -f conftest.er1
21842 cat conftest.err >&5
21843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21844 (exit $ac_status); } &&
21845 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21847 (eval $ac_try) 2>&5
21848 ac_status=$?
21849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21850 (exit $ac_status); }; } &&
21851 { ac_try='test -s conftest$ac_exeext'
21852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21853 (eval $ac_try) 2>&5
21854 ac_status=$?
21855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21856 (exit $ac_status); }; }; then
21857 ac_cv_working_alloca_h=yes
21858 else
21859 echo "$as_me: failed program was:" >&5
21860 sed 's/^/| /' conftest.$ac_ext >&5
21861
21862 ac_cv_working_alloca_h=no
21863 fi
21864 rm -f conftest.err conftest.$ac_objext \
21865 conftest$ac_exeext conftest.$ac_ext
21866 fi
21867 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
21868 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
21869 if test $ac_cv_working_alloca_h = yes; then
21870
21871 cat >>confdefs.h <<\_ACEOF
21872 #define HAVE_ALLOCA_H 1
21873 _ACEOF
21874
21875 fi
21876
21877 echo "$as_me:$LINENO: checking for alloca" >&5
21878 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
21879 if test "${ac_cv_func_alloca_works+set}" = set; then
21880 echo $ECHO_N "(cached) $ECHO_C" >&6
21881 else
21882 cat >conftest.$ac_ext <<_ACEOF
21883 /* confdefs.h. */
21884 _ACEOF
21885 cat confdefs.h >>conftest.$ac_ext
21886 cat >>conftest.$ac_ext <<_ACEOF
21887 /* end confdefs.h. */
21888 #ifdef __GNUC__
21889 # define alloca __builtin_alloca
21890 #else
21891 # ifdef _MSC_VER
21892 # include <malloc.h>
21893 # define alloca _alloca
21894 # else
21895 # if HAVE_ALLOCA_H
21896 # include <alloca.h>
21897 # else
21898 # ifdef _AIX
21899 #pragma alloca
21900 # else
21901 # ifndef alloca /* predefined by HP cc +Olibcalls */
21902 char *alloca ();
21903 # endif
21904 # endif
21905 # endif
21906 # endif
21907 #endif
21908
21909 int
21910 main ()
21911 {
21912 char *p = (char *) alloca (1);
21913 ;
21914 return 0;
21915 }
21916 _ACEOF
21917 rm -f conftest.$ac_objext conftest$ac_exeext
21918 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21919 (eval $ac_link) 2>conftest.er1
21920 ac_status=$?
21921 grep -v '^ *+' conftest.er1 >conftest.err
21922 rm -f conftest.er1
21923 cat conftest.err >&5
21924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21925 (exit $ac_status); } &&
21926 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21928 (eval $ac_try) 2>&5
21929 ac_status=$?
21930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21931 (exit $ac_status); }; } &&
21932 { ac_try='test -s conftest$ac_exeext'
21933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21934 (eval $ac_try) 2>&5
21935 ac_status=$?
21936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21937 (exit $ac_status); }; }; then
21938 ac_cv_func_alloca_works=yes
21939 else
21940 echo "$as_me: failed program was:" >&5
21941 sed 's/^/| /' conftest.$ac_ext >&5
21942
21943 ac_cv_func_alloca_works=no
21944 fi
21945 rm -f conftest.err conftest.$ac_objext \
21946 conftest$ac_exeext conftest.$ac_ext
21947 fi
21948 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
21949 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
21950
21951 if test $ac_cv_func_alloca_works = yes; then
21952
21953 cat >>confdefs.h <<\_ACEOF
21954 #define HAVE_ALLOCA 1
21955 _ACEOF
21956
21957 else
21958 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
21959 # that cause trouble. Some versions do not even contain alloca or
21960 # contain a buggy version. If you still want to use their alloca,
21961 # use ar to extract alloca.o from them instead of compiling alloca.c.
21962
21963 ALLOCA=alloca.$ac_objext
21964
21965 cat >>confdefs.h <<\_ACEOF
21966 #define C_ALLOCA 1
21967 _ACEOF
21968
21969
21970 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
21971 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
21972 if test "${ac_cv_os_cray+set}" = set; then
21973 echo $ECHO_N "(cached) $ECHO_C" >&6
21974 else
21975 cat >conftest.$ac_ext <<_ACEOF
21976 /* confdefs.h. */
21977 _ACEOF
21978 cat confdefs.h >>conftest.$ac_ext
21979 cat >>conftest.$ac_ext <<_ACEOF
21980 /* end confdefs.h. */
21981 #if defined(CRAY) && ! defined(CRAY2)
21982 webecray
21983 #else
21984 wenotbecray
21985 #endif
21986
21987 _ACEOF
21988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21989 $EGREP "webecray" >/dev/null 2>&1; then
21990 ac_cv_os_cray=yes
21991 else
21992 ac_cv_os_cray=no
21993 fi
21994 rm -f conftest*
21995
21996 fi
21997 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
21998 echo "${ECHO_T}$ac_cv_os_cray" >&6
21999 if test $ac_cv_os_cray = yes; then
22000 for ac_func in _getb67 GETB67 getb67; do
22001 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22002 echo "$as_me:$LINENO: checking for $ac_func" >&5
22003 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22004 if eval "test \"\${$as_ac_var+set}\" = set"; then
22005 echo $ECHO_N "(cached) $ECHO_C" >&6
22006 else
22007 cat >conftest.$ac_ext <<_ACEOF
22008 /* confdefs.h. */
22009 _ACEOF
22010 cat confdefs.h >>conftest.$ac_ext
22011 cat >>conftest.$ac_ext <<_ACEOF
22012 /* end confdefs.h. */
22013 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22014 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22015 #define $ac_func innocuous_$ac_func
22016
22017 /* System header to define __stub macros and hopefully few prototypes,
22018 which can conflict with char $ac_func (); below.
22019 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22020 <limits.h> exists even on freestanding compilers. */
22021
22022 #ifdef __STDC__
22023 # include <limits.h>
22024 #else
22025 # include <assert.h>
22026 #endif
22027
22028 #undef $ac_func
22029
22030 /* Override any gcc2 internal prototype to avoid an error. */
22031 #ifdef __cplusplus
22032 extern "C"
22033 {
22034 #endif
22035 /* We use char because int might match the return type of a gcc2
22036 builtin and then its argument prototype would still apply. */
22037 char $ac_func ();
22038 /* The GNU C library defines this for functions which it implements
22039 to always fail with ENOSYS. Some functions are actually named
22040 something starting with __ and the normal name is an alias. */
22041 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22042 choke me
22043 #else
22044 char (*f) () = $ac_func;
22045 #endif
22046 #ifdef __cplusplus
22047 }
22048 #endif
22049
22050 int
22051 main ()
22052 {
22053 return f != $ac_func;
22054 ;
22055 return 0;
22056 }
22057 _ACEOF
22058 rm -f conftest.$ac_objext conftest$ac_exeext
22059 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22060 (eval $ac_link) 2>conftest.er1
22061 ac_status=$?
22062 grep -v '^ *+' conftest.er1 >conftest.err
22063 rm -f conftest.er1
22064 cat conftest.err >&5
22065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22066 (exit $ac_status); } &&
22067 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22069 (eval $ac_try) 2>&5
22070 ac_status=$?
22071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22072 (exit $ac_status); }; } &&
22073 { ac_try='test -s conftest$ac_exeext'
22074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22075 (eval $ac_try) 2>&5
22076 ac_status=$?
22077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22078 (exit $ac_status); }; }; then
22079 eval "$as_ac_var=yes"
22080 else
22081 echo "$as_me: failed program was:" >&5
22082 sed 's/^/| /' conftest.$ac_ext >&5
22083
22084 eval "$as_ac_var=no"
22085 fi
22086 rm -f conftest.err conftest.$ac_objext \
22087 conftest$ac_exeext conftest.$ac_ext
22088 fi
22089 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
22090 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22091 if test `eval echo '${'$as_ac_var'}'` = yes; then
22092
22093 cat >>confdefs.h <<_ACEOF
22094 #define CRAY_STACKSEG_END $ac_func
22095 _ACEOF
22096
22097 break
22098 fi
22099
22100 done
22101 fi
22102
22103 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
22104 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
22105 if test "${ac_cv_c_stack_direction+set}" = set; then
22106 echo $ECHO_N "(cached) $ECHO_C" >&6
22107 else
22108 if test "$cross_compiling" = yes; then
22109 ac_cv_c_stack_direction=0
22110 else
22111 cat >conftest.$ac_ext <<_ACEOF
22112 /* confdefs.h. */
22113 _ACEOF
22114 cat confdefs.h >>conftest.$ac_ext
22115 cat >>conftest.$ac_ext <<_ACEOF
22116 /* end confdefs.h. */
22117 int
22118 find_stack_direction ()
22119 {
22120 static char *addr = 0;
22121 auto char dummy;
22122 if (addr == 0)
22123 {
22124 addr = &dummy;
22125 return find_stack_direction ();
22126 }
22127 else
22128 return (&dummy > addr) ? 1 : -1;
22129 }
22130
22131 int
22132 main ()
22133 {
22134 exit (find_stack_direction () < 0);
22135 }
22136 _ACEOF
22137 rm -f conftest$ac_exeext
22138 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22139 (eval $ac_link) 2>&5
22140 ac_status=$?
22141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22142 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22144 (eval $ac_try) 2>&5
22145 ac_status=$?
22146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22147 (exit $ac_status); }; }; then
22148 ac_cv_c_stack_direction=1
22149 else
22150 echo "$as_me: program exited with status $ac_status" >&5
22151 echo "$as_me: failed program was:" >&5
22152 sed 's/^/| /' conftest.$ac_ext >&5
22153
22154 ( exit $ac_status )
22155 ac_cv_c_stack_direction=-1
22156 fi
22157 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22158 fi
22159 fi
22160 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
22161 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
22162
22163 cat >>confdefs.h <<_ACEOF
22164 #define STACK_DIRECTION $ac_cv_c_stack_direction
22165 _ACEOF
22166
22167
22168 fi
22169
22170
22171
22172 for ac_header in stdlib.h unistd.h
22173 do
22174 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22175 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22176 echo "$as_me:$LINENO: checking for $ac_header" >&5
22177 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22178 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22179 echo $ECHO_N "(cached) $ECHO_C" >&6
22180 fi
22181 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
22182 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22183 else
22184 # Is the header compilable?
22185 echo "$as_me:$LINENO: checking $ac_header usability" >&5
22186 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
22187 cat >conftest.$ac_ext <<_ACEOF
22188 /* confdefs.h. */
22189 _ACEOF
22190 cat confdefs.h >>conftest.$ac_ext
22191 cat >>conftest.$ac_ext <<_ACEOF
22192 /* end confdefs.h. */
22193 $ac_includes_default
22194 #include <$ac_header>
22195 _ACEOF
22196 rm -f conftest.$ac_objext
22197 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22198 (eval $ac_compile) 2>conftest.er1
22199 ac_status=$?
22200 grep -v '^ *+' conftest.er1 >conftest.err
22201 rm -f conftest.er1
22202 cat conftest.err >&5
22203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22204 (exit $ac_status); } &&
22205 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22207 (eval $ac_try) 2>&5
22208 ac_status=$?
22209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22210 (exit $ac_status); }; } &&
22211 { ac_try='test -s conftest.$ac_objext'
22212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22213 (eval $ac_try) 2>&5
22214 ac_status=$?
22215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22216 (exit $ac_status); }; }; then
22217 ac_header_compiler=yes
22218 else
22219 echo "$as_me: failed program was:" >&5
22220 sed 's/^/| /' conftest.$ac_ext >&5
22221
22222 ac_header_compiler=no
22223 fi
22224 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22225 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22226 echo "${ECHO_T}$ac_header_compiler" >&6
22227
22228 # Is the header present?
22229 echo "$as_me:$LINENO: checking $ac_header presence" >&5
22230 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
22231 cat >conftest.$ac_ext <<_ACEOF
22232 /* confdefs.h. */
22233 _ACEOF
22234 cat confdefs.h >>conftest.$ac_ext
22235 cat >>conftest.$ac_ext <<_ACEOF
22236 /* end confdefs.h. */
22237 #include <$ac_header>
22238 _ACEOF
22239 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22240 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22241 ac_status=$?
22242 grep -v '^ *+' conftest.er1 >conftest.err
22243 rm -f conftest.er1
22244 cat conftest.err >&5
22245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22246 (exit $ac_status); } >/dev/null; then
22247 if test -s conftest.err; then
22248 ac_cpp_err=$ac_c_preproc_warn_flag
22249 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22250 else
22251 ac_cpp_err=
22252 fi
22253 else
22254 ac_cpp_err=yes
22255 fi
22256 if test -z "$ac_cpp_err"; then
22257 ac_header_preproc=yes
22258 else
22259 echo "$as_me: failed program was:" >&5
22260 sed 's/^/| /' conftest.$ac_ext >&5
22261
22262 ac_header_preproc=no
22263 fi
22264 rm -f conftest.err conftest.$ac_ext
22265 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22266 echo "${ECHO_T}$ac_header_preproc" >&6
22267
22268 # So? What about this header?
22269 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22270 yes:no: )
22271 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22272 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
22273 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22274 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22275 ac_header_preproc=yes
22276 ;;
22277 no:yes:* )
22278 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22279 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
22280 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22281 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22282 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22283 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22284 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22285 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
22286 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22287 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
22288 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22289 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
22290 (
22291 cat <<\_ASBOX
22292 ## ------------------------------------------ ##
22293 ## Report this to the AC_PACKAGE_NAME lists. ##
22294 ## ------------------------------------------ ##
22295 _ASBOX
22296 ) |
22297 sed "s/^/$as_me: WARNING: /" >&2
22298 ;;
22299 esac
22300 echo "$as_me:$LINENO: checking for $ac_header" >&5
22301 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22302 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22303 echo $ECHO_N "(cached) $ECHO_C" >&6
22304 else
22305 eval "$as_ac_Header=\$ac_header_preproc"
22306 fi
22307 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
22308 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22309
22310 fi
22311 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22312 cat >>confdefs.h <<_ACEOF
22313 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22314 _ACEOF
22315
22316 fi
22317
22318 done
22319
22320
22321 for ac_func in getpagesize
22322 do
22323 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22324 echo "$as_me:$LINENO: checking for $ac_func" >&5
22325 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22326 if eval "test \"\${$as_ac_var+set}\" = set"; then
22327 echo $ECHO_N "(cached) $ECHO_C" >&6
22328 else
22329 cat >conftest.$ac_ext <<_ACEOF
22330 /* confdefs.h. */
22331 _ACEOF
22332 cat confdefs.h >>conftest.$ac_ext
22333 cat >>conftest.$ac_ext <<_ACEOF
22334 /* end confdefs.h. */
22335 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22336 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22337 #define $ac_func innocuous_$ac_func
22338
22339 /* System header to define __stub macros and hopefully few prototypes,
22340 which can conflict with char $ac_func (); below.
22341 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22342 <limits.h> exists even on freestanding compilers. */
22343
22344 #ifdef __STDC__
22345 # include <limits.h>
22346 #else
22347 # include <assert.h>
22348 #endif
22349
22350 #undef $ac_func
22351
22352 /* Override any gcc2 internal prototype to avoid an error. */
22353 #ifdef __cplusplus
22354 extern "C"
22355 {
22356 #endif
22357 /* We use char because int might match the return type of a gcc2
22358 builtin and then its argument prototype would still apply. */
22359 char $ac_func ();
22360 /* The GNU C library defines this for functions which it implements
22361 to always fail with ENOSYS. Some functions are actually named
22362 something starting with __ and the normal name is an alias. */
22363 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22364 choke me
22365 #else
22366 char (*f) () = $ac_func;
22367 #endif
22368 #ifdef __cplusplus
22369 }
22370 #endif
22371
22372 int
22373 main ()
22374 {
22375 return f != $ac_func;
22376 ;
22377 return 0;
22378 }
22379 _ACEOF
22380 rm -f conftest.$ac_objext conftest$ac_exeext
22381 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22382 (eval $ac_link) 2>conftest.er1
22383 ac_status=$?
22384 grep -v '^ *+' conftest.er1 >conftest.err
22385 rm -f conftest.er1
22386 cat conftest.err >&5
22387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22388 (exit $ac_status); } &&
22389 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22391 (eval $ac_try) 2>&5
22392 ac_status=$?
22393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22394 (exit $ac_status); }; } &&
22395 { ac_try='test -s conftest$ac_exeext'
22396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22397 (eval $ac_try) 2>&5
22398 ac_status=$?
22399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22400 (exit $ac_status); }; }; then
22401 eval "$as_ac_var=yes"
22402 else
22403 echo "$as_me: failed program was:" >&5
22404 sed 's/^/| /' conftest.$ac_ext >&5
22405
22406 eval "$as_ac_var=no"
22407 fi
22408 rm -f conftest.err conftest.$ac_objext \
22409 conftest$ac_exeext conftest.$ac_ext
22410 fi
22411 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
22412 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22413 if test `eval echo '${'$as_ac_var'}'` = yes; then
22414 cat >>confdefs.h <<_ACEOF
22415 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22416 _ACEOF
22417
22418 fi
22419 done
22420
22421 echo "$as_me:$LINENO: checking for working mmap" >&5
22422 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
22423 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
22424 echo $ECHO_N "(cached) $ECHO_C" >&6
22425 else
22426 if test "$cross_compiling" = yes; then
22427 ac_cv_func_mmap_fixed_mapped=no
22428 else
22429 cat >conftest.$ac_ext <<_ACEOF
22430 /* confdefs.h. */
22431 _ACEOF
22432 cat confdefs.h >>conftest.$ac_ext
22433 cat >>conftest.$ac_ext <<_ACEOF
22434 /* end confdefs.h. */
22435 $ac_includes_default
22436 /* malloc might have been renamed as rpl_malloc. */
22437 #undef malloc
22438
22439 /* Thanks to Mike Haertel and Jim Avera for this test.
22440 Here is a matrix of mmap possibilities:
22441 mmap private not fixed
22442 mmap private fixed at somewhere currently unmapped
22443 mmap private fixed at somewhere already mapped
22444 mmap shared not fixed
22445 mmap shared fixed at somewhere currently unmapped
22446 mmap shared fixed at somewhere already mapped
22447 For private mappings, we should verify that changes cannot be read()
22448 back from the file, nor mmap's back from the file at a different
22449 address. (There have been systems where private was not correctly
22450 implemented like the infamous i386 svr4.0, and systems where the
22451 VM page cache was not coherent with the file system buffer cache
22452 like early versions of FreeBSD and possibly contemporary NetBSD.)
22453 For shared mappings, we should conversely verify that changes get
22454 propagated back to all the places they're supposed to be.
22455
22456 Grep wants private fixed already mapped.
22457 The main things grep needs to know about mmap are:
22458 * does it exist and is it safe to write into the mmap'd area
22459 * how to use it (BSD variants) */
22460
22461 #include <fcntl.h>
22462 #include <sys/mman.h>
22463
22464 #if !STDC_HEADERS && !HAVE_STDLIB_H
22465 char *malloc ();
22466 #endif
22467
22468 /* This mess was copied from the GNU getpagesize.h. */
22469 #if !HAVE_GETPAGESIZE
22470 /* Assume that all systems that can run configure have sys/param.h. */
22471 # if !HAVE_SYS_PARAM_H
22472 # define HAVE_SYS_PARAM_H 1
22473 # endif
22474
22475 # ifdef _SC_PAGESIZE
22476 # define getpagesize() sysconf(_SC_PAGESIZE)
22477 # else /* no _SC_PAGESIZE */
22478 # if HAVE_SYS_PARAM_H
22479 # include <sys/param.h>
22480 # ifdef EXEC_PAGESIZE
22481 # define getpagesize() EXEC_PAGESIZE
22482 # else /* no EXEC_PAGESIZE */
22483 # ifdef NBPG
22484 # define getpagesize() NBPG * CLSIZE
22485 # ifndef CLSIZE
22486 # define CLSIZE 1
22487 # endif /* no CLSIZE */
22488 # else /* no NBPG */
22489 # ifdef NBPC
22490 # define getpagesize() NBPC
22491 # else /* no NBPC */
22492 # ifdef PAGESIZE
22493 # define getpagesize() PAGESIZE
22494 # endif /* PAGESIZE */
22495 # endif /* no NBPC */
22496 # endif /* no NBPG */
22497 # endif /* no EXEC_PAGESIZE */
22498 # else /* no HAVE_SYS_PARAM_H */
22499 # define getpagesize() 8192 /* punt totally */
22500 # endif /* no HAVE_SYS_PARAM_H */
22501 # endif /* no _SC_PAGESIZE */
22502
22503 #endif /* no HAVE_GETPAGESIZE */
22504
22505 int
22506 main ()
22507 {
22508 char *data, *data2, *data3;
22509 int i, pagesize;
22510 int fd;
22511
22512 pagesize = getpagesize ();
22513
22514 /* First, make a file with some known garbage in it. */
22515 data = (char *) malloc (pagesize);
22516 if (!data)
22517 exit (1);
22518 for (i = 0; i < pagesize; ++i)
22519 *(data + i) = rand ();
22520 umask (0);
22521 fd = creat ("conftest.mmap", 0600);
22522 if (fd < 0)
22523 exit (1);
22524 if (write (fd, data, pagesize) != pagesize)
22525 exit (1);
22526 close (fd);
22527
22528 /* Next, try to mmap the file at a fixed address which already has
22529 something else allocated at it. If we can, also make sure that
22530 we see the same garbage. */
22531 fd = open ("conftest.mmap", O_RDWR);
22532 if (fd < 0)
22533 exit (1);
22534 data2 = (char *) malloc (2 * pagesize);
22535 if (!data2)
22536 exit (1);
22537 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
22538 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
22539 MAP_PRIVATE | MAP_FIXED, fd, 0L))
22540 exit (1);
22541 for (i = 0; i < pagesize; ++i)
22542 if (*(data + i) != *(data2 + i))
22543 exit (1);
22544
22545 /* Finally, make sure that changes to the mapped area do not
22546 percolate back to the file as seen by read(). (This is a bug on
22547 some variants of i386 svr4.0.) */
22548 for (i = 0; i < pagesize; ++i)
22549 *(data2 + i) = *(data2 + i) + 1;
22550 data3 = (char *) malloc (pagesize);
22551 if (!data3)
22552 exit (1);
22553 if (read (fd, data3, pagesize) != pagesize)
22554 exit (1);
22555 for (i = 0; i < pagesize; ++i)
22556 if (*(data + i) != *(data3 + i))
22557 exit (1);
22558 close (fd);
22559 exit (0);
22560 }
22561 _ACEOF
22562 rm -f conftest$ac_exeext
22563 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22564 (eval $ac_link) 2>&5
22565 ac_status=$?
22566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22567 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22569 (eval $ac_try) 2>&5
22570 ac_status=$?
22571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22572 (exit $ac_status); }; }; then
22573 ac_cv_func_mmap_fixed_mapped=yes
22574 else
22575 echo "$as_me: program exited with status $ac_status" >&5
22576 echo "$as_me: failed program was:" >&5
22577 sed 's/^/| /' conftest.$ac_ext >&5
22578
22579 ( exit $ac_status )
22580 ac_cv_func_mmap_fixed_mapped=no
22581 fi
22582 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22583 fi
22584 fi
22585 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
22586 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
22587 if test $ac_cv_func_mmap_fixed_mapped = yes; then
22588
22589 cat >>confdefs.h <<\_ACEOF
22590 #define HAVE_MMAP 1
22591 _ACEOF
22592
22593 fi
22594 rm -f conftest.mmap
22595
22596
22597 echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5
22598 echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
22599 if test "${ac_cv_gnu_library_2_1+set}" = set; then
22600 echo $ECHO_N "(cached) $ECHO_C" >&6
22601 else
22602 cat >conftest.$ac_ext <<_ACEOF
22603 /* confdefs.h. */
22604 _ACEOF
22605 cat confdefs.h >>conftest.$ac_ext
22606 cat >>conftest.$ac_ext <<_ACEOF
22607 /* end confdefs.h. */
22608
22609 #include <features.h>
22610 #ifdef __GNU_LIBRARY__
22611 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
22612 Lucky GNU user
22613 #endif
22614 #endif
22615
22616 _ACEOF
22617 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22618 $EGREP "Lucky GNU user" >/dev/null 2>&1; then
22619 ac_cv_gnu_library_2_1=yes
22620 else
22621 ac_cv_gnu_library_2_1=no
22622 fi
22623 rm -f conftest*
22624
22625
22626
22627 fi
22628 echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5
22629 echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
22630
22631 GLIBC21="$ac_cv_gnu_library_2_1"
22632
22633
22634
22635
22636 echo "$as_me:$LINENO: checking whether integer division by zero raises SIGFPE" >&5
22637 echo $ECHO_N "checking whether integer division by zero raises SIGFPE... $ECHO_C" >&6
22638 if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then
22639 echo $ECHO_N "(cached) $ECHO_C" >&6
22640 else
22641
22642 if test "$cross_compiling" = yes; then
22643
22644 # Guess based on the CPU.
22645 case "$host_cpu" in
22646 alpha* | i3456786 | m68k | s390*)
22647 gt_cv_int_divbyzero_sigfpe="guessing yes";;
22648 *)
22649 gt_cv_int_divbyzero_sigfpe="guessing no";;
22650 esac
22651
22652 else
22653 cat >conftest.$ac_ext <<_ACEOF
22654 /* confdefs.h. */
22655 _ACEOF
22656 cat confdefs.h >>conftest.$ac_ext
22657 cat >>conftest.$ac_ext <<_ACEOF
22658 /* end confdefs.h. */
22659
22660 #include <stdlib.h>
22661 #include <signal.h>
22662
22663 static void
22664 #ifdef __cplusplus
22665 sigfpe_handler (int sig)
22666 #else
22667 sigfpe_handler (sig) int sig;
22668 #endif
22669 {
22670 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
22671 exit (sig != SIGFPE);
22672 }
22673
22674 int x = 1;
22675 int y = 0;
22676 int z;
22677 int nan;
22678
22679 int main ()
22680 {
22681 signal (SIGFPE, sigfpe_handler);
22682 /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
22683 #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
22684 signal (SIGTRAP, sigfpe_handler);
22685 #endif
22686 /* Linux/SPARC yields signal SIGILL. */
22687 #if defined (__sparc__) && defined (__linux__)
22688 signal (SIGILL, sigfpe_handler);
22689 #endif
22690
22691 z = x / y;
22692 nan = y / y;
22693 exit (1);
22694 }
22695
22696 _ACEOF
22697 rm -f conftest$ac_exeext
22698 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22699 (eval $ac_link) 2>&5
22700 ac_status=$?
22701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22702 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22704 (eval $ac_try) 2>&5
22705 ac_status=$?
22706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22707 (exit $ac_status); }; }; then
22708 gt_cv_int_divbyzero_sigfpe=yes
22709 else
22710 echo "$as_me: program exited with status $ac_status" >&5
22711 echo "$as_me: failed program was:" >&5
22712 sed 's/^/| /' conftest.$ac_ext >&5
22713
22714 ( exit $ac_status )
22715 gt_cv_int_divbyzero_sigfpe=no
22716 fi
22717 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22718 fi
22719
22720 fi
22721 echo "$as_me:$LINENO: result: $gt_cv_int_divbyzero_sigfpe" >&5
22722 echo "${ECHO_T}$gt_cv_int_divbyzero_sigfpe" >&6
22723 case "$gt_cv_int_divbyzero_sigfpe" in
22724 *yes) value=1;;
22725 *) value=0;;
22726 esac
22727
22728 cat >>confdefs.h <<_ACEOF
22729 #define INTDIV0_RAISES_SIGFPE $value
22730 _ACEOF
22731
22732
22733
22734 echo "$as_me:$LINENO: checking for unsigned long long" >&5
22735 echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6
22736 if test "${ac_cv_type_unsigned_long_long+set}" = set; then
22737 echo $ECHO_N "(cached) $ECHO_C" >&6
22738 else
22739 cat >conftest.$ac_ext <<_ACEOF
22740 /* confdefs.h. */
22741 _ACEOF
22742 cat confdefs.h >>conftest.$ac_ext
22743 cat >>conftest.$ac_ext <<_ACEOF
22744 /* end confdefs.h. */
22745 unsigned long long ull = 1ULL; int i = 63;
22746 int
22747 main ()
22748 {
22749 unsigned long long ullmax = (unsigned long long) -1;
22750 return ull << i | ull >> i | ullmax / ull | ullmax % ull;
22751 ;
22752 return 0;
22753 }
22754 _ACEOF
22755 rm -f conftest.$ac_objext conftest$ac_exeext
22756 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22757 (eval $ac_link) 2>conftest.er1
22758 ac_status=$?
22759 grep -v '^ *+' conftest.er1 >conftest.err
22760 rm -f conftest.er1
22761 cat conftest.err >&5
22762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22763 (exit $ac_status); } &&
22764 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
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); }; } &&
22770 { ac_try='test -s conftest$ac_exeext'
22771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22772 (eval $ac_try) 2>&5
22773 ac_status=$?
22774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22775 (exit $ac_status); }; }; then
22776 ac_cv_type_unsigned_long_long=yes
22777 else
22778 echo "$as_me: failed program was:" >&5
22779 sed 's/^/| /' conftest.$ac_ext >&5
22780
22781 ac_cv_type_unsigned_long_long=no
22782 fi
22783 rm -f conftest.err conftest.$ac_objext \
22784 conftest$ac_exeext conftest.$ac_ext
22785 fi
22786 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5
22787 echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6
22788 if test $ac_cv_type_unsigned_long_long = yes; then
22789
22790 cat >>confdefs.h <<\_ACEOF
22791 #define HAVE_UNSIGNED_LONG_LONG 1
22792 _ACEOF
22793
22794 fi
22795
22796
22797
22798
22799 if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
22800
22801 test $ac_cv_type_unsigned_long_long = yes \
22802 && ac_type='unsigned long long' \
22803 || ac_type='unsigned long'
22804
22805 cat >>confdefs.h <<_ACEOF
22806 #define uintmax_t $ac_type
22807 _ACEOF
22808
22809 else
22810
22811 cat >>confdefs.h <<\_ACEOF
22812 #define HAVE_UINTMAX_T 1
22813 _ACEOF
22814
22815 fi
22816
22817
22818 echo "$as_me:$LINENO: checking for inttypes.h" >&5
22819 echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
22820 if test "${gt_cv_header_inttypes_h+set}" = set; then
22821 echo $ECHO_N "(cached) $ECHO_C" >&6
22822 else
22823
22824 cat >conftest.$ac_ext <<_ACEOF
22825 /* confdefs.h. */
22826 _ACEOF
22827 cat confdefs.h >>conftest.$ac_ext
22828 cat >>conftest.$ac_ext <<_ACEOF
22829 /* end confdefs.h. */
22830 #include <sys/types.h>
22831 #include <inttypes.h>
22832 int
22833 main ()
22834 {
22835
22836 ;
22837 return 0;
22838 }
22839 _ACEOF
22840 rm -f conftest.$ac_objext
22841 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22842 (eval $ac_compile) 2>conftest.er1
22843 ac_status=$?
22844 grep -v '^ *+' conftest.er1 >conftest.err
22845 rm -f conftest.er1
22846 cat conftest.err >&5
22847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22848 (exit $ac_status); } &&
22849 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22851 (eval $ac_try) 2>&5
22852 ac_status=$?
22853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22854 (exit $ac_status); }; } &&
22855 { ac_try='test -s conftest.$ac_objext'
22856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22857 (eval $ac_try) 2>&5
22858 ac_status=$?
22859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22860 (exit $ac_status); }; }; then
22861 gt_cv_header_inttypes_h=yes
22862 else
22863 echo "$as_me: failed program was:" >&5
22864 sed 's/^/| /' conftest.$ac_ext >&5
22865
22866 gt_cv_header_inttypes_h=no
22867 fi
22868 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22869
22870 fi
22871 echo "$as_me:$LINENO: result: $gt_cv_header_inttypes_h" >&5
22872 echo "${ECHO_T}$gt_cv_header_inttypes_h" >&6
22873 if test $gt_cv_header_inttypes_h = yes; then
22874
22875 cat >>confdefs.h <<_ACEOF
22876 #define HAVE_INTTYPES_H 1
22877 _ACEOF
22878
22879 fi
22880
22881
22882
22883 if test $gt_cv_header_inttypes_h = yes; then
22884 echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5
22885 echo $ECHO_N "checking whether the inttypes.h PRIxNN macros are broken... $ECHO_C" >&6
22886 if test "${gt_cv_inttypes_pri_broken+set}" = set; then
22887 echo $ECHO_N "(cached) $ECHO_C" >&6
22888 else
22889
22890 cat >conftest.$ac_ext <<_ACEOF
22891 /* confdefs.h. */
22892 _ACEOF
22893 cat confdefs.h >>conftest.$ac_ext
22894 cat >>conftest.$ac_ext <<_ACEOF
22895 /* end confdefs.h. */
22896 #include <inttypes.h>
22897 #ifdef PRId32
22898 char *p = PRId32;
22899 #endif
22900
22901 int
22902 main ()
22903 {
22904
22905 ;
22906 return 0;
22907 }
22908 _ACEOF
22909 rm -f conftest.$ac_objext
22910 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22911 (eval $ac_compile) 2>conftest.er1
22912 ac_status=$?
22913 grep -v '^ *+' conftest.er1 >conftest.err
22914 rm -f conftest.er1
22915 cat conftest.err >&5
22916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22917 (exit $ac_status); } &&
22918 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22920 (eval $ac_try) 2>&5
22921 ac_status=$?
22922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22923 (exit $ac_status); }; } &&
22924 { ac_try='test -s conftest.$ac_objext'
22925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22926 (eval $ac_try) 2>&5
22927 ac_status=$?
22928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22929 (exit $ac_status); }; }; then
22930 gt_cv_inttypes_pri_broken=no
22931 else
22932 echo "$as_me: failed program was:" >&5
22933 sed 's/^/| /' conftest.$ac_ext >&5
22934
22935 gt_cv_inttypes_pri_broken=yes
22936 fi
22937 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22938
22939 fi
22940 echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5
22941 echo "${ECHO_T}$gt_cv_inttypes_pri_broken" >&6
22942 fi
22943 if test "$gt_cv_inttypes_pri_broken" = yes; then
22944
22945 cat >>confdefs.h <<_ACEOF
22946 #define PRI_MACROS_BROKEN 1
22947 _ACEOF
22948
22949 fi
22950
22951
22952
22953 for ac_header in stdint.h
22954 do
22955 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22956 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22957 echo "$as_me:$LINENO: checking for $ac_header" >&5
22958 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22959 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22960 echo $ECHO_N "(cached) $ECHO_C" >&6
22961 fi
22962 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
22963 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22964 else
22965 # Is the header compilable?
22966 echo "$as_me:$LINENO: checking $ac_header usability" >&5
22967 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
22968 cat >conftest.$ac_ext <<_ACEOF
22969 /* confdefs.h. */
22970 _ACEOF
22971 cat confdefs.h >>conftest.$ac_ext
22972 cat >>conftest.$ac_ext <<_ACEOF
22973 /* end confdefs.h. */
22974 $ac_includes_default
22975 #include <$ac_header>
22976 _ACEOF
22977 rm -f conftest.$ac_objext
22978 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22979 (eval $ac_compile) 2>conftest.er1
22980 ac_status=$?
22981 grep -v '^ *+' conftest.er1 >conftest.err
22982 rm -f conftest.er1
22983 cat conftest.err >&5
22984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22985 (exit $ac_status); } &&
22986 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22988 (eval $ac_try) 2>&5
22989 ac_status=$?
22990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22991 (exit $ac_status); }; } &&
22992 { ac_try='test -s conftest.$ac_objext'
22993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22994 (eval $ac_try) 2>&5
22995 ac_status=$?
22996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22997 (exit $ac_status); }; }; then
22998 ac_header_compiler=yes
22999 else
23000 echo "$as_me: failed program was:" >&5
23001 sed 's/^/| /' conftest.$ac_ext >&5
23002
23003 ac_header_compiler=no
23004 fi
23005 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23006 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23007 echo "${ECHO_T}$ac_header_compiler" >&6
23008
23009 # Is the header present?
23010 echo "$as_me:$LINENO: checking $ac_header presence" >&5
23011 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
23012 cat >conftest.$ac_ext <<_ACEOF
23013 /* confdefs.h. */
23014 _ACEOF
23015 cat confdefs.h >>conftest.$ac_ext
23016 cat >>conftest.$ac_ext <<_ACEOF
23017 /* end confdefs.h. */
23018 #include <$ac_header>
23019 _ACEOF
23020 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
23021 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23022 ac_status=$?
23023 grep -v '^ *+' conftest.er1 >conftest.err
23024 rm -f conftest.er1
23025 cat conftest.err >&5
23026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23027 (exit $ac_status); } >/dev/null; then
23028 if test -s conftest.err; then
23029 ac_cpp_err=$ac_c_preproc_warn_flag
23030 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
23031 else
23032 ac_cpp_err=
23033 fi
23034 else
23035 ac_cpp_err=yes
23036 fi
23037 if test -z "$ac_cpp_err"; then
23038 ac_header_preproc=yes
23039 else
23040 echo "$as_me: failed program was:" >&5
23041 sed 's/^/| /' conftest.$ac_ext >&5
23042
23043 ac_header_preproc=no
23044 fi
23045 rm -f conftest.err conftest.$ac_ext
23046 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23047 echo "${ECHO_T}$ac_header_preproc" >&6
23048
23049 # So? What about this header?
23050 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23051 yes:no: )
23052 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23053 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
23054 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23055 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23056 ac_header_preproc=yes
23057 ;;
23058 no:yes:* )
23059 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23060 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
23061 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23062 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23063 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23064 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23065 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23066 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
23067 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
23068 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
23069 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23070 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
23071 (
23072 cat <<\_ASBOX
23073 ## ------------------------------------------ ##
23074 ## Report this to the AC_PACKAGE_NAME lists. ##
23075 ## ------------------------------------------ ##
23076 _ASBOX
23077 ) |
23078 sed "s/^/$as_me: WARNING: /" >&2
23079 ;;
23080 esac
23081 echo "$as_me:$LINENO: checking for $ac_header" >&5
23082 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23083 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23084 echo $ECHO_N "(cached) $ECHO_C" >&6
23085 else
23086 eval "$as_ac_Header=\$ac_header_preproc"
23087 fi
23088 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
23089 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23090
23091 fi
23092 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23093 cat >>confdefs.h <<_ACEOF
23094 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23095 _ACEOF
23096
23097 fi
23098
23099 done
23100
23101 echo "$as_me:$LINENO: checking for SIZE_MAX" >&5
23102 echo $ECHO_N "checking for SIZE_MAX... $ECHO_C" >&6
23103 result=
23104 cat >conftest.$ac_ext <<_ACEOF
23105 /* confdefs.h. */
23106 _ACEOF
23107 cat confdefs.h >>conftest.$ac_ext
23108 cat >>conftest.$ac_ext <<_ACEOF
23109 /* end confdefs.h. */
23110
23111 #include <limits.h>
23112 #if HAVE_STDINT_H
23113 #include <stdint.h>
23114 #endif
23115 #ifdef SIZE_MAX
23116 Found it
23117 #endif
23118
23119 _ACEOF
23120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23121 $EGREP "Found it" >/dev/null 2>&1; then
23122 result=yes
23123 fi
23124 rm -f conftest*
23125
23126 if test -z "$result"; then
23127 if test "$cross_compiling" = yes; then
23128 # Depending upon the size, compute the lo and hi bounds.
23129 cat >conftest.$ac_ext <<_ACEOF
23130 /* confdefs.h. */
23131 _ACEOF
23132 cat confdefs.h >>conftest.$ac_ext
23133 cat >>conftest.$ac_ext <<_ACEOF
23134 /* end confdefs.h. */
23135 #include <stddef.h>
23136 int
23137 main ()
23138 {
23139 static int test_array [1 - 2 * !((~(size_t)0 / 10) >= 0)];
23140 test_array [0] = 0
23141
23142 ;
23143 return 0;
23144 }
23145 _ACEOF
23146 rm -f conftest.$ac_objext
23147 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23148 (eval $ac_compile) 2>conftest.er1
23149 ac_status=$?
23150 grep -v '^ *+' conftest.er1 >conftest.err
23151 rm -f conftest.er1
23152 cat conftest.err >&5
23153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23154 (exit $ac_status); } &&
23155 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23157 (eval $ac_try) 2>&5
23158 ac_status=$?
23159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23160 (exit $ac_status); }; } &&
23161 { ac_try='test -s conftest.$ac_objext'
23162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23163 (eval $ac_try) 2>&5
23164 ac_status=$?
23165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23166 (exit $ac_status); }; }; then
23167 ac_lo=0 ac_mid=0
23168 while :; do
23169 cat >conftest.$ac_ext <<_ACEOF
23170 /* confdefs.h. */
23171 _ACEOF
23172 cat confdefs.h >>conftest.$ac_ext
23173 cat >>conftest.$ac_ext <<_ACEOF
23174 /* end confdefs.h. */
23175 #include <stddef.h>
23176 int
23177 main ()
23178 {
23179 static int test_array [1 - 2 * !((~(size_t)0 / 10) <= $ac_mid)];
23180 test_array [0] = 0
23181
23182 ;
23183 return 0;
23184 }
23185 _ACEOF
23186 rm -f conftest.$ac_objext
23187 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23188 (eval $ac_compile) 2>conftest.er1
23189 ac_status=$?
23190 grep -v '^ *+' conftest.er1 >conftest.err
23191 rm -f conftest.er1
23192 cat conftest.err >&5
23193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23194 (exit $ac_status); } &&
23195 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23197 (eval $ac_try) 2>&5
23198 ac_status=$?
23199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23200 (exit $ac_status); }; } &&
23201 { ac_try='test -s conftest.$ac_objext'
23202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23203 (eval $ac_try) 2>&5
23204 ac_status=$?
23205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23206 (exit $ac_status); }; }; then
23207 ac_hi=$ac_mid; break
23208 else
23209 echo "$as_me: failed program was:" >&5
23210 sed 's/^/| /' conftest.$ac_ext >&5
23211
23212 ac_lo=`expr $ac_mid + 1`
23213 if test $ac_lo -le $ac_mid; then
23214 ac_lo= ac_hi=
23215 break
23216 fi
23217 ac_mid=`expr 2 '*' $ac_mid + 1`
23218 fi
23219 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23220 done
23221 else
23222 echo "$as_me: failed program was:" >&5
23223 sed 's/^/| /' conftest.$ac_ext >&5
23224
23225 cat >conftest.$ac_ext <<_ACEOF
23226 /* confdefs.h. */
23227 _ACEOF
23228 cat confdefs.h >>conftest.$ac_ext
23229 cat >>conftest.$ac_ext <<_ACEOF
23230 /* end confdefs.h. */
23231 #include <stddef.h>
23232 int
23233 main ()
23234 {
23235 static int test_array [1 - 2 * !((~(size_t)0 / 10) < 0)];
23236 test_array [0] = 0
23237
23238 ;
23239 return 0;
23240 }
23241 _ACEOF
23242 rm -f conftest.$ac_objext
23243 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23244 (eval $ac_compile) 2>conftest.er1
23245 ac_status=$?
23246 grep -v '^ *+' conftest.er1 >conftest.err
23247 rm -f conftest.er1
23248 cat conftest.err >&5
23249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23250 (exit $ac_status); } &&
23251 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23253 (eval $ac_try) 2>&5
23254 ac_status=$?
23255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23256 (exit $ac_status); }; } &&
23257 { ac_try='test -s conftest.$ac_objext'
23258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23259 (eval $ac_try) 2>&5
23260 ac_status=$?
23261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23262 (exit $ac_status); }; }; then
23263 ac_hi=-1 ac_mid=-1
23264 while :; do
23265 cat >conftest.$ac_ext <<_ACEOF
23266 /* confdefs.h. */
23267 _ACEOF
23268 cat confdefs.h >>conftest.$ac_ext
23269 cat >>conftest.$ac_ext <<_ACEOF
23270 /* end confdefs.h. */
23271 #include <stddef.h>
23272 int
23273 main ()
23274 {
23275 static int test_array [1 - 2 * !((~(size_t)0 / 10) >= $ac_mid)];
23276 test_array [0] = 0
23277
23278 ;
23279 return 0;
23280 }
23281 _ACEOF
23282 rm -f conftest.$ac_objext
23283 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23284 (eval $ac_compile) 2>conftest.er1
23285 ac_status=$?
23286 grep -v '^ *+' conftest.er1 >conftest.err
23287 rm -f conftest.er1
23288 cat conftest.err >&5
23289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23290 (exit $ac_status); } &&
23291 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23293 (eval $ac_try) 2>&5
23294 ac_status=$?
23295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23296 (exit $ac_status); }; } &&
23297 { ac_try='test -s conftest.$ac_objext'
23298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23299 (eval $ac_try) 2>&5
23300 ac_status=$?
23301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23302 (exit $ac_status); }; }; then
23303 ac_lo=$ac_mid; break
23304 else
23305 echo "$as_me: failed program was:" >&5
23306 sed 's/^/| /' conftest.$ac_ext >&5
23307
23308 ac_hi=`expr '(' $ac_mid ')' - 1`
23309 if test $ac_mid -le $ac_hi; then
23310 ac_lo= ac_hi=
23311 break
23312 fi
23313 ac_mid=`expr 2 '*' $ac_mid`
23314 fi
23315 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23316 done
23317 else
23318 echo "$as_me: failed program was:" >&5
23319 sed 's/^/| /' conftest.$ac_ext >&5
23320
23321 ac_lo= ac_hi=
23322 fi
23323 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23324 fi
23325 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23326 # Binary search between lo and hi bounds.
23327 while test "x$ac_lo" != "x$ac_hi"; do
23328 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23329 cat >conftest.$ac_ext <<_ACEOF
23330 /* confdefs.h. */
23331 _ACEOF
23332 cat confdefs.h >>conftest.$ac_ext
23333 cat >>conftest.$ac_ext <<_ACEOF
23334 /* end confdefs.h. */
23335 #include <stddef.h>
23336 int
23337 main ()
23338 {
23339 static int test_array [1 - 2 * !((~(size_t)0 / 10) <= $ac_mid)];
23340 test_array [0] = 0
23341
23342 ;
23343 return 0;
23344 }
23345 _ACEOF
23346 rm -f conftest.$ac_objext
23347 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23348 (eval $ac_compile) 2>conftest.er1
23349 ac_status=$?
23350 grep -v '^ *+' conftest.er1 >conftest.err
23351 rm -f conftest.er1
23352 cat conftest.err >&5
23353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23354 (exit $ac_status); } &&
23355 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23357 (eval $ac_try) 2>&5
23358 ac_status=$?
23359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23360 (exit $ac_status); }; } &&
23361 { ac_try='test -s conftest.$ac_objext'
23362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23363 (eval $ac_try) 2>&5
23364 ac_status=$?
23365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23366 (exit $ac_status); }; }; then
23367 ac_hi=$ac_mid
23368 else
23369 echo "$as_me: failed program was:" >&5
23370 sed 's/^/| /' conftest.$ac_ext >&5
23371
23372 ac_lo=`expr '(' $ac_mid ')' + 1`
23373 fi
23374 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23375 done
23376 case $ac_lo in
23377 ?*) res_hi=$ac_lo;;
23378 '') result=? ;;
23379 esac
23380 else
23381 if test "$cross_compiling" = yes; then
23382 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
23383 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
23384 { (exit 1); exit 1; }; }
23385 else
23386 cat >conftest.$ac_ext <<_ACEOF
23387 /* confdefs.h. */
23388 _ACEOF
23389 cat confdefs.h >>conftest.$ac_ext
23390 cat >>conftest.$ac_ext <<_ACEOF
23391 /* end confdefs.h. */
23392 #include <stddef.h>
23393 long longval () { return ~(size_t)0 / 10; }
23394 unsigned long ulongval () { return ~(size_t)0 / 10; }
23395 #include <stdio.h>
23396 #include <stdlib.h>
23397 int
23398 main ()
23399 {
23400
23401 FILE *f = fopen ("conftest.val", "w");
23402 if (! f)
23403 exit (1);
23404 if ((~(size_t)0 / 10) < 0)
23405 {
23406 long i = longval ();
23407 if (i != (~(size_t)0 / 10))
23408 exit (1);
23409 fprintf (f, "%ld\n", i);
23410 }
23411 else
23412 {
23413 unsigned long i = ulongval ();
23414 if (i != (~(size_t)0 / 10))
23415 exit (1);
23416 fprintf (f, "%lu\n", i);
23417 }
23418 exit (ferror (f) || fclose (f) != 0);
23419
23420 ;
23421 return 0;
23422 }
23423 _ACEOF
23424 rm -f conftest$ac_exeext
23425 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23426 (eval $ac_link) 2>&5
23427 ac_status=$?
23428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23429 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23431 (eval $ac_try) 2>&5
23432 ac_status=$?
23433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23434 (exit $ac_status); }; }; then
23435 res_hi=`cat conftest.val`
23436 else
23437 echo "$as_me: program exited with status $ac_status" >&5
23438 echo "$as_me: failed program was:" >&5
23439 sed 's/^/| /' conftest.$ac_ext >&5
23440
23441 ( exit $ac_status )
23442 result=?
23443 fi
23444 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23445 fi
23446 fi
23447 rm -f conftest.val
23448 if test "$cross_compiling" = yes; then
23449 # Depending upon the size, compute the lo and hi bounds.
23450 cat >conftest.$ac_ext <<_ACEOF
23451 /* confdefs.h. */
23452 _ACEOF
23453 cat confdefs.h >>conftest.$ac_ext
23454 cat >>conftest.$ac_ext <<_ACEOF
23455 /* end confdefs.h. */
23456 #include <stddef.h>
23457 int
23458 main ()
23459 {
23460 static int test_array [1 - 2 * !((~(size_t)0 % 10) >= 0)];
23461 test_array [0] = 0
23462
23463 ;
23464 return 0;
23465 }
23466 _ACEOF
23467 rm -f conftest.$ac_objext
23468 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23469 (eval $ac_compile) 2>conftest.er1
23470 ac_status=$?
23471 grep -v '^ *+' conftest.er1 >conftest.err
23472 rm -f conftest.er1
23473 cat conftest.err >&5
23474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23475 (exit $ac_status); } &&
23476 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23478 (eval $ac_try) 2>&5
23479 ac_status=$?
23480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23481 (exit $ac_status); }; } &&
23482 { ac_try='test -s conftest.$ac_objext'
23483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23484 (eval $ac_try) 2>&5
23485 ac_status=$?
23486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23487 (exit $ac_status); }; }; then
23488 ac_lo=0 ac_mid=0
23489 while :; do
23490 cat >conftest.$ac_ext <<_ACEOF
23491 /* confdefs.h. */
23492 _ACEOF
23493 cat confdefs.h >>conftest.$ac_ext
23494 cat >>conftest.$ac_ext <<_ACEOF
23495 /* end confdefs.h. */
23496 #include <stddef.h>
23497 int
23498 main ()
23499 {
23500 static int test_array [1 - 2 * !((~(size_t)0 % 10) <= $ac_mid)];
23501 test_array [0] = 0
23502
23503 ;
23504 return 0;
23505 }
23506 _ACEOF
23507 rm -f conftest.$ac_objext
23508 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23509 (eval $ac_compile) 2>conftest.er1
23510 ac_status=$?
23511 grep -v '^ *+' conftest.er1 >conftest.err
23512 rm -f conftest.er1
23513 cat conftest.err >&5
23514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23515 (exit $ac_status); } &&
23516 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23518 (eval $ac_try) 2>&5
23519 ac_status=$?
23520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23521 (exit $ac_status); }; } &&
23522 { ac_try='test -s conftest.$ac_objext'
23523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23524 (eval $ac_try) 2>&5
23525 ac_status=$?
23526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23527 (exit $ac_status); }; }; then
23528 ac_hi=$ac_mid; break
23529 else
23530 echo "$as_me: failed program was:" >&5
23531 sed 's/^/| /' conftest.$ac_ext >&5
23532
23533 ac_lo=`expr $ac_mid + 1`
23534 if test $ac_lo -le $ac_mid; then
23535 ac_lo= ac_hi=
23536 break
23537 fi
23538 ac_mid=`expr 2 '*' $ac_mid + 1`
23539 fi
23540 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23541 done
23542 else
23543 echo "$as_me: failed program was:" >&5
23544 sed 's/^/| /' conftest.$ac_ext >&5
23545
23546 cat >conftest.$ac_ext <<_ACEOF
23547 /* confdefs.h. */
23548 _ACEOF
23549 cat confdefs.h >>conftest.$ac_ext
23550 cat >>conftest.$ac_ext <<_ACEOF
23551 /* end confdefs.h. */
23552 #include <stddef.h>
23553 int
23554 main ()
23555 {
23556 static int test_array [1 - 2 * !((~(size_t)0 % 10) < 0)];
23557 test_array [0] = 0
23558
23559 ;
23560 return 0;
23561 }
23562 _ACEOF
23563 rm -f conftest.$ac_objext
23564 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23565 (eval $ac_compile) 2>conftest.er1
23566 ac_status=$?
23567 grep -v '^ *+' conftest.er1 >conftest.err
23568 rm -f conftest.er1
23569 cat conftest.err >&5
23570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23571 (exit $ac_status); } &&
23572 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23574 (eval $ac_try) 2>&5
23575 ac_status=$?
23576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23577 (exit $ac_status); }; } &&
23578 { ac_try='test -s conftest.$ac_objext'
23579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23580 (eval $ac_try) 2>&5
23581 ac_status=$?
23582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23583 (exit $ac_status); }; }; then
23584 ac_hi=-1 ac_mid=-1
23585 while :; do
23586 cat >conftest.$ac_ext <<_ACEOF
23587 /* confdefs.h. */
23588 _ACEOF
23589 cat confdefs.h >>conftest.$ac_ext
23590 cat >>conftest.$ac_ext <<_ACEOF
23591 /* end confdefs.h. */
23592 #include <stddef.h>
23593 int
23594 main ()
23595 {
23596 static int test_array [1 - 2 * !((~(size_t)0 % 10) >= $ac_mid)];
23597 test_array [0] = 0
23598
23599 ;
23600 return 0;
23601 }
23602 _ACEOF
23603 rm -f conftest.$ac_objext
23604 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23605 (eval $ac_compile) 2>conftest.er1
23606 ac_status=$?
23607 grep -v '^ *+' conftest.er1 >conftest.err
23608 rm -f conftest.er1
23609 cat conftest.err >&5
23610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23611 (exit $ac_status); } &&
23612 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23614 (eval $ac_try) 2>&5
23615 ac_status=$?
23616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23617 (exit $ac_status); }; } &&
23618 { ac_try='test -s conftest.$ac_objext'
23619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23620 (eval $ac_try) 2>&5
23621 ac_status=$?
23622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23623 (exit $ac_status); }; }; then
23624 ac_lo=$ac_mid; break
23625 else
23626 echo "$as_me: failed program was:" >&5
23627 sed 's/^/| /' conftest.$ac_ext >&5
23628
23629 ac_hi=`expr '(' $ac_mid ')' - 1`
23630 if test $ac_mid -le $ac_hi; then
23631 ac_lo= ac_hi=
23632 break
23633 fi
23634 ac_mid=`expr 2 '*' $ac_mid`
23635 fi
23636 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23637 done
23638 else
23639 echo "$as_me: failed program was:" >&5
23640 sed 's/^/| /' conftest.$ac_ext >&5
23641
23642 ac_lo= ac_hi=
23643 fi
23644 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23645 fi
23646 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23647 # Binary search between lo and hi bounds.
23648 while test "x$ac_lo" != "x$ac_hi"; do
23649 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23650 cat >conftest.$ac_ext <<_ACEOF
23651 /* confdefs.h. */
23652 _ACEOF
23653 cat confdefs.h >>conftest.$ac_ext
23654 cat >>conftest.$ac_ext <<_ACEOF
23655 /* end confdefs.h. */
23656 #include <stddef.h>
23657 int
23658 main ()
23659 {
23660 static int test_array [1 - 2 * !((~(size_t)0 % 10) <= $ac_mid)];
23661 test_array [0] = 0
23662
23663 ;
23664 return 0;
23665 }
23666 _ACEOF
23667 rm -f conftest.$ac_objext
23668 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23669 (eval $ac_compile) 2>conftest.er1
23670 ac_status=$?
23671 grep -v '^ *+' conftest.er1 >conftest.err
23672 rm -f conftest.er1
23673 cat conftest.err >&5
23674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23675 (exit $ac_status); } &&
23676 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23678 (eval $ac_try) 2>&5
23679 ac_status=$?
23680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23681 (exit $ac_status); }; } &&
23682 { ac_try='test -s conftest.$ac_objext'
23683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23684 (eval $ac_try) 2>&5
23685 ac_status=$?
23686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23687 (exit $ac_status); }; }; then
23688 ac_hi=$ac_mid
23689 else
23690 echo "$as_me: failed program was:" >&5
23691 sed 's/^/| /' conftest.$ac_ext >&5
23692
23693 ac_lo=`expr '(' $ac_mid ')' + 1`
23694 fi
23695 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23696 done
23697 case $ac_lo in
23698 ?*) res_lo=$ac_lo;;
23699 '') result=? ;;
23700 esac
23701 else
23702 if test "$cross_compiling" = yes; then
23703 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
23704 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
23705 { (exit 1); exit 1; }; }
23706 else
23707 cat >conftest.$ac_ext <<_ACEOF
23708 /* confdefs.h. */
23709 _ACEOF
23710 cat confdefs.h >>conftest.$ac_ext
23711 cat >>conftest.$ac_ext <<_ACEOF
23712 /* end confdefs.h. */
23713 #include <stddef.h>
23714 long longval () { return ~(size_t)0 % 10; }
23715 unsigned long ulongval () { return ~(size_t)0 % 10; }
23716 #include <stdio.h>
23717 #include <stdlib.h>
23718 int
23719 main ()
23720 {
23721
23722 FILE *f = fopen ("conftest.val", "w");
23723 if (! f)
23724 exit (1);
23725 if ((~(size_t)0 % 10) < 0)
23726 {
23727 long i = longval ();
23728 if (i != (~(size_t)0 % 10))
23729 exit (1);
23730 fprintf (f, "%ld\n", i);
23731 }
23732 else
23733 {
23734 unsigned long i = ulongval ();
23735 if (i != (~(size_t)0 % 10))
23736 exit (1);
23737 fprintf (f, "%lu\n", i);
23738 }
23739 exit (ferror (f) || fclose (f) != 0);
23740
23741 ;
23742 return 0;
23743 }
23744 _ACEOF
23745 rm -f conftest$ac_exeext
23746 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23747 (eval $ac_link) 2>&5
23748 ac_status=$?
23749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23750 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23752 (eval $ac_try) 2>&5
23753 ac_status=$?
23754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23755 (exit $ac_status); }; }; then
23756 res_lo=`cat conftest.val`
23757 else
23758 echo "$as_me: program exited with status $ac_status" >&5
23759 echo "$as_me: failed program was:" >&5
23760 sed 's/^/| /' conftest.$ac_ext >&5
23761
23762 ( exit $ac_status )
23763 result=?
23764 fi
23765 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23766 fi
23767 fi
23768 rm -f conftest.val
23769 if test "$cross_compiling" = yes; then
23770 # Depending upon the size, compute the lo and hi bounds.
23771 cat >conftest.$ac_ext <<_ACEOF
23772 /* confdefs.h. */
23773 _ACEOF
23774 cat confdefs.h >>conftest.$ac_ext
23775 cat >>conftest.$ac_ext <<_ACEOF
23776 /* end confdefs.h. */
23777 #include <stddef.h>
23778 int
23779 main ()
23780 {
23781 static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 0)];
23782 test_array [0] = 0
23783
23784 ;
23785 return 0;
23786 }
23787 _ACEOF
23788 rm -f conftest.$ac_objext
23789 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23790 (eval $ac_compile) 2>conftest.er1
23791 ac_status=$?
23792 grep -v '^ *+' conftest.er1 >conftest.err
23793 rm -f conftest.er1
23794 cat conftest.err >&5
23795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23796 (exit $ac_status); } &&
23797 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23799 (eval $ac_try) 2>&5
23800 ac_status=$?
23801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23802 (exit $ac_status); }; } &&
23803 { ac_try='test -s conftest.$ac_objext'
23804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23805 (eval $ac_try) 2>&5
23806 ac_status=$?
23807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23808 (exit $ac_status); }; }; then
23809 ac_lo=0 ac_mid=0
23810 while :; do
23811 cat >conftest.$ac_ext <<_ACEOF
23812 /* confdefs.h. */
23813 _ACEOF
23814 cat confdefs.h >>conftest.$ac_ext
23815 cat >>conftest.$ac_ext <<_ACEOF
23816 /* end confdefs.h. */
23817 #include <stddef.h>
23818 int
23819 main ()
23820 {
23821 static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)];
23822 test_array [0] = 0
23823
23824 ;
23825 return 0;
23826 }
23827 _ACEOF
23828 rm -f conftest.$ac_objext
23829 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23830 (eval $ac_compile) 2>conftest.er1
23831 ac_status=$?
23832 grep -v '^ *+' conftest.er1 >conftest.err
23833 rm -f conftest.er1
23834 cat conftest.err >&5
23835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23836 (exit $ac_status); } &&
23837 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23839 (eval $ac_try) 2>&5
23840 ac_status=$?
23841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23842 (exit $ac_status); }; } &&
23843 { ac_try='test -s conftest.$ac_objext'
23844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23845 (eval $ac_try) 2>&5
23846 ac_status=$?
23847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23848 (exit $ac_status); }; }; then
23849 ac_hi=$ac_mid; break
23850 else
23851 echo "$as_me: failed program was:" >&5
23852 sed 's/^/| /' conftest.$ac_ext >&5
23853
23854 ac_lo=`expr $ac_mid + 1`
23855 if test $ac_lo -le $ac_mid; then
23856 ac_lo= ac_hi=
23857 break
23858 fi
23859 ac_mid=`expr 2 '*' $ac_mid + 1`
23860 fi
23861 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23862 done
23863 else
23864 echo "$as_me: failed program was:" >&5
23865 sed 's/^/| /' conftest.$ac_ext >&5
23866
23867 cat >conftest.$ac_ext <<_ACEOF
23868 /* confdefs.h. */
23869 _ACEOF
23870 cat confdefs.h >>conftest.$ac_ext
23871 cat >>conftest.$ac_ext <<_ACEOF
23872 /* end confdefs.h. */
23873 #include <stddef.h>
23874 int
23875 main ()
23876 {
23877 static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 0)];
23878 test_array [0] = 0
23879
23880 ;
23881 return 0;
23882 }
23883 _ACEOF
23884 rm -f conftest.$ac_objext
23885 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23886 (eval $ac_compile) 2>conftest.er1
23887 ac_status=$?
23888 grep -v '^ *+' conftest.er1 >conftest.err
23889 rm -f conftest.er1
23890 cat conftest.err >&5
23891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23892 (exit $ac_status); } &&
23893 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23895 (eval $ac_try) 2>&5
23896 ac_status=$?
23897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23898 (exit $ac_status); }; } &&
23899 { ac_try='test -s conftest.$ac_objext'
23900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23901 (eval $ac_try) 2>&5
23902 ac_status=$?
23903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23904 (exit $ac_status); }; }; then
23905 ac_hi=-1 ac_mid=-1
23906 while :; do
23907 cat >conftest.$ac_ext <<_ACEOF
23908 /* confdefs.h. */
23909 _ACEOF
23910 cat confdefs.h >>conftest.$ac_ext
23911 cat >>conftest.$ac_ext <<_ACEOF
23912 /* end confdefs.h. */
23913 #include <stddef.h>
23914 int
23915 main ()
23916 {
23917 static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= $ac_mid)];
23918 test_array [0] = 0
23919
23920 ;
23921 return 0;
23922 }
23923 _ACEOF
23924 rm -f conftest.$ac_objext
23925 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23926 (eval $ac_compile) 2>conftest.er1
23927 ac_status=$?
23928 grep -v '^ *+' conftest.er1 >conftest.err
23929 rm -f conftest.er1
23930 cat conftest.err >&5
23931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23932 (exit $ac_status); } &&
23933 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23935 (eval $ac_try) 2>&5
23936 ac_status=$?
23937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23938 (exit $ac_status); }; } &&
23939 { ac_try='test -s conftest.$ac_objext'
23940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23941 (eval $ac_try) 2>&5
23942 ac_status=$?
23943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23944 (exit $ac_status); }; }; then
23945 ac_lo=$ac_mid; break
23946 else
23947 echo "$as_me: failed program was:" >&5
23948 sed 's/^/| /' conftest.$ac_ext >&5
23949
23950 ac_hi=`expr '(' $ac_mid ')' - 1`
23951 if test $ac_mid -le $ac_hi; then
23952 ac_lo= ac_hi=
23953 break
23954 fi
23955 ac_mid=`expr 2 '*' $ac_mid`
23956 fi
23957 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23958 done
23959 else
23960 echo "$as_me: failed program was:" >&5
23961 sed 's/^/| /' conftest.$ac_ext >&5
23962
23963 ac_lo= ac_hi=
23964 fi
23965 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23966 fi
23967 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
23968 # Binary search between lo and hi bounds.
23969 while test "x$ac_lo" != "x$ac_hi"; do
23970 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23971 cat >conftest.$ac_ext <<_ACEOF
23972 /* confdefs.h. */
23973 _ACEOF
23974 cat confdefs.h >>conftest.$ac_ext
23975 cat >>conftest.$ac_ext <<_ACEOF
23976 /* end confdefs.h. */
23977 #include <stddef.h>
23978 int
23979 main ()
23980 {
23981 static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)];
23982 test_array [0] = 0
23983
23984 ;
23985 return 0;
23986 }
23987 _ACEOF
23988 rm -f conftest.$ac_objext
23989 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
23990 (eval $ac_compile) 2>conftest.er1
23991 ac_status=$?
23992 grep -v '^ *+' conftest.er1 >conftest.err
23993 rm -f conftest.er1
23994 cat conftest.err >&5
23995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23996 (exit $ac_status); } &&
23997 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23999 (eval $ac_try) 2>&5
24000 ac_status=$?
24001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24002 (exit $ac_status); }; } &&
24003 { ac_try='test -s conftest.$ac_objext'
24004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24005 (eval $ac_try) 2>&5
24006 ac_status=$?
24007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24008 (exit $ac_status); }; }; then
24009 ac_hi=$ac_mid
24010 else
24011 echo "$as_me: failed program was:" >&5
24012 sed 's/^/| /' conftest.$ac_ext >&5
24013
24014 ac_lo=`expr '(' $ac_mid ')' + 1`
24015 fi
24016 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24017 done
24018 case $ac_lo in
24019 ?*) fits_in_uint=$ac_lo;;
24020 '') result=? ;;
24021 esac
24022 else
24023 if test "$cross_compiling" = yes; then
24024 { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
24025 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
24026 { (exit 1); exit 1; }; }
24027 else
24028 cat >conftest.$ac_ext <<_ACEOF
24029 /* confdefs.h. */
24030 _ACEOF
24031 cat confdefs.h >>conftest.$ac_ext
24032 cat >>conftest.$ac_ext <<_ACEOF
24033 /* end confdefs.h. */
24034 #include <stddef.h>
24035 long longval () { return sizeof (size_t) <= sizeof (unsigned int); }
24036 unsigned long ulongval () { return sizeof (size_t) <= sizeof (unsigned int); }
24037 #include <stdio.h>
24038 #include <stdlib.h>
24039 int
24040 main ()
24041 {
24042
24043 FILE *f = fopen ("conftest.val", "w");
24044 if (! f)
24045 exit (1);
24046 if ((sizeof (size_t) <= sizeof (unsigned int)) < 0)
24047 {
24048 long i = longval ();
24049 if (i != (sizeof (size_t) <= sizeof (unsigned int)))
24050 exit (1);
24051 fprintf (f, "%ld\n", i);
24052 }
24053 else
24054 {
24055 unsigned long i = ulongval ();
24056 if (i != (sizeof (size_t) <= sizeof (unsigned int)))
24057 exit (1);
24058 fprintf (f, "%lu\n", i);
24059 }
24060 exit (ferror (f) || fclose (f) != 0);
24061
24062 ;
24063 return 0;
24064 }
24065 _ACEOF
24066 rm -f conftest$ac_exeext
24067 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24068 (eval $ac_link) 2>&5
24069 ac_status=$?
24070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24071 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24073 (eval $ac_try) 2>&5
24074 ac_status=$?
24075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24076 (exit $ac_status); }; }; then
24077 fits_in_uint=`cat conftest.val`
24078 else
24079 echo "$as_me: program exited with status $ac_status" >&5
24080 echo "$as_me: failed program was:" >&5
24081 sed 's/^/| /' conftest.$ac_ext >&5
24082
24083 ( exit $ac_status )
24084 result=?
24085 fi
24086 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24087 fi
24088 fi
24089 rm -f conftest.val
24090 if test "$fits_in_uint" = 1; then
24091 cat >conftest.$ac_ext <<_ACEOF
24092 /* confdefs.h. */
24093 _ACEOF
24094 cat confdefs.h >>conftest.$ac_ext
24095 cat >>conftest.$ac_ext <<_ACEOF
24096 /* end confdefs.h. */
24097 #include <stddef.h>
24098 extern size_t foo;
24099 extern unsigned long foo;
24100
24101 int
24102 main ()
24103 {
24104
24105 ;
24106 return 0;
24107 }
24108 _ACEOF
24109 rm -f conftest.$ac_objext
24110 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
24111 (eval $ac_compile) 2>conftest.er1
24112 ac_status=$?
24113 grep -v '^ *+' conftest.er1 >conftest.err
24114 rm -f conftest.er1
24115 cat conftest.err >&5
24116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24117 (exit $ac_status); } &&
24118 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24120 (eval $ac_try) 2>&5
24121 ac_status=$?
24122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24123 (exit $ac_status); }; } &&
24124 { ac_try='test -s conftest.$ac_objext'
24125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24126 (eval $ac_try) 2>&5
24127 ac_status=$?
24128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24129 (exit $ac_status); }; }; then
24130 fits_in_uint=0
24131 else
24132 echo "$as_me: failed program was:" >&5
24133 sed 's/^/| /' conftest.$ac_ext >&5
24134
24135 fi
24136 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24137 fi
24138 if test -z "$result"; then
24139 if test "$fits_in_uint" = 1; then
24140 result="$res_hi$res_lo"U
24141 else
24142 result="$res_hi$res_lo"UL
24143 fi
24144 else
24145 result='~(size_t)0'
24146 fi
24147 fi
24148 echo "$as_me:$LINENO: result: $result" >&5
24149 echo "${ECHO_T}$result" >&6
24150 if test "$result" != yes; then
24151
24152 cat >>confdefs.h <<_ACEOF
24153 #define SIZE_MAX $result
24154 _ACEOF
24155
24156 fi
24157
24158
24159
24160
24161
24162 for ac_header in stdint.h
24163 do
24164 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24165 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24166 echo "$as_me:$LINENO: checking for $ac_header" >&5
24167 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24168 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24169 echo $ECHO_N "(cached) $ECHO_C" >&6
24170 fi
24171 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
24172 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24173 else
24174 # Is the header compilable?
24175 echo "$as_me:$LINENO: checking $ac_header usability" >&5
24176 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
24177 cat >conftest.$ac_ext <<_ACEOF
24178 /* confdefs.h. */
24179 _ACEOF
24180 cat confdefs.h >>conftest.$ac_ext
24181 cat >>conftest.$ac_ext <<_ACEOF
24182 /* end confdefs.h. */
24183 $ac_includes_default
24184 #include <$ac_header>
24185 _ACEOF
24186 rm -f conftest.$ac_objext
24187 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
24188 (eval $ac_compile) 2>conftest.er1
24189 ac_status=$?
24190 grep -v '^ *+' conftest.er1 >conftest.err
24191 rm -f conftest.er1
24192 cat conftest.err >&5
24193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24194 (exit $ac_status); } &&
24195 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24197 (eval $ac_try) 2>&5
24198 ac_status=$?
24199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24200 (exit $ac_status); }; } &&
24201 { ac_try='test -s conftest.$ac_objext'
24202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24203 (eval $ac_try) 2>&5
24204 ac_status=$?
24205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24206 (exit $ac_status); }; }; then
24207 ac_header_compiler=yes
24208 else
24209 echo "$as_me: failed program was:" >&5
24210 sed 's/^/| /' conftest.$ac_ext >&5
24211
24212 ac_header_compiler=no
24213 fi
24214 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24215 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24216 echo "${ECHO_T}$ac_header_compiler" >&6
24217
24218 # Is the header present?
24219 echo "$as_me:$LINENO: checking $ac_header presence" >&5
24220 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
24221 cat >conftest.$ac_ext <<_ACEOF
24222 /* confdefs.h. */
24223 _ACEOF
24224 cat confdefs.h >>conftest.$ac_ext
24225 cat >>conftest.$ac_ext <<_ACEOF
24226 /* end confdefs.h. */
24227 #include <$ac_header>
24228 _ACEOF
24229 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
24230 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24231 ac_status=$?
24232 grep -v '^ *+' conftest.er1 >conftest.err
24233 rm -f conftest.er1
24234 cat conftest.err >&5
24235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24236 (exit $ac_status); } >/dev/null; then
24237 if test -s conftest.err; then
24238 ac_cpp_err=$ac_c_preproc_warn_flag
24239 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
24240 else
24241 ac_cpp_err=
24242 fi
24243 else
24244 ac_cpp_err=yes
24245 fi
24246 if test -z "$ac_cpp_err"; then
24247 ac_header_preproc=yes
24248 else
24249 echo "$as_me: failed program was:" >&5
24250 sed 's/^/| /' conftest.$ac_ext >&5
24251
24252 ac_header_preproc=no
24253 fi
24254 rm -f conftest.err conftest.$ac_ext
24255 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24256 echo "${ECHO_T}$ac_header_preproc" >&6
24257
24258 # So? What about this header?
24259 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24260 yes:no: )
24261 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
24262 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
24263 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
24264 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
24265 ac_header_preproc=yes
24266 ;;
24267 no:yes:* )
24268 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
24269 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
24270 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
24271 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
24272 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
24273 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
24274 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
24275 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
24276 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
24277 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
24278 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
24279 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
24280 (
24281 cat <<\_ASBOX
24282 ## ------------------------------------------ ##
24283 ## Report this to the AC_PACKAGE_NAME lists. ##
24284 ## ------------------------------------------ ##
24285 _ASBOX
24286 ) |
24287 sed "s/^/$as_me: WARNING: /" >&2
24288 ;;
24289 esac
24290 echo "$as_me:$LINENO: checking for $ac_header" >&5
24291 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24292 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24293 echo $ECHO_N "(cached) $ECHO_C" >&6
24294 else
24295 eval "$as_ac_Header=\$ac_header_preproc"
24296 fi
24297 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
24298 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24299
24300 fi
24301 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24302 cat >>confdefs.h <<_ACEOF
24303 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24304 _ACEOF
24305
24306 fi
24307
24308 done
24309
24310
24311
24312 echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5
24313 echo $ECHO_N "checking for CFPreferencesCopyAppValue... $ECHO_C" >&6
24314 if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then
24315 echo $ECHO_N "(cached) $ECHO_C" >&6
24316 else
24317 gt_save_CPPFLAGS="$CPPFLAGS"
24318 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
24319 gt_save_LIBS="$LIBS"
24320 LIBS="$LIBS -framework CoreFoundation"
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 <CFPreferences.h>
24328 int
24329 main ()
24330 {
24331 CFPreferencesCopyAppValue(NULL, NULL)
24332 ;
24333 return 0;
24334 }
24335 _ACEOF
24336 rm -f conftest.$ac_objext conftest$ac_exeext
24337 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24338 (eval $ac_link) 2>conftest.er1
24339 ac_status=$?
24340 grep -v '^ *+' conftest.er1 >conftest.err
24341 rm -f conftest.er1
24342 cat conftest.err >&5
24343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24344 (exit $ac_status); } &&
24345 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24347 (eval $ac_try) 2>&5
24348 ac_status=$?
24349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24350 (exit $ac_status); }; } &&
24351 { ac_try='test -s conftest$ac_exeext'
24352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24353 (eval $ac_try) 2>&5
24354 ac_status=$?
24355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24356 (exit $ac_status); }; }; then
24357 gt_cv_func_CFPreferencesCopyAppValue=yes
24358 else
24359 echo "$as_me: failed program was:" >&5
24360 sed 's/^/| /' conftest.$ac_ext >&5
24361
24362 gt_cv_func_CFPreferencesCopyAppValue=no
24363 fi
24364 rm -f conftest.err conftest.$ac_objext \
24365 conftest$ac_exeext conftest.$ac_ext
24366 CPPFLAGS="$gt_save_CPPFLAGS"
24367 LIBS="$gt_save_LIBS"
24368 fi
24369 echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
24370 echo "${ECHO_T}$gt_cv_func_CFPreferencesCopyAppValue" >&6
24371 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
24372
24373 cat >>confdefs.h <<\_ACEOF
24374 #define HAVE_CFPREFERENCESCOPYAPPVALUE 1
24375 _ACEOF
24376
24377 fi
24378 echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5
24379 echo $ECHO_N "checking for CFLocaleCopyCurrent... $ECHO_C" >&6
24380 if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then
24381 echo $ECHO_N "(cached) $ECHO_C" >&6
24382 else
24383 gt_save_CPPFLAGS="$CPPFLAGS"
24384 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
24385 gt_save_LIBS="$LIBS"
24386 LIBS="$LIBS -framework CoreFoundation"
24387 cat >conftest.$ac_ext <<_ACEOF
24388 /* confdefs.h. */
24389 _ACEOF
24390 cat confdefs.h >>conftest.$ac_ext
24391 cat >>conftest.$ac_ext <<_ACEOF
24392 /* end confdefs.h. */
24393 #include <CFLocale.h>
24394 int
24395 main ()
24396 {
24397 CFLocaleCopyCurrent();
24398 ;
24399 return 0;
24400 }
24401 _ACEOF
24402 rm -f conftest.$ac_objext conftest$ac_exeext
24403 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24404 (eval $ac_link) 2>conftest.er1
24405 ac_status=$?
24406 grep -v '^ *+' conftest.er1 >conftest.err
24407 rm -f conftest.er1
24408 cat conftest.err >&5
24409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24410 (exit $ac_status); } &&
24411 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24413 (eval $ac_try) 2>&5
24414 ac_status=$?
24415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24416 (exit $ac_status); }; } &&
24417 { ac_try='test -s conftest$ac_exeext'
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); }; }; then
24423 gt_cv_func_CFLocaleCopyCurrent=yes
24424 else
24425 echo "$as_me: failed program was:" >&5
24426 sed 's/^/| /' conftest.$ac_ext >&5
24427
24428 gt_cv_func_CFLocaleCopyCurrent=no
24429 fi
24430 rm -f conftest.err conftest.$ac_objext \
24431 conftest$ac_exeext conftest.$ac_ext
24432 CPPFLAGS="$gt_save_CPPFLAGS"
24433 LIBS="$gt_save_LIBS"
24434 fi
24435 echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
24436 echo "${ECHO_T}$gt_cv_func_CFLocaleCopyCurrent" >&6
24437 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
24438
24439 cat >>confdefs.h <<\_ACEOF
24440 #define HAVE_CFLOCALECOPYCURRENT 1
24441 _ACEOF
24442
24443 fi
24444 INTL_MACOSX_LIBS=
24445 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
24446 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
24447 fi
24448
24449
24450
24451 if test "X$prefix" = "XNONE"; then
24452 acl_final_prefix="$ac_default_prefix"
24453 else
24454 acl_final_prefix="$prefix"
24455 fi
24456 if test "X$exec_prefix" = "XNONE"; then
24457 acl_final_exec_prefix='${prefix}'
24458 else
24459 acl_final_exec_prefix="$exec_prefix"
24460 fi
24461 acl_save_prefix="$prefix"
24462 prefix="$acl_final_prefix"
24463 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
24464 prefix="$acl_save_prefix"
24465
24466
24467 # Check whether --with-gnu-ld or --without-gnu-ld was given.
24468 if test "${with_gnu_ld+set}" = set; then
24469 withval="$with_gnu_ld"
24470 test "$withval" = no || with_gnu_ld=yes
24471 else
24472 with_gnu_ld=no
24473 fi;
24474 # Prepare PATH_SEPARATOR.
24475 # The user is always right.
24476 if test "${PATH_SEPARATOR+set}" != set; then
24477 echo "#! /bin/sh" >conf$$.sh
24478 echo "exit 0" >>conf$$.sh
24479 chmod +x conf$$.sh
24480 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24481 PATH_SEPARATOR=';'
24482 else
24483 PATH_SEPARATOR=:
24484 fi
24485 rm -f conf$$.sh
24486 fi
24487 ac_prog=ld
24488 if test "$GCC" = yes; then
24489 # Check if gcc -print-prog-name=ld gives a path.
24490 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
24491 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
24492 case $host in
24493 *-*-mingw*)
24494 # gcc leaves a trailing carriage return which upsets mingw
24495 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
24496 *)
24497 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
24498 esac
24499 case $ac_prog in
24500 # Accept absolute paths.
24501 [\\/]* | [A-Za-z]:[\\/]*)
24502 re_direlt='/[^/][^/]*/\.\./'
24503 # Canonicalize the path of ld
24504 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
24505 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
24506 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
24507 done
24508 test -z "$LD" && LD="$ac_prog"
24509 ;;
24510 "")
24511 # If it fails, then pretend we aren't using GCC.
24512 ac_prog=ld
24513 ;;
24514 *)
24515 # If it is relative, then search for the first ld in PATH.
24516 with_gnu_ld=unknown
24517 ;;
24518 esac
24519 elif test "$with_gnu_ld" = yes; then
24520 echo "$as_me:$LINENO: checking for GNU ld" >&5
24521 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
24522 else
24523 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
24524 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
24525 fi
24526 if test "${acl_cv_path_LD+set}" = set; then
24527 echo $ECHO_N "(cached) $ECHO_C" >&6
24528 else
24529 if test -z "$LD"; then
24530 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
24531 for ac_dir in $PATH; do
24532 test -z "$ac_dir" && ac_dir=.
24533 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
24534 acl_cv_path_LD="$ac_dir/$ac_prog"
24535 # Check to see if the program is GNU ld. I'd rather use --version,
24536 # but apparently some GNU ld's only accept -v.
24537 # Break only if it was the GNU/non-GNU ld that we prefer.
24538 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
24539 *GNU* | *'with BFD'*)
24540 test "$with_gnu_ld" != no && break ;;
24541 *)
24542 test "$with_gnu_ld" != yes && break ;;
24543 esac
24544 fi
24545 done
24546 IFS="$ac_save_ifs"
24547 else
24548 acl_cv_path_LD="$LD" # Let the user override the test with a path.
24549 fi
24550 fi
24551
24552 LD="$acl_cv_path_LD"
24553 if test -n "$LD"; then
24554 echo "$as_me:$LINENO: result: $LD" >&5
24555 echo "${ECHO_T}$LD" >&6
24556 else
24557 echo "$as_me:$LINENO: result: no" >&5
24558 echo "${ECHO_T}no" >&6
24559 fi
24560 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
24561 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
24562 { (exit 1); exit 1; }; }
24563 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
24564 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
24565 if test "${acl_cv_prog_gnu_ld+set}" = set; then
24566 echo $ECHO_N "(cached) $ECHO_C" >&6
24567 else
24568 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
24569 case `$LD -v 2>&1 </dev/null` in
24570 *GNU* | *'with BFD'*)
24571 acl_cv_prog_gnu_ld=yes ;;
24572 *)
24573 acl_cv_prog_gnu_ld=no ;;
24574 esac
24575 fi
24576 echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
24577 echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
24578 with_gnu_ld=$acl_cv_prog_gnu_ld
24579
24580
24581
24582
24583 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
24584 echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
24585 if test "${acl_cv_rpath+set}" = set; then
24586 echo $ECHO_N "(cached) $ECHO_C" >&6
24587 else
24588
24589 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
24590 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
24591 . ./conftest.sh
24592 rm -f ./conftest.sh
24593 acl_cv_rpath=done
24594
24595 fi
24596 echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
24597 echo "${ECHO_T}$acl_cv_rpath" >&6
24598 wl="$acl_cv_wl"
24599 libext="$acl_cv_libext"
24600 shlibext="$acl_cv_shlibext"
24601 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
24602 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
24603 hardcode_direct="$acl_cv_hardcode_direct"
24604 hardcode_minus_L="$acl_cv_hardcode_minus_L"
24605 # Check whether --enable-rpath or --disable-rpath was given.
24606 if test "${enable_rpath+set}" = set; then
24607 enableval="$enable_rpath"
24608 :
24609 else
24610 enable_rpath=yes
24611 fi;
24612
24613
24614
24615
24616
24617
24618
24619 use_additional=yes
24620
24621 acl_save_prefix="$prefix"
24622 prefix="$acl_final_prefix"
24623 acl_save_exec_prefix="$exec_prefix"
24624 exec_prefix="$acl_final_exec_prefix"
24625
24626 eval additional_includedir=\"$includedir\"
24627 eval additional_libdir=\"$libdir\"
24628
24629 exec_prefix="$acl_save_exec_prefix"
24630 prefix="$acl_save_prefix"
24631
24632
24633 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
24634 if test "${with_libiconv_prefix+set}" = set; then
24635 withval="$with_libiconv_prefix"
24636
24637 if test "X$withval" = "Xno"; then
24638 use_additional=no
24639 else
24640 if test "X$withval" = "X"; then
24641
24642 acl_save_prefix="$prefix"
24643 prefix="$acl_final_prefix"
24644 acl_save_exec_prefix="$exec_prefix"
24645 exec_prefix="$acl_final_exec_prefix"
24646
24647 eval additional_includedir=\"$includedir\"
24648 eval additional_libdir=\"$libdir\"
24649
24650 exec_prefix="$acl_save_exec_prefix"
24651 prefix="$acl_save_prefix"
24652
24653 else
24654 additional_includedir="$withval/include"
24655 additional_libdir="$withval/lib"
24656 fi
24657 fi
24658
24659 fi;
24660 LIBICONV=
24661 LTLIBICONV=
24662 INCICONV=
24663 rpathdirs=
24664 ltrpathdirs=
24665 names_already_handled=
24666 names_next_round='iconv '
24667 while test -n "$names_next_round"; do
24668 names_this_round="$names_next_round"
24669 names_next_round=
24670 for name in $names_this_round; do
24671 already_handled=
24672 for n in $names_already_handled; do
24673 if test "$n" = "$name"; then
24674 already_handled=yes
24675 break
24676 fi
24677 done
24678 if test -z "$already_handled"; then
24679 names_already_handled="$names_already_handled $name"
24680 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
24681 eval value=\"\$HAVE_LIB$uppername\"
24682 if test -n "$value"; then
24683 if test "$value" = yes; then
24684 eval value=\"\$LIB$uppername\"
24685 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
24686 eval value=\"\$LTLIB$uppername\"
24687 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
24688 else
24689 :
24690 fi
24691 else
24692 found_dir=
24693 found_la=
24694 found_so=
24695 found_a=
24696 if test $use_additional = yes; then
24697 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
24698 found_dir="$additional_libdir"
24699 found_so="$additional_libdir/lib$name.$shlibext"
24700 if test -f "$additional_libdir/lib$name.la"; then
24701 found_la="$additional_libdir/lib$name.la"
24702 fi
24703 else
24704 if test -f "$additional_libdir/lib$name.$libext"; then
24705 found_dir="$additional_libdir"
24706 found_a="$additional_libdir/lib$name.$libext"
24707 if test -f "$additional_libdir/lib$name.la"; then
24708 found_la="$additional_libdir/lib$name.la"
24709 fi
24710 fi
24711 fi
24712 fi
24713 if test "X$found_dir" = "X"; then
24714 for x in $LDFLAGS $LTLIBICONV; do
24715
24716 acl_save_prefix="$prefix"
24717 prefix="$acl_final_prefix"
24718 acl_save_exec_prefix="$exec_prefix"
24719 exec_prefix="$acl_final_exec_prefix"
24720 eval x=\"$x\"
24721 exec_prefix="$acl_save_exec_prefix"
24722 prefix="$acl_save_prefix"
24723
24724 case "$x" in
24725 -L*)
24726 dir=`echo "X$x" | sed -e 's/^X-L//'`
24727 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
24728 found_dir="$dir"
24729 found_so="$dir/lib$name.$shlibext"
24730 if test -f "$dir/lib$name.la"; then
24731 found_la="$dir/lib$name.la"
24732 fi
24733 else
24734 if test -f "$dir/lib$name.$libext"; then
24735 found_dir="$dir"
24736 found_a="$dir/lib$name.$libext"
24737 if test -f "$dir/lib$name.la"; then
24738 found_la="$dir/lib$name.la"
24739 fi
24740 fi
24741 fi
24742 ;;
24743 esac
24744 if test "X$found_dir" != "X"; then
24745 break
24746 fi
24747 done
24748 fi
24749 if test "X$found_dir" != "X"; then
24750 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
24751 if test "X$found_so" != "X"; then
24752 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
24753 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
24754 else
24755 haveit=
24756 for x in $ltrpathdirs; do
24757 if test "X$x" = "X$found_dir"; then
24758 haveit=yes
24759 break
24760 fi
24761 done
24762 if test -z "$haveit"; then
24763 ltrpathdirs="$ltrpathdirs $found_dir"
24764 fi
24765 if test "$hardcode_direct" = yes; then
24766 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
24767 else
24768 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
24769 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
24770 haveit=
24771 for x in $rpathdirs; do
24772 if test "X$x" = "X$found_dir"; then
24773 haveit=yes
24774 break
24775 fi
24776 done
24777 if test -z "$haveit"; then
24778 rpathdirs="$rpathdirs $found_dir"
24779 fi
24780 else
24781 haveit=
24782 for x in $LDFLAGS $LIBICONV; do
24783
24784 acl_save_prefix="$prefix"
24785 prefix="$acl_final_prefix"
24786 acl_save_exec_prefix="$exec_prefix"
24787 exec_prefix="$acl_final_exec_prefix"
24788 eval x=\"$x\"
24789 exec_prefix="$acl_save_exec_prefix"
24790 prefix="$acl_save_prefix"
24791
24792 if test "X$x" = "X-L$found_dir"; then
24793 haveit=yes
24794 break
24795 fi
24796 done
24797 if test -z "$haveit"; then
24798 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
24799 fi
24800 if test "$hardcode_minus_L" != no; then
24801 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
24802 else
24803 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
24804 fi
24805 fi
24806 fi
24807 fi
24808 else
24809 if test "X$found_a" != "X"; then
24810 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
24811 else
24812 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
24813 fi
24814 fi
24815 additional_includedir=
24816 case "$found_dir" in
24817 */lib | */lib/)
24818 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
24819 additional_includedir="$basedir/include"
24820 ;;
24821 esac
24822 if test "X$additional_includedir" != "X"; then
24823 if test "X$additional_includedir" != "X/usr/include"; then
24824 haveit=
24825 if test "X$additional_includedir" = "X/usr/local/include"; then
24826 if test -n "$GCC"; then
24827 case $host_os in
24828 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
24829 esac
24830 fi
24831 fi
24832 if test -z "$haveit"; then
24833 for x in $CPPFLAGS $INCICONV; do
24834
24835 acl_save_prefix="$prefix"
24836 prefix="$acl_final_prefix"
24837 acl_save_exec_prefix="$exec_prefix"
24838 exec_prefix="$acl_final_exec_prefix"
24839 eval x=\"$x\"
24840 exec_prefix="$acl_save_exec_prefix"
24841 prefix="$acl_save_prefix"
24842
24843 if test "X$x" = "X-I$additional_includedir"; then
24844 haveit=yes
24845 break
24846 fi
24847 done
24848 if test -z "$haveit"; then
24849 if test -d "$additional_includedir"; then
24850 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
24851 fi
24852 fi
24853 fi
24854 fi
24855 fi
24856 if test -n "$found_la"; then
24857 save_libdir="$libdir"
24858 case "$found_la" in
24859 */* | *\\*) . "$found_la" ;;
24860 *) . "./$found_la" ;;
24861 esac
24862 libdir="$save_libdir"
24863 for dep in $dependency_libs; do
24864 case "$dep" in
24865 -L*)
24866 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
24867 if test "X$additional_libdir" != "X/usr/lib"; then
24868 haveit=
24869 if test "X$additional_libdir" = "X/usr/local/lib"; then
24870 if test -n "$GCC"; then
24871 case $host_os in
24872 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
24873 esac
24874 fi
24875 fi
24876 if test -z "$haveit"; then
24877 haveit=
24878 for x in $LDFLAGS $LIBICONV; do
24879
24880 acl_save_prefix="$prefix"
24881 prefix="$acl_final_prefix"
24882 acl_save_exec_prefix="$exec_prefix"
24883 exec_prefix="$acl_final_exec_prefix"
24884 eval x=\"$x\"
24885 exec_prefix="$acl_save_exec_prefix"
24886 prefix="$acl_save_prefix"
24887
24888 if test "X$x" = "X-L$additional_libdir"; then
24889 haveit=yes
24890 break
24891 fi
24892 done
24893 if test -z "$haveit"; then
24894 if test -d "$additional_libdir"; then
24895 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
24896 fi
24897 fi
24898 haveit=
24899 for x in $LDFLAGS $LTLIBICONV; do
24900
24901 acl_save_prefix="$prefix"
24902 prefix="$acl_final_prefix"
24903 acl_save_exec_prefix="$exec_prefix"
24904 exec_prefix="$acl_final_exec_prefix"
24905 eval x=\"$x\"
24906 exec_prefix="$acl_save_exec_prefix"
24907 prefix="$acl_save_prefix"
24908
24909 if test "X$x" = "X-L$additional_libdir"; then
24910 haveit=yes
24911 break
24912 fi
24913 done
24914 if test -z "$haveit"; then
24915 if test -d "$additional_libdir"; then
24916 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
24917 fi
24918 fi
24919 fi
24920 fi
24921 ;;
24922 -R*)
24923 dir=`echo "X$dep" | sed -e 's/^X-R//'`
24924 if test "$enable_rpath" != no; then
24925 haveit=
24926 for x in $rpathdirs; do
24927 if test "X$x" = "X$dir"; then
24928 haveit=yes
24929 break
24930 fi
24931 done
24932 if test -z "$haveit"; then
24933 rpathdirs="$rpathdirs $dir"
24934 fi
24935 haveit=
24936 for x in $ltrpathdirs; do
24937 if test "X$x" = "X$dir"; then
24938 haveit=yes
24939 break
24940 fi
24941 done
24942 if test -z "$haveit"; then
24943 ltrpathdirs="$ltrpathdirs $dir"
24944 fi
24945 fi
24946 ;;
24947 -l*)
24948 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
24949 ;;
24950 *.la)
24951 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
24952 ;;
24953 *)
24954 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
24955 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
24956 ;;
24957 esac
24958 done
24959 fi
24960 else
24961 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
24962 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
24963 fi
24964 fi
24965 fi
24966 done
24967 done
24968 if test "X$rpathdirs" != "X"; then
24969 if test -n "$hardcode_libdir_separator"; then
24970 alldirs=
24971 for found_dir in $rpathdirs; do
24972 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
24973 done
24974 acl_save_libdir="$libdir"
24975 libdir="$alldirs"
24976 eval flag=\"$hardcode_libdir_flag_spec\"
24977 libdir="$acl_save_libdir"
24978 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
24979 else
24980 for found_dir in $rpathdirs; do
24981 acl_save_libdir="$libdir"
24982 libdir="$found_dir"
24983 eval flag=\"$hardcode_libdir_flag_spec\"
24984 libdir="$acl_save_libdir"
24985 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
24986 done
24987 fi
24988 fi
24989 if test "X$ltrpathdirs" != "X"; then
24990 for found_dir in $ltrpathdirs; do
24991 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
24992 done
24993 fi
24994
24995
24996
24997
24998
24999
25000
25001
25002 echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
25003 echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
25004 if test "${ac_cv_type_ptrdiff_t+set}" = set; then
25005 echo $ECHO_N "(cached) $ECHO_C" >&6
25006 else
25007 cat >conftest.$ac_ext <<_ACEOF
25008 /* confdefs.h. */
25009 _ACEOF
25010 cat confdefs.h >>conftest.$ac_ext
25011 cat >>conftest.$ac_ext <<_ACEOF
25012 /* end confdefs.h. */
25013 $ac_includes_default
25014 int
25015 main ()
25016 {
25017 if ((ptrdiff_t *) 0)
25018 return 0;
25019 if (sizeof (ptrdiff_t))
25020 return 0;
25021 ;
25022 return 0;
25023 }
25024 _ACEOF
25025 rm -f conftest.$ac_objext
25026 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25027 (eval $ac_compile) 2>conftest.er1
25028 ac_status=$?
25029 grep -v '^ *+' conftest.er1 >conftest.err
25030 rm -f conftest.er1
25031 cat conftest.err >&5
25032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25033 (exit $ac_status); } &&
25034 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25036 (eval $ac_try) 2>&5
25037 ac_status=$?
25038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25039 (exit $ac_status); }; } &&
25040 { ac_try='test -s conftest.$ac_objext'
25041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25042 (eval $ac_try) 2>&5
25043 ac_status=$?
25044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25045 (exit $ac_status); }; }; then
25046 ac_cv_type_ptrdiff_t=yes
25047 else
25048 echo "$as_me: failed program was:" >&5
25049 sed 's/^/| /' conftest.$ac_ext >&5
25050
25051 ac_cv_type_ptrdiff_t=no
25052 fi
25053 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25054 fi
25055 echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
25056 echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
25057 if test $ac_cv_type_ptrdiff_t = yes; then
25058 :
25059 else
25060
25061 cat >>confdefs.h <<\_ACEOF
25062 #define ptrdiff_t long
25063 _ACEOF
25064
25065
25066 fi
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
25079 stdlib.h string.h unistd.h sys/param.h
25080 do
25081 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25082 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25083 echo "$as_me:$LINENO: checking for $ac_header" >&5
25084 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25085 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25086 echo $ECHO_N "(cached) $ECHO_C" >&6
25087 fi
25088 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25089 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25090 else
25091 # Is the header compilable?
25092 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25093 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25094 cat >conftest.$ac_ext <<_ACEOF
25095 /* confdefs.h. */
25096 _ACEOF
25097 cat confdefs.h >>conftest.$ac_ext
25098 cat >>conftest.$ac_ext <<_ACEOF
25099 /* end confdefs.h. */
25100 $ac_includes_default
25101 #include <$ac_header>
25102 _ACEOF
25103 rm -f conftest.$ac_objext
25104 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25105 (eval $ac_compile) 2>conftest.er1
25106 ac_status=$?
25107 grep -v '^ *+' conftest.er1 >conftest.err
25108 rm -f conftest.er1
25109 cat conftest.err >&5
25110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25111 (exit $ac_status); } &&
25112 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25114 (eval $ac_try) 2>&5
25115 ac_status=$?
25116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25117 (exit $ac_status); }; } &&
25118 { ac_try='test -s conftest.$ac_objext'
25119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25120 (eval $ac_try) 2>&5
25121 ac_status=$?
25122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25123 (exit $ac_status); }; }; then
25124 ac_header_compiler=yes
25125 else
25126 echo "$as_me: failed program was:" >&5
25127 sed 's/^/| /' conftest.$ac_ext >&5
25128
25129 ac_header_compiler=no
25130 fi
25131 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25132 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25133 echo "${ECHO_T}$ac_header_compiler" >&6
25134
25135 # Is the header present?
25136 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25137 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25138 cat >conftest.$ac_ext <<_ACEOF
25139 /* confdefs.h. */
25140 _ACEOF
25141 cat confdefs.h >>conftest.$ac_ext
25142 cat >>conftest.$ac_ext <<_ACEOF
25143 /* end confdefs.h. */
25144 #include <$ac_header>
25145 _ACEOF
25146 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25147 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25148 ac_status=$?
25149 grep -v '^ *+' conftest.er1 >conftest.err
25150 rm -f conftest.er1
25151 cat conftest.err >&5
25152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25153 (exit $ac_status); } >/dev/null; then
25154 if test -s conftest.err; then
25155 ac_cpp_err=$ac_c_preproc_warn_flag
25156 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25157 else
25158 ac_cpp_err=
25159 fi
25160 else
25161 ac_cpp_err=yes
25162 fi
25163 if test -z "$ac_cpp_err"; then
25164 ac_header_preproc=yes
25165 else
25166 echo "$as_me: failed program was:" >&5
25167 sed 's/^/| /' conftest.$ac_ext >&5
25168
25169 ac_header_preproc=no
25170 fi
25171 rm -f conftest.err conftest.$ac_ext
25172 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25173 echo "${ECHO_T}$ac_header_preproc" >&6
25174
25175 # So? What about this header?
25176 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25177 yes:no: )
25178 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25179 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25180 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25181 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25182 ac_header_preproc=yes
25183 ;;
25184 no:yes:* )
25185 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25186 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25187 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
25188 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
25189 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25190 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25191 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
25192 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
25193 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25194 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25195 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25196 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25197 (
25198 cat <<\_ASBOX
25199 ## ------------------------------------------ ##
25200 ## Report this to the AC_PACKAGE_NAME lists. ##
25201 ## ------------------------------------------ ##
25202 _ASBOX
25203 ) |
25204 sed "s/^/$as_me: WARNING: /" >&2
25205 ;;
25206 esac
25207 echo "$as_me:$LINENO: checking for $ac_header" >&5
25208 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25209 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25210 echo $ECHO_N "(cached) $ECHO_C" >&6
25211 else
25212 eval "$as_ac_Header=\$ac_header_preproc"
25213 fi
25214 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25215 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25216
25217 fi
25218 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25219 cat >>confdefs.h <<_ACEOF
25220 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25221 _ACEOF
25222
25223 fi
25224
25225 done
25226
25227
25228
25229
25230
25231
25232
25233
25234
25235
25236
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249
25250 for ac_func in asprintf fwprintf getcwd getegid geteuid getgid getuid \
25251 mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
25252 strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
25253 __fsetlocking
25254 do
25255 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
25256 echo "$as_me:$LINENO: checking for $ac_func" >&5
25257 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
25258 if eval "test \"\${$as_ac_var+set}\" = set"; then
25259 echo $ECHO_N "(cached) $ECHO_C" >&6
25260 else
25261 cat >conftest.$ac_ext <<_ACEOF
25262 /* confdefs.h. */
25263 _ACEOF
25264 cat confdefs.h >>conftest.$ac_ext
25265 cat >>conftest.$ac_ext <<_ACEOF
25266 /* end confdefs.h. */
25267 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
25268 For example, HP-UX 11i <limits.h> declares gettimeofday. */
25269 #define $ac_func innocuous_$ac_func
25270
25271 /* System header to define __stub macros and hopefully few prototypes,
25272 which can conflict with char $ac_func (); below.
25273 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25274 <limits.h> exists even on freestanding compilers. */
25275
25276 #ifdef __STDC__
25277 # include <limits.h>
25278 #else
25279 # include <assert.h>
25280 #endif
25281
25282 #undef $ac_func
25283
25284 /* Override any gcc2 internal prototype to avoid an error. */
25285 #ifdef __cplusplus
25286 extern "C"
25287 {
25288 #endif
25289 /* We use char because int might match the return type of a gcc2
25290 builtin and then its argument prototype would still apply. */
25291 char $ac_func ();
25292 /* The GNU C library defines this for functions which it implements
25293 to always fail with ENOSYS. Some functions are actually named
25294 something starting with __ and the normal name is an alias. */
25295 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
25296 choke me
25297 #else
25298 char (*f) () = $ac_func;
25299 #endif
25300 #ifdef __cplusplus
25301 }
25302 #endif
25303
25304 int
25305 main ()
25306 {
25307 return f != $ac_func;
25308 ;
25309 return 0;
25310 }
25311 _ACEOF
25312 rm -f conftest.$ac_objext conftest$ac_exeext
25313 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25314 (eval $ac_link) 2>conftest.er1
25315 ac_status=$?
25316 grep -v '^ *+' conftest.er1 >conftest.err
25317 rm -f conftest.er1
25318 cat conftest.err >&5
25319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25320 (exit $ac_status); } &&
25321 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25323 (eval $ac_try) 2>&5
25324 ac_status=$?
25325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25326 (exit $ac_status); }; } &&
25327 { ac_try='test -s conftest$ac_exeext'
25328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25329 (eval $ac_try) 2>&5
25330 ac_status=$?
25331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25332 (exit $ac_status); }; }; then
25333 eval "$as_ac_var=yes"
25334 else
25335 echo "$as_me: failed program was:" >&5
25336 sed 's/^/| /' conftest.$ac_ext >&5
25337
25338 eval "$as_ac_var=no"
25339 fi
25340 rm -f conftest.err conftest.$ac_objext \
25341 conftest$ac_exeext conftest.$ac_ext
25342 fi
25343 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
25344 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
25345 if test `eval echo '${'$as_ac_var'}'` = yes; then
25346 cat >>confdefs.h <<_ACEOF
25347 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
25348 _ACEOF
25349
25350 fi
25351 done
25352
25353
25354
25355 echo "$as_me:$LINENO: checking whether _snprintf is declared" >&5
25356 echo $ECHO_N "checking whether _snprintf is declared... $ECHO_C" >&6
25357 if test "${ac_cv_have_decl__snprintf+set}" = set; then
25358 echo $ECHO_N "(cached) $ECHO_C" >&6
25359 else
25360 cat >conftest.$ac_ext <<_ACEOF
25361 /* confdefs.h. */
25362 _ACEOF
25363 cat confdefs.h >>conftest.$ac_ext
25364 cat >>conftest.$ac_ext <<_ACEOF
25365 /* end confdefs.h. */
25366 #include <stdio.h>
25367 int
25368 main ()
25369 {
25370
25371 #ifndef _snprintf
25372 char *p = (char *) _snprintf;
25373 #endif
25374
25375 ;
25376 return 0;
25377 }
25378 _ACEOF
25379 rm -f conftest.$ac_objext
25380 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25381 (eval $ac_compile) 2>conftest.er1
25382 ac_status=$?
25383 grep -v '^ *+' conftest.er1 >conftest.err
25384 rm -f conftest.er1
25385 cat conftest.err >&5
25386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25387 (exit $ac_status); } &&
25388 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25390 (eval $ac_try) 2>&5
25391 ac_status=$?
25392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25393 (exit $ac_status); }; } &&
25394 { ac_try='test -s conftest.$ac_objext'
25395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25396 (eval $ac_try) 2>&5
25397 ac_status=$?
25398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25399 (exit $ac_status); }; }; then
25400 ac_cv_have_decl__snprintf=yes
25401 else
25402 echo "$as_me: failed program was:" >&5
25403 sed 's/^/| /' conftest.$ac_ext >&5
25404
25405 ac_cv_have_decl__snprintf=no
25406 fi
25407 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25408 fi
25409 echo "$as_me:$LINENO: result: $ac_cv_have_decl__snprintf" >&5
25410 echo "${ECHO_T}$ac_cv_have_decl__snprintf" >&6
25411 if test $ac_cv_have_decl__snprintf = yes; then
25412 gt_value=1
25413 else
25414 gt_value=0
25415 fi
25416
25417 cat >>confdefs.h <<_ACEOF
25418 #define HAVE_DECL__SNPRINTF $gt_value
25419 _ACEOF
25420
25421
25422
25423 echo "$as_me:$LINENO: checking whether _snwprintf is declared" >&5
25424 echo $ECHO_N "checking whether _snwprintf is declared... $ECHO_C" >&6
25425 if test "${ac_cv_have_decl__snwprintf+set}" = set; then
25426 echo $ECHO_N "(cached) $ECHO_C" >&6
25427 else
25428 cat >conftest.$ac_ext <<_ACEOF
25429 /* confdefs.h. */
25430 _ACEOF
25431 cat confdefs.h >>conftest.$ac_ext
25432 cat >>conftest.$ac_ext <<_ACEOF
25433 /* end confdefs.h. */
25434 #include <stdio.h>
25435 int
25436 main ()
25437 {
25438
25439 #ifndef _snwprintf
25440 char *p = (char *) _snwprintf;
25441 #endif
25442
25443 ;
25444 return 0;
25445 }
25446 _ACEOF
25447 rm -f conftest.$ac_objext
25448 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25449 (eval $ac_compile) 2>conftest.er1
25450 ac_status=$?
25451 grep -v '^ *+' conftest.er1 >conftest.err
25452 rm -f conftest.er1
25453 cat conftest.err >&5
25454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25455 (exit $ac_status); } &&
25456 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25458 (eval $ac_try) 2>&5
25459 ac_status=$?
25460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25461 (exit $ac_status); }; } &&
25462 { ac_try='test -s conftest.$ac_objext'
25463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25464 (eval $ac_try) 2>&5
25465 ac_status=$?
25466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25467 (exit $ac_status); }; }; then
25468 ac_cv_have_decl__snwprintf=yes
25469 else
25470 echo "$as_me: failed program was:" >&5
25471 sed 's/^/| /' conftest.$ac_ext >&5
25472
25473 ac_cv_have_decl__snwprintf=no
25474 fi
25475 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25476 fi
25477 echo "$as_me:$LINENO: result: $ac_cv_have_decl__snwprintf" >&5
25478 echo "${ECHO_T}$ac_cv_have_decl__snwprintf" >&6
25479 if test $ac_cv_have_decl__snwprintf = yes; then
25480 gt_value=1
25481 else
25482 gt_value=0
25483 fi
25484
25485 cat >>confdefs.h <<_ACEOF
25486 #define HAVE_DECL__SNWPRINTF $gt_value
25487 _ACEOF
25488
25489
25490
25491
25492 echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5
25493 echo $ECHO_N "checking whether feof_unlocked is declared... $ECHO_C" >&6
25494 if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then
25495 echo $ECHO_N "(cached) $ECHO_C" >&6
25496 else
25497 cat >conftest.$ac_ext <<_ACEOF
25498 /* confdefs.h. */
25499 _ACEOF
25500 cat confdefs.h >>conftest.$ac_ext
25501 cat >>conftest.$ac_ext <<_ACEOF
25502 /* end confdefs.h. */
25503 #include <stdio.h>
25504 int
25505 main ()
25506 {
25507
25508 #ifndef feof_unlocked
25509 char *p = (char *) feof_unlocked;
25510 #endif
25511
25512 ;
25513 return 0;
25514 }
25515 _ACEOF
25516 rm -f conftest.$ac_objext
25517 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25518 (eval $ac_compile) 2>conftest.er1
25519 ac_status=$?
25520 grep -v '^ *+' conftest.er1 >conftest.err
25521 rm -f conftest.er1
25522 cat conftest.err >&5
25523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25524 (exit $ac_status); } &&
25525 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25527 (eval $ac_try) 2>&5
25528 ac_status=$?
25529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25530 (exit $ac_status); }; } &&
25531 { ac_try='test -s conftest.$ac_objext'
25532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25533 (eval $ac_try) 2>&5
25534 ac_status=$?
25535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25536 (exit $ac_status); }; }; then
25537 ac_cv_have_decl_feof_unlocked=yes
25538 else
25539 echo "$as_me: failed program was:" >&5
25540 sed 's/^/| /' conftest.$ac_ext >&5
25541
25542 ac_cv_have_decl_feof_unlocked=no
25543 fi
25544 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25545 fi
25546 echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5
25547 echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6
25548 if test $ac_cv_have_decl_feof_unlocked = yes; then
25549 gt_value=1
25550 else
25551 gt_value=0
25552 fi
25553
25554 cat >>confdefs.h <<_ACEOF
25555 #define HAVE_DECL_FEOF_UNLOCKED $gt_value
25556 _ACEOF
25557
25558
25559
25560 echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5
25561 echo $ECHO_N "checking whether fgets_unlocked is declared... $ECHO_C" >&6
25562 if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then
25563 echo $ECHO_N "(cached) $ECHO_C" >&6
25564 else
25565 cat >conftest.$ac_ext <<_ACEOF
25566 /* confdefs.h. */
25567 _ACEOF
25568 cat confdefs.h >>conftest.$ac_ext
25569 cat >>conftest.$ac_ext <<_ACEOF
25570 /* end confdefs.h. */
25571 #include <stdio.h>
25572 int
25573 main ()
25574 {
25575
25576 #ifndef fgets_unlocked
25577 char *p = (char *) fgets_unlocked;
25578 #endif
25579
25580 ;
25581 return 0;
25582 }
25583 _ACEOF
25584 rm -f conftest.$ac_objext
25585 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25586 (eval $ac_compile) 2>conftest.er1
25587 ac_status=$?
25588 grep -v '^ *+' conftest.er1 >conftest.err
25589 rm -f conftest.er1
25590 cat conftest.err >&5
25591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25592 (exit $ac_status); } &&
25593 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25595 (eval $ac_try) 2>&5
25596 ac_status=$?
25597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25598 (exit $ac_status); }; } &&
25599 { ac_try='test -s conftest.$ac_objext'
25600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25601 (eval $ac_try) 2>&5
25602 ac_status=$?
25603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25604 (exit $ac_status); }; }; then
25605 ac_cv_have_decl_fgets_unlocked=yes
25606 else
25607 echo "$as_me: failed program was:" >&5
25608 sed 's/^/| /' conftest.$ac_ext >&5
25609
25610 ac_cv_have_decl_fgets_unlocked=no
25611 fi
25612 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25613 fi
25614 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5
25615 echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6
25616 if test $ac_cv_have_decl_fgets_unlocked = yes; then
25617 gt_value=1
25618 else
25619 gt_value=0
25620 fi
25621
25622 cat >>confdefs.h <<_ACEOF
25623 #define HAVE_DECL_FGETS_UNLOCKED $gt_value
25624 _ACEOF
25625
25626
25627
25628 echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5
25629 echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6
25630 if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then
25631 echo $ECHO_N "(cached) $ECHO_C" >&6
25632 else
25633 cat >conftest.$ac_ext <<_ACEOF
25634 /* confdefs.h. */
25635 _ACEOF
25636 cat confdefs.h >>conftest.$ac_ext
25637 cat >>conftest.$ac_ext <<_ACEOF
25638 /* end confdefs.h. */
25639 #include <stdio.h>
25640 int
25641 main ()
25642 {
25643
25644 #ifndef getc_unlocked
25645 char *p = (char *) getc_unlocked;
25646 #endif
25647
25648 ;
25649 return 0;
25650 }
25651 _ACEOF
25652 rm -f conftest.$ac_objext
25653 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25654 (eval $ac_compile) 2>conftest.er1
25655 ac_status=$?
25656 grep -v '^ *+' conftest.er1 >conftest.err
25657 rm -f conftest.er1
25658 cat conftest.err >&5
25659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25660 (exit $ac_status); } &&
25661 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25663 (eval $ac_try) 2>&5
25664 ac_status=$?
25665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25666 (exit $ac_status); }; } &&
25667 { ac_try='test -s conftest.$ac_objext'
25668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25669 (eval $ac_try) 2>&5
25670 ac_status=$?
25671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25672 (exit $ac_status); }; }; then
25673 ac_cv_have_decl_getc_unlocked=yes
25674 else
25675 echo "$as_me: failed program was:" >&5
25676 sed 's/^/| /' conftest.$ac_ext >&5
25677
25678 ac_cv_have_decl_getc_unlocked=no
25679 fi
25680 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25681 fi
25682 echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5
25683 echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6
25684 if test $ac_cv_have_decl_getc_unlocked = yes; then
25685 gt_value=1
25686 else
25687 gt_value=0
25688 fi
25689
25690 cat >>confdefs.h <<_ACEOF
25691 #define HAVE_DECL_GETC_UNLOCKED $gt_value
25692 _ACEOF
25693
25694
25695
25696 case $gt_cv_func_printf_posix in
25697 *yes) HAVE_POSIX_PRINTF=1 ;;
25698 *) HAVE_POSIX_PRINTF=0 ;;
25699 esac
25700
25701 if test "$ac_cv_func_asprintf" = yes; then
25702 HAVE_ASPRINTF=1
25703 else
25704 HAVE_ASPRINTF=0
25705 fi
25706
25707 if test "$ac_cv_func_snprintf" = yes; then
25708 HAVE_SNPRINTF=1
25709 else
25710 HAVE_SNPRINTF=0
25711 fi
25712
25713 if test "$ac_cv_func_wprintf" = yes; then
25714 HAVE_WPRINTF=1
25715 else
25716 HAVE_WPRINTF=0
25717 fi
25718
25719
25720
25721
25722
25723
25724
25725 am_save_CPPFLAGS="$CPPFLAGS"
25726
25727 for element in $INCICONV; do
25728 haveit=
25729 for x in $CPPFLAGS; do
25730
25731 acl_save_prefix="$prefix"
25732 prefix="$acl_final_prefix"
25733 acl_save_exec_prefix="$exec_prefix"
25734 exec_prefix="$acl_final_exec_prefix"
25735 eval x=\"$x\"
25736 exec_prefix="$acl_save_exec_prefix"
25737 prefix="$acl_save_prefix"
25738
25739 if test "X$x" = "X$element"; then
25740 haveit=yes
25741 break
25742 fi
25743 done
25744 if test -z "$haveit"; then
25745 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
25746 fi
25747 done
25748
25749
25750 echo "$as_me:$LINENO: checking for iconv" >&5
25751 echo $ECHO_N "checking for iconv... $ECHO_C" >&6
25752 if test "${am_cv_func_iconv+set}" = set; then
25753 echo $ECHO_N "(cached) $ECHO_C" >&6
25754 else
25755
25756 am_cv_func_iconv="no, consider installing GNU libiconv"
25757 am_cv_lib_iconv=no
25758 cat >conftest.$ac_ext <<_ACEOF
25759 /* confdefs.h. */
25760 _ACEOF
25761 cat confdefs.h >>conftest.$ac_ext
25762 cat >>conftest.$ac_ext <<_ACEOF
25763 /* end confdefs.h. */
25764 #include <stdlib.h>
25765 #include <iconv.h>
25766 int
25767 main ()
25768 {
25769 iconv_t cd = iconv_open("","");
25770 iconv(cd,NULL,NULL,NULL,NULL);
25771 iconv_close(cd);
25772 ;
25773 return 0;
25774 }
25775 _ACEOF
25776 rm -f conftest.$ac_objext conftest$ac_exeext
25777 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25778 (eval $ac_link) 2>conftest.er1
25779 ac_status=$?
25780 grep -v '^ *+' conftest.er1 >conftest.err
25781 rm -f conftest.er1
25782 cat conftest.err >&5
25783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25784 (exit $ac_status); } &&
25785 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25787 (eval $ac_try) 2>&5
25788 ac_status=$?
25789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25790 (exit $ac_status); }; } &&
25791 { ac_try='test -s conftest$ac_exeext'
25792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25793 (eval $ac_try) 2>&5
25794 ac_status=$?
25795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25796 (exit $ac_status); }; }; then
25797 am_cv_func_iconv=yes
25798 else
25799 echo "$as_me: failed program was:" >&5
25800 sed 's/^/| /' conftest.$ac_ext >&5
25801
25802 fi
25803 rm -f conftest.err conftest.$ac_objext \
25804 conftest$ac_exeext conftest.$ac_ext
25805 if test "$am_cv_func_iconv" != yes; then
25806 am_save_LIBS="$LIBS"
25807 LIBS="$LIBS $LIBICONV"
25808 cat >conftest.$ac_ext <<_ACEOF
25809 /* confdefs.h. */
25810 _ACEOF
25811 cat confdefs.h >>conftest.$ac_ext
25812 cat >>conftest.$ac_ext <<_ACEOF
25813 /* end confdefs.h. */
25814 #include <stdlib.h>
25815 #include <iconv.h>
25816 int
25817 main ()
25818 {
25819 iconv_t cd = iconv_open("","");
25820 iconv(cd,NULL,NULL,NULL,NULL);
25821 iconv_close(cd);
25822 ;
25823 return 0;
25824 }
25825 _ACEOF
25826 rm -f conftest.$ac_objext conftest$ac_exeext
25827 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25828 (eval $ac_link) 2>conftest.er1
25829 ac_status=$?
25830 grep -v '^ *+' conftest.er1 >conftest.err
25831 rm -f conftest.er1
25832 cat conftest.err >&5
25833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25834 (exit $ac_status); } &&
25835 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25837 (eval $ac_try) 2>&5
25838 ac_status=$?
25839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25840 (exit $ac_status); }; } &&
25841 { ac_try='test -s conftest$ac_exeext'
25842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25843 (eval $ac_try) 2>&5
25844 ac_status=$?
25845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25846 (exit $ac_status); }; }; then
25847 am_cv_lib_iconv=yes
25848 am_cv_func_iconv=yes
25849 else
25850 echo "$as_me: failed program was:" >&5
25851 sed 's/^/| /' conftest.$ac_ext >&5
25852
25853 fi
25854 rm -f conftest.err conftest.$ac_objext \
25855 conftest$ac_exeext conftest.$ac_ext
25856 LIBS="$am_save_LIBS"
25857 fi
25858
25859 fi
25860 echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
25861 echo "${ECHO_T}$am_cv_func_iconv" >&6
25862 if test "$am_cv_func_iconv" = yes; then
25863
25864 cat >>confdefs.h <<\_ACEOF
25865 #define HAVE_ICONV 1
25866 _ACEOF
25867
25868 fi
25869 if test "$am_cv_lib_iconv" = yes; then
25870 echo "$as_me:$LINENO: checking how to link with libiconv" >&5
25871 echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
25872 echo "$as_me:$LINENO: result: $LIBICONV" >&5
25873 echo "${ECHO_T}$LIBICONV" >&6
25874 else
25875 CPPFLAGS="$am_save_CPPFLAGS"
25876 LIBICONV=
25877 LTLIBICONV=
25878 fi
25879
25880
25881
25882 if test "$am_cv_func_iconv" = yes; then
25883 echo "$as_me:$LINENO: checking for iconv declaration" >&5
25884 echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
25885 if test "${am_cv_proto_iconv+set}" = set; then
25886 echo $ECHO_N "(cached) $ECHO_C" >&6
25887 else
25888
25889 cat >conftest.$ac_ext <<_ACEOF
25890 /* confdefs.h. */
25891 _ACEOF
25892 cat confdefs.h >>conftest.$ac_ext
25893 cat >>conftest.$ac_ext <<_ACEOF
25894 /* end confdefs.h. */
25895
25896 #include <stdlib.h>
25897 #include <iconv.h>
25898 extern
25899 #ifdef __cplusplus
25900 "C"
25901 #endif
25902 #if defined(__STDC__) || defined(__cplusplus)
25903 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
25904 #else
25905 size_t iconv();
25906 #endif
25907
25908 int
25909 main ()
25910 {
25911
25912 ;
25913 return 0;
25914 }
25915 _ACEOF
25916 rm -f conftest.$ac_objext
25917 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25918 (eval $ac_compile) 2>conftest.er1
25919 ac_status=$?
25920 grep -v '^ *+' conftest.er1 >conftest.err
25921 rm -f conftest.er1
25922 cat conftest.err >&5
25923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25924 (exit $ac_status); } &&
25925 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25927 (eval $ac_try) 2>&5
25928 ac_status=$?
25929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25930 (exit $ac_status); }; } &&
25931 { ac_try='test -s conftest.$ac_objext'
25932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25933 (eval $ac_try) 2>&5
25934 ac_status=$?
25935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25936 (exit $ac_status); }; }; then
25937 am_cv_proto_iconv_arg1=""
25938 else
25939 echo "$as_me: failed program was:" >&5
25940 sed 's/^/| /' conftest.$ac_ext >&5
25941
25942 am_cv_proto_iconv_arg1="const"
25943 fi
25944 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25945 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);"
25946 fi
25947
25948 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
25949 echo "$as_me:$LINENO: result: ${ac_t:-
25950 }$am_cv_proto_iconv" >&5
25951 echo "${ECHO_T}${ac_t:-
25952 }$am_cv_proto_iconv" >&6
25953
25954 cat >>confdefs.h <<_ACEOF
25955 #define ICONV_CONST $am_cv_proto_iconv_arg1
25956 _ACEOF
25957
25958 fi
25959
25960
25961 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
25962 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
25963 if test "${am_cv_langinfo_codeset+set}" = set; then
25964 echo $ECHO_N "(cached) $ECHO_C" >&6
25965 else
25966 cat >conftest.$ac_ext <<_ACEOF
25967 /* confdefs.h. */
25968 _ACEOF
25969 cat confdefs.h >>conftest.$ac_ext
25970 cat >>conftest.$ac_ext <<_ACEOF
25971 /* end confdefs.h. */
25972 #include <langinfo.h>
25973 int
25974 main ()
25975 {
25976 char* cs = nl_langinfo(CODESET);
25977 ;
25978 return 0;
25979 }
25980 _ACEOF
25981 rm -f conftest.$ac_objext conftest$ac_exeext
25982 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25983 (eval $ac_link) 2>conftest.er1
25984 ac_status=$?
25985 grep -v '^ *+' conftest.er1 >conftest.err
25986 rm -f conftest.er1
25987 cat conftest.err >&5
25988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25989 (exit $ac_status); } &&
25990 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25992 (eval $ac_try) 2>&5
25993 ac_status=$?
25994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25995 (exit $ac_status); }; } &&
25996 { ac_try='test -s conftest$ac_exeext'
25997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25998 (eval $ac_try) 2>&5
25999 ac_status=$?
26000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26001 (exit $ac_status); }; }; then
26002 am_cv_langinfo_codeset=yes
26003 else
26004 echo "$as_me: failed program was:" >&5
26005 sed 's/^/| /' conftest.$ac_ext >&5
26006
26007 am_cv_langinfo_codeset=no
26008 fi
26009 rm -f conftest.err conftest.$ac_objext \
26010 conftest$ac_exeext conftest.$ac_ext
26011
26012 fi
26013 echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
26014 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
26015 if test $am_cv_langinfo_codeset = yes; then
26016
26017 cat >>confdefs.h <<\_ACEOF
26018 #define HAVE_LANGINFO_CODESET 1
26019 _ACEOF
26020
26021 fi
26022
26023 if test $ac_cv_header_locale_h = yes; then
26024
26025 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
26026 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
26027 if test "${gt_cv_val_LC_MESSAGES+set}" = set; then
26028 echo $ECHO_N "(cached) $ECHO_C" >&6
26029 else
26030 cat >conftest.$ac_ext <<_ACEOF
26031 /* confdefs.h. */
26032 _ACEOF
26033 cat confdefs.h >>conftest.$ac_ext
26034 cat >>conftest.$ac_ext <<_ACEOF
26035 /* end confdefs.h. */
26036 #include <locale.h>
26037 int
26038 main ()
26039 {
26040 return LC_MESSAGES
26041 ;
26042 return 0;
26043 }
26044 _ACEOF
26045 rm -f conftest.$ac_objext conftest$ac_exeext
26046 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26047 (eval $ac_link) 2>conftest.er1
26048 ac_status=$?
26049 grep -v '^ *+' conftest.er1 >conftest.err
26050 rm -f conftest.er1
26051 cat conftest.err >&5
26052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26053 (exit $ac_status); } &&
26054 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
26055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26056 (eval $ac_try) 2>&5
26057 ac_status=$?
26058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26059 (exit $ac_status); }; } &&
26060 { ac_try='test -s conftest$ac_exeext'
26061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26062 (eval $ac_try) 2>&5
26063 ac_status=$?
26064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26065 (exit $ac_status); }; }; then
26066 gt_cv_val_LC_MESSAGES=yes
26067 else
26068 echo "$as_me: failed program was:" >&5
26069 sed 's/^/| /' conftest.$ac_ext >&5
26070
26071 gt_cv_val_LC_MESSAGES=no
26072 fi
26073 rm -f conftest.err conftest.$ac_objext \
26074 conftest$ac_exeext conftest.$ac_ext
26075 fi
26076 echo "$as_me:$LINENO: result: $gt_cv_val_LC_MESSAGES" >&5
26077 echo "${ECHO_T}$gt_cv_val_LC_MESSAGES" >&6
26078 if test $gt_cv_val_LC_MESSAGES = yes; then
26079
26080 cat >>confdefs.h <<\_ACEOF
26081 #define HAVE_LC_MESSAGES 1
26082 _ACEOF
26083
26084 fi
26085
26086 fi
26087
26088 if test -n "$INTL_MACOSX_LIBS"; then
26089 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
26090 fi
26091
26092 for ac_prog in bison
26093 do
26094 # Extract the first word of "$ac_prog", so it can be a program name with args.
26095 set dummy $ac_prog; ac_word=$2
26096 echo "$as_me:$LINENO: checking for $ac_word" >&5
26097 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26098 if test "${ac_cv_prog_INTLBISON+set}" = set; then
26099 echo $ECHO_N "(cached) $ECHO_C" >&6
26100 else
26101 if test -n "$INTLBISON"; then
26102 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
26103 else
26104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26105 for as_dir in $PATH
26106 do
26107 IFS=$as_save_IFS
26108 test -z "$as_dir" && as_dir=.
26109 for ac_exec_ext in '' $ac_executable_extensions; do
26110 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26111 ac_cv_prog_INTLBISON="$ac_prog"
26112 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26113 break 2
26114 fi
26115 done
26116 done
26117
26118 fi
26119 fi
26120 INTLBISON=$ac_cv_prog_INTLBISON
26121 if test -n "$INTLBISON"; then
26122 echo "$as_me:$LINENO: result: $INTLBISON" >&5
26123 echo "${ECHO_T}$INTLBISON" >&6
26124 else
26125 echo "$as_me:$LINENO: result: no" >&5
26126 echo "${ECHO_T}no" >&6
26127 fi
26128
26129 test -n "$INTLBISON" && break
26130 done
26131
26132 if test -z "$INTLBISON"; then
26133 ac_verc_fail=yes
26134 else
26135 echo "$as_me:$LINENO: checking version of bison" >&5
26136 echo $ECHO_N "checking version of bison... $ECHO_C" >&6
26137 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
26138 case $ac_prog_version in
26139 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
26140 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
26141 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
26142 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
26143 esac
26144 echo "$as_me:$LINENO: result: $ac_prog_version" >&5
26145 echo "${ECHO_T}$ac_prog_version" >&6
26146 fi
26147 if test $ac_verc_fail = yes; then
26148 INTLBISON=:
26149 fi
26150
26151
26152
26153
26154
26155
26156
26157
26158
26159
26160
26161
26162
26163
26164
26165
26166 echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5
26167 echo $ECHO_N "checking for CFPreferencesCopyAppValue... $ECHO_C" >&6
26168 if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then
26169 echo $ECHO_N "(cached) $ECHO_C" >&6
26170 else
26171 gt_save_CPPFLAGS="$CPPFLAGS"
26172 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
26173 gt_save_LIBS="$LIBS"
26174 LIBS="$LIBS -framework CoreFoundation"
26175 cat >conftest.$ac_ext <<_ACEOF
26176 /* confdefs.h. */
26177 _ACEOF
26178 cat confdefs.h >>conftest.$ac_ext
26179 cat >>conftest.$ac_ext <<_ACEOF
26180 /* end confdefs.h. */
26181 #include <CFPreferences.h>
26182 int
26183 main ()
26184 {
26185 CFPreferencesCopyAppValue(NULL, NULL)
26186 ;
26187 return 0;
26188 }
26189 _ACEOF
26190 rm -f conftest.$ac_objext conftest$ac_exeext
26191 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26192 (eval $ac_link) 2>conftest.er1
26193 ac_status=$?
26194 grep -v '^ *+' conftest.er1 >conftest.err
26195 rm -f conftest.er1
26196 cat conftest.err >&5
26197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26198 (exit $ac_status); } &&
26199 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
26200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26201 (eval $ac_try) 2>&5
26202 ac_status=$?
26203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26204 (exit $ac_status); }; } &&
26205 { ac_try='test -s conftest$ac_exeext'
26206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26207 (eval $ac_try) 2>&5
26208 ac_status=$?
26209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26210 (exit $ac_status); }; }; then
26211 gt_cv_func_CFPreferencesCopyAppValue=yes
26212 else
26213 echo "$as_me: failed program was:" >&5
26214 sed 's/^/| /' conftest.$ac_ext >&5
26215
26216 gt_cv_func_CFPreferencesCopyAppValue=no
26217 fi
26218 rm -f conftest.err conftest.$ac_objext \
26219 conftest$ac_exeext conftest.$ac_ext
26220 CPPFLAGS="$gt_save_CPPFLAGS"
26221 LIBS="$gt_save_LIBS"
26222 fi
26223 echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
26224 echo "${ECHO_T}$gt_cv_func_CFPreferencesCopyAppValue" >&6
26225 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
26226
26227 cat >>confdefs.h <<\_ACEOF
26228 #define HAVE_CFPREFERENCESCOPYAPPVALUE 1
26229 _ACEOF
26230
26231 fi
26232 echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5
26233 echo $ECHO_N "checking for CFLocaleCopyCurrent... $ECHO_C" >&6
26234 if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then
26235 echo $ECHO_N "(cached) $ECHO_C" >&6
26236 else
26237 gt_save_CPPFLAGS="$CPPFLAGS"
26238 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
26239 gt_save_LIBS="$LIBS"
26240 LIBS="$LIBS -framework CoreFoundation"
26241 cat >conftest.$ac_ext <<_ACEOF
26242 /* confdefs.h. */
26243 _ACEOF
26244 cat confdefs.h >>conftest.$ac_ext
26245 cat >>conftest.$ac_ext <<_ACEOF
26246 /* end confdefs.h. */
26247 #include <CFLocale.h>
26248 int
26249 main ()
26250 {
26251 CFLocaleCopyCurrent();
26252 ;
26253 return 0;
26254 }
26255 _ACEOF
26256 rm -f conftest.$ac_objext conftest$ac_exeext
26257 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26258 (eval $ac_link) 2>conftest.er1
26259 ac_status=$?
26260 grep -v '^ *+' conftest.er1 >conftest.err
26261 rm -f conftest.er1
26262 cat conftest.err >&5
26263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26264 (exit $ac_status); } &&
26265 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
26266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26267 (eval $ac_try) 2>&5
26268 ac_status=$?
26269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26270 (exit $ac_status); }; } &&
26271 { ac_try='test -s conftest$ac_exeext'
26272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26273 (eval $ac_try) 2>&5
26274 ac_status=$?
26275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26276 (exit $ac_status); }; }; then
26277 gt_cv_func_CFLocaleCopyCurrent=yes
26278 else
26279 echo "$as_me: failed program was:" >&5
26280 sed 's/^/| /' conftest.$ac_ext >&5
26281
26282 gt_cv_func_CFLocaleCopyCurrent=no
26283 fi
26284 rm -f conftest.err conftest.$ac_objext \
26285 conftest$ac_exeext conftest.$ac_ext
26286 CPPFLAGS="$gt_save_CPPFLAGS"
26287 LIBS="$gt_save_LIBS"
26288 fi
26289 echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
26290 echo "${ECHO_T}$gt_cv_func_CFLocaleCopyCurrent" >&6
26291 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
26292
26293 cat >>confdefs.h <<\_ACEOF
26294 #define HAVE_CFLOCALECOPYCURRENT 1
26295 _ACEOF
26296
26297 fi
26298 INTL_MACOSX_LIBS=
26299 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
26300 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
26301 fi
26302
26303
26304
26305
26306 echo "$as_me:$LINENO: checking whether NLS is requested" >&5
26307 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
26308 # Check whether --enable-nls or --disable-nls was given.
26309 if test "${enable_nls+set}" = set; then
26310 enableval="$enable_nls"
26311 USE_NLS=$enableval
26312 else
26313 USE_NLS=yes
26314 fi;
26315 echo "$as_me:$LINENO: result: $USE_NLS" >&5
26316 echo "${ECHO_T}$USE_NLS" >&6
26317
26318
26319
26320
26321 BUILD_INCLUDED_LIBINTL=no
26322 USE_INCLUDED_LIBINTL=no
26323
26324 LIBINTL=
26325 LTLIBINTL=
26326 POSUB=
26327
26328 if test "$USE_NLS" = "yes"; then
26329 gt_use_preinstalled_gnugettext=no
26330
26331 echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
26332 echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
26333
26334 # Check whether --with-included-gettext or --without-included-gettext was given.
26335 if test "${with_included_gettext+set}" = set; then
26336 withval="$with_included_gettext"
26337 nls_cv_force_use_gnu_gettext=$withval
26338 else
26339 nls_cv_force_use_gnu_gettext=no
26340 fi;
26341 echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
26342 echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
26343
26344 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
26345 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
26346
26347
26348
26349
26350
26351
26352 echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5
26353 echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6
26354 if test "${gt_cv_func_gnugettext1_libc+set}" = set; then
26355 echo $ECHO_N "(cached) $ECHO_C" >&6
26356 else
26357 cat >conftest.$ac_ext <<_ACEOF
26358 /* confdefs.h. */
26359 _ACEOF
26360 cat confdefs.h >>conftest.$ac_ext
26361 cat >>conftest.$ac_ext <<_ACEOF
26362 /* end confdefs.h. */
26363 #include <libintl.h>
26364 extern int _nl_msg_cat_cntr;
26365 extern int *_nl_domain_bindings;
26366 int
26367 main ()
26368 {
26369 bindtextdomain ("", "");
26370 return * gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings
26371 ;
26372 return 0;
26373 }
26374 _ACEOF
26375 rm -f conftest.$ac_objext conftest$ac_exeext
26376 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26377 (eval $ac_link) 2>conftest.er1
26378 ac_status=$?
26379 grep -v '^ *+' conftest.er1 >conftest.err
26380 rm -f conftest.er1
26381 cat conftest.err >&5
26382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26383 (exit $ac_status); } &&
26384 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
26385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26386 (eval $ac_try) 2>&5
26387 ac_status=$?
26388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26389 (exit $ac_status); }; } &&
26390 { ac_try='test -s conftest$ac_exeext'
26391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26392 (eval $ac_try) 2>&5
26393 ac_status=$?
26394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26395 (exit $ac_status); }; }; then
26396 gt_cv_func_gnugettext1_libc=yes
26397 else
26398 echo "$as_me: failed program was:" >&5
26399 sed 's/^/| /' conftest.$ac_ext >&5
26400
26401 gt_cv_func_gnugettext1_libc=no
26402 fi
26403 rm -f conftest.err conftest.$ac_objext \
26404 conftest$ac_exeext conftest.$ac_ext
26405 fi
26406 echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libc" >&5
26407 echo "${ECHO_T}$gt_cv_func_gnugettext1_libc" >&6
26408
26409 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
26410
26411
26412
26413 use_additional=yes
26414
26415 acl_save_prefix="$prefix"
26416 prefix="$acl_final_prefix"
26417 acl_save_exec_prefix="$exec_prefix"
26418 exec_prefix="$acl_final_exec_prefix"
26419
26420 eval additional_includedir=\"$includedir\"
26421 eval additional_libdir=\"$libdir\"
26422
26423 exec_prefix="$acl_save_exec_prefix"
26424 prefix="$acl_save_prefix"
26425
26426
26427 # Check whether --with-libintl-prefix or --without-libintl-prefix was given.
26428 if test "${with_libintl_prefix+set}" = set; then
26429 withval="$with_libintl_prefix"
26430
26431 if test "X$withval" = "Xno"; then
26432 use_additional=no
26433 else
26434 if test "X$withval" = "X"; then
26435
26436 acl_save_prefix="$prefix"
26437 prefix="$acl_final_prefix"
26438 acl_save_exec_prefix="$exec_prefix"
26439 exec_prefix="$acl_final_exec_prefix"
26440
26441 eval additional_includedir=\"$includedir\"
26442 eval additional_libdir=\"$libdir\"
26443
26444 exec_prefix="$acl_save_exec_prefix"
26445 prefix="$acl_save_prefix"
26446
26447 else
26448 additional_includedir="$withval/include"
26449 additional_libdir="$withval/lib"
26450 fi
26451 fi
26452
26453 fi;
26454 LIBINTL=
26455 LTLIBINTL=
26456 INCINTL=
26457 rpathdirs=
26458 ltrpathdirs=
26459 names_already_handled=
26460 names_next_round='intl '
26461 while test -n "$names_next_round"; do
26462 names_this_round="$names_next_round"
26463 names_next_round=
26464 for name in $names_this_round; do
26465 already_handled=
26466 for n in $names_already_handled; do
26467 if test "$n" = "$name"; then
26468 already_handled=yes
26469 break
26470 fi
26471 done
26472 if test -z "$already_handled"; then
26473 names_already_handled="$names_already_handled $name"
26474 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
26475 eval value=\"\$HAVE_LIB$uppername\"
26476 if test -n "$value"; then
26477 if test "$value" = yes; then
26478 eval value=\"\$LIB$uppername\"
26479 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
26480 eval value=\"\$LTLIB$uppername\"
26481 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
26482 else
26483 :
26484 fi
26485 else
26486 found_dir=
26487 found_la=
26488 found_so=
26489 found_a=
26490 if test $use_additional = yes; then
26491 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
26492 found_dir="$additional_libdir"
26493 found_so="$additional_libdir/lib$name.$shlibext"
26494 if test -f "$additional_libdir/lib$name.la"; then
26495 found_la="$additional_libdir/lib$name.la"
26496 fi
26497 else
26498 if test -f "$additional_libdir/lib$name.$libext"; then
26499 found_dir="$additional_libdir"
26500 found_a="$additional_libdir/lib$name.$libext"
26501 if test -f "$additional_libdir/lib$name.la"; then
26502 found_la="$additional_libdir/lib$name.la"
26503 fi
26504 fi
26505 fi
26506 fi
26507 if test "X$found_dir" = "X"; then
26508 for x in $LDFLAGS $LTLIBINTL; do
26509
26510 acl_save_prefix="$prefix"
26511 prefix="$acl_final_prefix"
26512 acl_save_exec_prefix="$exec_prefix"
26513 exec_prefix="$acl_final_exec_prefix"
26514 eval x=\"$x\"
26515 exec_prefix="$acl_save_exec_prefix"
26516 prefix="$acl_save_prefix"
26517
26518 case "$x" in
26519 -L*)
26520 dir=`echo "X$x" | sed -e 's/^X-L//'`
26521 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
26522 found_dir="$dir"
26523 found_so="$dir/lib$name.$shlibext"
26524 if test -f "$dir/lib$name.la"; then
26525 found_la="$dir/lib$name.la"
26526 fi
26527 else
26528 if test -f "$dir/lib$name.$libext"; then
26529 found_dir="$dir"
26530 found_a="$dir/lib$name.$libext"
26531 if test -f "$dir/lib$name.la"; then
26532 found_la="$dir/lib$name.la"
26533 fi
26534 fi
26535 fi
26536 ;;
26537 esac
26538 if test "X$found_dir" != "X"; then
26539 break
26540 fi
26541 done
26542 fi
26543 if test "X$found_dir" != "X"; then
26544 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
26545 if test "X$found_so" != "X"; then
26546 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
26547 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
26548 else
26549 haveit=
26550 for x in $ltrpathdirs; do
26551 if test "X$x" = "X$found_dir"; then
26552 haveit=yes
26553 break
26554 fi
26555 done
26556 if test -z "$haveit"; then
26557 ltrpathdirs="$ltrpathdirs $found_dir"
26558 fi
26559 if test "$hardcode_direct" = yes; then
26560 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
26561 else
26562 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
26563 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
26564 haveit=
26565 for x in $rpathdirs; do
26566 if test "X$x" = "X$found_dir"; then
26567 haveit=yes
26568 break
26569 fi
26570 done
26571 if test -z "$haveit"; then
26572 rpathdirs="$rpathdirs $found_dir"
26573 fi
26574 else
26575 haveit=
26576 for x in $LDFLAGS $LIBINTL; do
26577
26578 acl_save_prefix="$prefix"
26579 prefix="$acl_final_prefix"
26580 acl_save_exec_prefix="$exec_prefix"
26581 exec_prefix="$acl_final_exec_prefix"
26582 eval x=\"$x\"
26583 exec_prefix="$acl_save_exec_prefix"
26584 prefix="$acl_save_prefix"
26585
26586 if test "X$x" = "X-L$found_dir"; then
26587 haveit=yes
26588 break
26589 fi
26590 done
26591 if test -z "$haveit"; then
26592 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
26593 fi
26594 if test "$hardcode_minus_L" != no; then
26595 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
26596 else
26597 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
26598 fi
26599 fi
26600 fi
26601 fi
26602 else
26603 if test "X$found_a" != "X"; then
26604 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
26605 else
26606 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
26607 fi
26608 fi
26609 additional_includedir=
26610 case "$found_dir" in
26611 */lib | */lib/)
26612 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
26613 additional_includedir="$basedir/include"
26614 ;;
26615 esac
26616 if test "X$additional_includedir" != "X"; then
26617 if test "X$additional_includedir" != "X/usr/include"; then
26618 haveit=
26619 if test "X$additional_includedir" = "X/usr/local/include"; then
26620 if test -n "$GCC"; then
26621 case $host_os in
26622 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
26623 esac
26624 fi
26625 fi
26626 if test -z "$haveit"; then
26627 for x in $CPPFLAGS $INCINTL; do
26628
26629 acl_save_prefix="$prefix"
26630 prefix="$acl_final_prefix"
26631 acl_save_exec_prefix="$exec_prefix"
26632 exec_prefix="$acl_final_exec_prefix"
26633 eval x=\"$x\"
26634 exec_prefix="$acl_save_exec_prefix"
26635 prefix="$acl_save_prefix"
26636
26637 if test "X$x" = "X-I$additional_includedir"; then
26638 haveit=yes
26639 break
26640 fi
26641 done
26642 if test -z "$haveit"; then
26643 if test -d "$additional_includedir"; then
26644 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
26645 fi
26646 fi
26647 fi
26648 fi
26649 fi
26650 if test -n "$found_la"; then
26651 save_libdir="$libdir"
26652 case "$found_la" in
26653 */* | *\\*) . "$found_la" ;;
26654 *) . "./$found_la" ;;
26655 esac
26656 libdir="$save_libdir"
26657 for dep in $dependency_libs; do
26658 case "$dep" in
26659 -L*)
26660 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
26661 if test "X$additional_libdir" != "X/usr/lib"; then
26662 haveit=
26663 if test "X$additional_libdir" = "X/usr/local/lib"; then
26664 if test -n "$GCC"; then
26665 case $host_os in
26666 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
26667 esac
26668 fi
26669 fi
26670 if test -z "$haveit"; then
26671 haveit=
26672 for x in $LDFLAGS $LIBINTL; do
26673
26674 acl_save_prefix="$prefix"
26675 prefix="$acl_final_prefix"
26676 acl_save_exec_prefix="$exec_prefix"
26677 exec_prefix="$acl_final_exec_prefix"
26678 eval x=\"$x\"
26679 exec_prefix="$acl_save_exec_prefix"
26680 prefix="$acl_save_prefix"
26681
26682 if test "X$x" = "X-L$additional_libdir"; then
26683 haveit=yes
26684 break
26685 fi
26686 done
26687 if test -z "$haveit"; then
26688 if test -d "$additional_libdir"; then
26689 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
26690 fi
26691 fi
26692 haveit=
26693 for x in $LDFLAGS $LTLIBINTL; do
26694
26695 acl_save_prefix="$prefix"
26696 prefix="$acl_final_prefix"
26697 acl_save_exec_prefix="$exec_prefix"
26698 exec_prefix="$acl_final_exec_prefix"
26699 eval x=\"$x\"
26700 exec_prefix="$acl_save_exec_prefix"
26701 prefix="$acl_save_prefix"
26702
26703 if test "X$x" = "X-L$additional_libdir"; then
26704 haveit=yes
26705 break
26706 fi
26707 done
26708 if test -z "$haveit"; then
26709 if test -d "$additional_libdir"; then
26710 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
26711 fi
26712 fi
26713 fi
26714 fi
26715 ;;
26716 -R*)
26717 dir=`echo "X$dep" | sed -e 's/^X-R//'`
26718 if test "$enable_rpath" != no; then
26719 haveit=
26720 for x in $rpathdirs; do
26721 if test "X$x" = "X$dir"; then
26722 haveit=yes
26723 break
26724 fi
26725 done
26726 if test -z "$haveit"; then
26727 rpathdirs="$rpathdirs $dir"
26728 fi
26729 haveit=
26730 for x in $ltrpathdirs; do
26731 if test "X$x" = "X$dir"; then
26732 haveit=yes
26733 break
26734 fi
26735 done
26736 if test -z "$haveit"; then
26737 ltrpathdirs="$ltrpathdirs $dir"
26738 fi
26739 fi
26740 ;;
26741 -l*)
26742 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
26743 ;;
26744 *.la)
26745 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
26746 ;;
26747 *)
26748 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
26749 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
26750 ;;
26751 esac
26752 done
26753 fi
26754 else
26755 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
26756 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
26757 fi
26758 fi
26759 fi
26760 done
26761 done
26762 if test "X$rpathdirs" != "X"; then
26763 if test -n "$hardcode_libdir_separator"; then
26764 alldirs=
26765 for found_dir in $rpathdirs; do
26766 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
26767 done
26768 acl_save_libdir="$libdir"
26769 libdir="$alldirs"
26770 eval flag=\"$hardcode_libdir_flag_spec\"
26771 libdir="$acl_save_libdir"
26772 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
26773 else
26774 for found_dir in $rpathdirs; do
26775 acl_save_libdir="$libdir"
26776 libdir="$found_dir"
26777 eval flag=\"$hardcode_libdir_flag_spec\"
26778 libdir="$acl_save_libdir"
26779 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
26780 done
26781 fi
26782 fi
26783 if test "X$ltrpathdirs" != "X"; then
26784 for found_dir in $ltrpathdirs; do
26785 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
26786 done
26787 fi
26788
26789 echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5
26790 echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6
26791 if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then
26792 echo $ECHO_N "(cached) $ECHO_C" >&6
26793 else
26794 gt_save_CPPFLAGS="$CPPFLAGS"
26795 CPPFLAGS="$CPPFLAGS $INCINTL"
26796 gt_save_LIBS="$LIBS"
26797 LIBS="$LIBS $LIBINTL"
26798 cat >conftest.$ac_ext <<_ACEOF
26799 /* confdefs.h. */
26800 _ACEOF
26801 cat confdefs.h >>conftest.$ac_ext
26802 cat >>conftest.$ac_ext <<_ACEOF
26803 /* end confdefs.h. */
26804 #include <libintl.h>
26805 extern int _nl_msg_cat_cntr;
26806 extern
26807 #ifdef __cplusplus
26808 "C"
26809 #endif
26810 const char *_nl_expand_alias (const char *);
26811 int
26812 main ()
26813 {
26814 bindtextdomain ("", "");
26815 return * gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias ("")
26816 ;
26817 return 0;
26818 }
26819 _ACEOF
26820 rm -f conftest.$ac_objext conftest$ac_exeext
26821 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26822 (eval $ac_link) 2>conftest.er1
26823 ac_status=$?
26824 grep -v '^ *+' conftest.er1 >conftest.err
26825 rm -f conftest.er1
26826 cat conftest.err >&5
26827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26828 (exit $ac_status); } &&
26829 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
26830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26831 (eval $ac_try) 2>&5
26832 ac_status=$?
26833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26834 (exit $ac_status); }; } &&
26835 { ac_try='test -s conftest$ac_exeext'
26836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26837 (eval $ac_try) 2>&5
26838 ac_status=$?
26839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26840 (exit $ac_status); }; }; then
26841 gt_cv_func_gnugettext1_libintl=yes
26842 else
26843 echo "$as_me: failed program was:" >&5
26844 sed 's/^/| /' conftest.$ac_ext >&5
26845
26846 gt_cv_func_gnugettext1_libintl=no
26847 fi
26848 rm -f conftest.err conftest.$ac_objext \
26849 conftest$ac_exeext conftest.$ac_ext
26850 if test "$gt_cv_func_gnugettext1_libintl" != yes && test -n "$LIBICONV"; then
26851 LIBS="$LIBS $LIBICONV"
26852 cat >conftest.$ac_ext <<_ACEOF
26853 /* confdefs.h. */
26854 _ACEOF
26855 cat confdefs.h >>conftest.$ac_ext
26856 cat >>conftest.$ac_ext <<_ACEOF
26857 /* end confdefs.h. */
26858 #include <libintl.h>
26859 extern int _nl_msg_cat_cntr;
26860 extern
26861 #ifdef __cplusplus
26862 "C"
26863 #endif
26864 const char *_nl_expand_alias (const char *);
26865 int
26866 main ()
26867 {
26868 bindtextdomain ("", "");
26869 return * gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias ("")
26870 ;
26871 return 0;
26872 }
26873 _ACEOF
26874 rm -f conftest.$ac_objext conftest$ac_exeext
26875 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26876 (eval $ac_link) 2>conftest.er1
26877 ac_status=$?
26878 grep -v '^ *+' conftest.er1 >conftest.err
26879 rm -f conftest.er1
26880 cat conftest.err >&5
26881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26882 (exit $ac_status); } &&
26883 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
26884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26885 (eval $ac_try) 2>&5
26886 ac_status=$?
26887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26888 (exit $ac_status); }; } &&
26889 { ac_try='test -s conftest$ac_exeext'
26890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26891 (eval $ac_try) 2>&5
26892 ac_status=$?
26893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26894 (exit $ac_status); }; }; then
26895 LIBINTL="$LIBINTL $LIBICONV"
26896 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
26897 gt_cv_func_gnugettext1_libintl=yes
26898
26899 else
26900 echo "$as_me: failed program was:" >&5
26901 sed 's/^/| /' conftest.$ac_ext >&5
26902
26903 fi
26904 rm -f conftest.err conftest.$ac_objext \
26905 conftest$ac_exeext conftest.$ac_ext
26906 fi
26907 CPPFLAGS="$gt_save_CPPFLAGS"
26908 LIBS="$gt_save_LIBS"
26909 fi
26910 echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libintl" >&5
26911 echo "${ECHO_T}$gt_cv_func_gnugettext1_libintl" >&6
26912 fi
26913
26914 if test "$gt_cv_func_gnugettext1_libc" = "yes" \
26915 || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
26916 && test "$PACKAGE" != gettext-runtime \
26917 && test "$PACKAGE" != gettext-tools; }; then
26918 gt_use_preinstalled_gnugettext=yes
26919 else
26920 LIBINTL=
26921 LTLIBINTL=
26922 INCINTL=
26923 fi
26924
26925
26926 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
26927 nls_cv_use_gnu_gettext=yes
26928 fi
26929 fi
26930
26931 if test "$nls_cv_use_gnu_gettext" = "yes"; then
26932 BUILD_INCLUDED_LIBINTL=yes
26933 USE_INCLUDED_LIBINTL=yes
26934 LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV"
26935 LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV"
26936 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
26937 fi
26938
26939 CATOBJEXT=
26940 if test "$gt_use_preinstalled_gnugettext" = "yes" \
26941 || test "$nls_cv_use_gnu_gettext" = "yes"; then
26942 CATOBJEXT=.gmo
26943 fi
26944
26945
26946 if test -n "$INTL_MACOSX_LIBS"; then
26947 if test "$gt_use_preinstalled_gnugettext" = "yes" \
26948 || test "$nls_cv_use_gnu_gettext" = "yes"; then
26949 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
26950 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
26951 fi
26952 fi
26953
26954 if test "$gt_use_preinstalled_gnugettext" = "yes" \
26955 || test "$nls_cv_use_gnu_gettext" = "yes"; then
26956
26957 cat >>confdefs.h <<\_ACEOF
26958 #define ENABLE_NLS 1
26959 _ACEOF
26960
26961 else
26962 USE_NLS=no
26963 fi
26964 fi
26965
26966 echo "$as_me:$LINENO: checking whether to use NLS" >&5
26967 echo $ECHO_N "checking whether to use NLS... $ECHO_C" >&6
26968 echo "$as_me:$LINENO: result: $USE_NLS" >&5
26969 echo "${ECHO_T}$USE_NLS" >&6
26970 if test "$USE_NLS" = "yes"; then
26971 echo "$as_me:$LINENO: checking where the gettext function comes from" >&5
26972 echo $ECHO_N "checking where the gettext function comes from... $ECHO_C" >&6
26973 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
26974 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
26975 gt_source="external libintl"
26976 else
26977 gt_source="libc"
26978 fi
26979 else
26980 gt_source="included intl directory"
26981 fi
26982 echo "$as_me:$LINENO: result: $gt_source" >&5
26983 echo "${ECHO_T}$gt_source" >&6
26984 fi
26985
26986 if test "$USE_NLS" = "yes"; then
26987
26988 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
26989 if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
26990 echo "$as_me:$LINENO: checking how to link with libintl" >&5
26991 echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6
26992 echo "$as_me:$LINENO: result: $LIBINTL" >&5
26993 echo "${ECHO_T}$LIBINTL" >&6
26994
26995 for element in $INCINTL; do
26996 haveit=
26997 for x in $CPPFLAGS; do
26998
26999 acl_save_prefix="$prefix"
27000 prefix="$acl_final_prefix"
27001 acl_save_exec_prefix="$exec_prefix"
27002 exec_prefix="$acl_final_exec_prefix"
27003 eval x=\"$x\"
27004 exec_prefix="$acl_save_exec_prefix"
27005 prefix="$acl_save_prefix"
27006
27007 if test "X$x" = "X$element"; then
27008 haveit=yes
27009 break
27010 fi
27011 done
27012 if test -z "$haveit"; then
27013 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
27014 fi
27015 done
27016
27017 fi
27018
27019
27020 cat >>confdefs.h <<\_ACEOF
27021 #define HAVE_GETTEXT 1
27022 _ACEOF
27023
27024
27025 cat >>confdefs.h <<\_ACEOF
27026 #define HAVE_DCGETTEXT 1
27027 _ACEOF
27028
27029 fi
27030
27031 POSUB=po
27032 fi
27033
27034
27035 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
27036 BUILD_INCLUDED_LIBINTL=yes
27037 fi
27038
27039
27040
27041
27042
27043 nls_cv_header_intl=
27044 nls_cv_header_libgt=
27045
27046 DATADIRNAME=share
27047
27048
27049 INSTOBJEXT=.mo
27050
27051
27052 GENCAT=gencat
27053
27054
27055 INTLOBJS=
27056 if test "$USE_INCLUDED_LIBINTL" = yes; then
27057 INTLOBJS="\$(GETTOBJS)"
27058 fi
27059
27060
27061 INTL_LIBTOOL_SUFFIX_PREFIX=
27062
27063
27064
27065 INTLLIBS="$LIBINTL"
27066
27067
27068
27069
27070
27071
27072
27073
27074 if test "x${prefix}" = "xNONE"; then
27075 cat >>confdefs.h <<_ACEOF
27076 #define PACKAGE_LOCALE_DIR "${ac_default_prefix}/${DATADIRNAME}/locale"
27077 _ACEOF
27078
27079 else
27080 cat >>confdefs.h <<_ACEOF
27081 #define PACKAGE_LOCALE_DIR "${prefix}/${DATADIRNAME}/locale"
27082 _ACEOF
27083
27084 fi
27085
27086
27087 build_examples=no
27088
27089 # Check whether --enable-examples or --disable-examples was given.
27090 if test "${enable_examples+set}" = set; then
27091 enableval="$enable_examples"
27092 build_examples="$enableval"
27093 else
27094 build_examples=no
27095 fi;
27096
27097
27098
27099 if test "x$build_examples" = "xyes"; then
27100 WITH_EXAMPLES_TRUE=
27101 WITH_EXAMPLES_FALSE='#'
27102 else
27103 WITH_EXAMPLES_TRUE='#'
27104 WITH_EXAMPLES_FALSE=
27105 fi
27106
27107
27108 build_hcal=yes
27109
27110 # Check whether --enable-hcal or --disable-hcal was given.
27111 if test "${enable_hcal+set}" = set; then
27112 enableval="$enable_hcal"
27113 build_hcal="$enableval"
27114 else
27115 build_hcal=yes
27116 fi;
27117
27118
27119
27120 if test "x$build_hcal" = "xyes"; then
27121 WITH_HCAL_TRUE=
27122 WITH_HCAL_FALSE='#'
27123 else
27124 WITH_HCAL_TRUE='#'
27125 WITH_HCAL_FALSE=
27126 fi
27127
27128
27129
27130
27131
27132
27133 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"
27134 cat >confcache <<\_ACEOF
27135 # This file is a shell script that caches the results of configure
27136 # tests run on this system so they can be shared between configure
27137 # scripts and configure runs, see configure's option --config-cache.
27138 # It is not useful on other systems. If it contains results you don't
27139 # want to keep, you may remove or edit it.
27140 #
27141 # config.status only pays attention to the cache file if you give it
27142 # the --recheck option to rerun configure.
27143 #
27144 # `ac_cv_env_foo' variables (set or unset) will be overridden when
27145 # loading this file, other *unset* `ac_cv_foo' will be assigned the
27146 # following values.
27147
27148 _ACEOF
27149
27150 # The following way of writing the cache mishandles newlines in values,
27151 # but we know of no workaround that is simple, portable, and efficient.
27152 # So, don't put newlines in cache variables' values.
27153 # Ultrix sh set writes to stderr and can't be redirected directly,
27154 # and sets the high bit in the cache file unless we assign to the vars.
27155 {
27156 (set) 2>&1 |
27157 case `(ac_space=' '; set | grep ac_space) 2>&1` in
27158 *ac_space=\ *)
27159 # `set' does not quote correctly, so add quotes (double-quote
27160 # substitution turns \\\\ into \\, and sed turns \\ into \).
27161 sed -n \
27162 "s/'/'\\\\''/g;
27163 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
27164 ;;
27165 *)
27166 # `set' quotes correctly as required by POSIX, so do not add quotes.
27167 sed -n \
27168 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
27169 ;;
27170 esac;
27171 } |
27172 sed '
27173 t clear
27174 : clear
27175 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27176 t end
27177 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27178 : end' >>confcache
27179 if diff $cache_file confcache >/dev/null 2>&1; then :; else
27180 if test -w $cache_file; then
27181 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
27182 cat confcache >$cache_file
27183 else
27184 echo "not updating unwritable cache $cache_file"
27185 fi
27186 fi
27187 rm -f confcache
27188
27189 test "x$prefix" = xNONE && prefix=$ac_default_prefix
27190 # Let make expand exec_prefix.
27191 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
27192
27193 # VPATH may cause trouble with some makes, so we remove $(srcdir),
27194 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27195 # trailing colons and then remove the whole line if VPATH becomes empty
27196 # (actually we leave an empty line to preserve line numbers).
27197 if test "x$srcdir" = x.; then
27198 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27199 s/:*\$(srcdir):*/:/;
27200 s/:*\${srcdir}:*/:/;
27201 s/:*@srcdir@:*/:/;
27202 s/^\([^=]*=[ ]*\):*/\1/;
27203 s/:*$//;
27204 s/^[^=]*=[ ]*$//;
27205 }'
27206 fi
27207
27208 # Transform confdefs.h into DEFS.
27209 # Protect against shell expansion while executing Makefile rules.
27210 # Protect against Makefile macro expansion.
27211 #
27212 # If the first sed substitution is executed (which looks for macros that
27213 # take arguments), then we branch to the quote section. Otherwise,
27214 # look for a macro that doesn't take arguments.
27215 cat >confdef2opt.sed <<\_ACEOF
27216 t clear
27217 : clear
27218 s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
27219 t quote
27220 s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
27221 t quote
27222 d
27223 : quote
27224 s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
27225 s,\[,\\&,g
27226 s,\],\\&,g
27227 s,\$,$$,g
27228 p
27229 _ACEOF
27230 # We use echo to avoid assuming a particular line-breaking character.
27231 # The extra dot is to prevent the shell from consuming trailing
27232 # line-breaks from the sub-command output. A line-break within
27233 # single-quotes doesn't work because, if this script is created in a
27234 # platform that uses two characters for line-breaks (e.g., DOS), tr
27235 # would break.
27236 ac_LF_and_DOT=`echo; echo .`
27237 DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
27238 rm -f confdef2opt.sed
27239
27240
27241 ac_libobjs=
27242 ac_ltlibobjs=
27243 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27244 # 1. Remove the extension, and $U if already installed.
27245 ac_i=`echo "$ac_i" |
27246 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
27247 # 2. Add them.
27248 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
27249 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
27250 done
27251 LIBOBJS=$ac_libobjs
27252
27253 LTLIBOBJS=$ac_ltlibobjs
27254
27255
27256
27257 : ${CONFIG_STATUS=./config.status}
27258 ac_clean_files_save=$ac_clean_files
27259 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
27260 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27261 echo "$as_me: creating $CONFIG_STATUS" >&6;}
27262 cat >$CONFIG_STATUS <<_ACEOF
27263 #! $SHELL
27264 # Generated by $as_me.
27265 # Run this file to recreate the current configuration.
27266 # Compiler output produced by configure, useful for debugging
27267 # configure, is in config.log if it exists.
27268
27269 debug=false
27270 ac_cs_recheck=false
27271 ac_cs_silent=false
27272 SHELL=\${CONFIG_SHELL-$SHELL}
27273 _ACEOF
27274
27275 cat >>$CONFIG_STATUS <<\_ACEOF
27276 ## --------------------- ##
27277 ## M4sh Initialization. ##
27278 ## --------------------- ##
27279
27280 # Be Bourne compatible
27281 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27282 emulate sh
27283 NULLCMD=:
27284 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
27285 # is contrary to our usage. Disable this feature.
27286 alias -g '${1+"$@"}'='"$@"'
27287 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27288 set -o posix
27289 fi
27290 DUALCASE=1; export DUALCASE # for MKS sh
27291
27292 # Support unset when possible.
27293 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27294 as_unset=unset
27295 else
27296 as_unset=false
27297 fi
27298
27299
27300 # Work around bugs in pre-3.0 UWIN ksh.
27301 $as_unset ENV MAIL MAILPATH
27302 PS1='$ '
27303 PS2='> '
27304 PS4='+ '
27305
27306 # NLS nuisances.
27307 for as_var in \
27308 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27309 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27310 LC_TELEPHONE LC_TIME
27311 do
27312 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27313 eval $as_var=C; export $as_var
27314 else
27315 $as_unset $as_var
27316 fi
27317 done
27318
27319 # Required to use basename.
27320 if expr a : '\(a\)' >/dev/null 2>&1; then
27321 as_expr=expr
27322 else
27323 as_expr=false
27324 fi
27325
27326 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
27327 as_basename=basename
27328 else
27329 as_basename=false
27330 fi
27331
27332
27333 # Name of the executable.
27334 as_me=`$as_basename "$0" ||
27335 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27336 X"$0" : 'X\(//\)$' \| \
27337 X"$0" : 'X\(/\)$' \| \
27338 . : '\(.\)' 2>/dev/null ||
27339 echo X/"$0" |
27340 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
27341 /^X\/\(\/\/\)$/{ s//\1/; q; }
27342 /^X\/\(\/\).*/{ s//\1/; q; }
27343 s/.*/./; q'`
27344
27345
27346 # PATH needs CR, and LINENO needs CR and PATH.
27347 # Avoid depending upon Character Ranges.
27348 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27349 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27350 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27351 as_cr_digits='0123456789'
27352 as_cr_alnum=$as_cr_Letters$as_cr_digits
27353
27354 # The user is always right.
27355 if test "${PATH_SEPARATOR+set}" != set; then
27356 echo "#! /bin/sh" >conf$$.sh
27357 echo "exit 0" >>conf$$.sh
27358 chmod +x conf$$.sh
27359 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27360 PATH_SEPARATOR=';'
27361 else
27362 PATH_SEPARATOR=:
27363 fi
27364 rm -f conf$$.sh
27365 fi
27366
27367
27368 as_lineno_1=$LINENO
27369 as_lineno_2=$LINENO
27370 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
27371 test "x$as_lineno_1" != "x$as_lineno_2" &&
27372 test "x$as_lineno_3" = "x$as_lineno_2" || {
27373 # Find who we are. Look in the path if we contain no path at all
27374 # relative or not.
27375 case $0 in
27376 *[\\/]* ) as_myself=$0 ;;
27377 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27378 for as_dir in $PATH
27379 do
27380 IFS=$as_save_IFS
27381 test -z "$as_dir" && as_dir=.
27382 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27383 done
27384
27385 ;;
27386 esac
27387 # We did not find ourselves, most probably we were run as `sh COMMAND'
27388 # in which case we are not to be found in the path.
27389 if test "x$as_myself" = x; then
27390 as_myself=$0
27391 fi
27392 if test ! -f "$as_myself"; then
27393 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
27394 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
27395 { (exit 1); exit 1; }; }
27396 fi
27397 case $CONFIG_SHELL in
27398 '')
27399 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27400 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
27401 do
27402 IFS=$as_save_IFS
27403 test -z "$as_dir" && as_dir=.
27404 for as_base in sh bash ksh sh5; do
27405 case $as_dir in
27406 /*)
27407 if ("$as_dir/$as_base" -c '
27408 as_lineno_1=$LINENO
27409 as_lineno_2=$LINENO
27410 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
27411 test "x$as_lineno_1" != "x$as_lineno_2" &&
27412 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
27413 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
27414 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
27415 CONFIG_SHELL=$as_dir/$as_base
27416 export CONFIG_SHELL
27417 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
27418 fi;;
27419 esac
27420 done
27421 done
27422 ;;
27423 esac
27424
27425 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27426 # uniformly replaced by the line number. The first 'sed' inserts a
27427 # line-number line before each line; the second 'sed' does the real
27428 # work. The second script uses 'N' to pair each line-number line
27429 # with the numbered line, and appends trailing '-' during
27430 # substitution so that $LINENO is not a special case at line end.
27431 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
27432 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
27433 sed '=' <$as_myself |
27434 sed '
27435 N
27436 s,$,-,
27437 : loop
27438 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
27439 t loop
27440 s,-$,,
27441 s,^['$as_cr_digits']*\n,,
27442 ' >$as_me.lineno &&
27443 chmod +x $as_me.lineno ||
27444 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
27445 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
27446 { (exit 1); exit 1; }; }
27447
27448 # Don't try to exec as it changes $[0], causing all sort of problems
27449 # (the dirname of $[0] is not the place where we might find the
27450 # original and so on. Autoconf is especially sensible to this).
27451 . ./$as_me.lineno
27452 # Exit status is that of the last command.
27453 exit
27454 }
27455
27456
27457 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
27458 *c*,-n*) ECHO_N= ECHO_C='
27459 ' ECHO_T=' ' ;;
27460 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
27461 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
27462 esac
27463
27464 if expr a : '\(a\)' >/dev/null 2>&1; then
27465 as_expr=expr
27466 else
27467 as_expr=false
27468 fi
27469
27470 rm -f conf$$ conf$$.exe conf$$.file
27471 echo >conf$$.file
27472 if ln -s conf$$.file conf$$ 2>/dev/null; then
27473 # We could just check for DJGPP; but this test a) works b) is more generic
27474 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
27475 if test -f conf$$.exe; then
27476 # Don't use ln at all; we don't have any links
27477 as_ln_s='cp -p'
27478 else
27479 as_ln_s='ln -s'
27480 fi
27481 elif ln conf$$.file conf$$ 2>/dev/null; then
27482 as_ln_s=ln
27483 else
27484 as_ln_s='cp -p'
27485 fi
27486 rm -f conf$$ conf$$.exe conf$$.file
27487
27488 if mkdir -p . 2>/dev/null; then
27489 as_mkdir_p=:
27490 else
27491 test -d ./-p && rmdir ./-p
27492 as_mkdir_p=false
27493 fi
27494
27495 as_executable_p="test -f"
27496
27497 # Sed expression to map a string onto a valid CPP name.
27498 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
27499
27500 # Sed expression to map a string onto a valid variable name.
27501 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
27502
27503
27504 # IFS
27505 # We need space, tab and new line, in precisely that order.
27506 as_nl='
27507 '
27508 IFS=" $as_nl"
27509
27510 # CDPATH.
27511 $as_unset CDPATH
27512
27513 exec 6>&1
27514
27515 # Open the log real soon, to keep \$[0] and so on meaningful, and to
27516 # report actual input values of CONFIG_FILES etc. instead of their
27517 # values after options handling. Logging --version etc. is OK.
27518 exec 5>>config.log
27519 {
27520 echo
27521 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27522 ## Running $as_me. ##
27523 _ASBOX
27524 } >&5
27525 cat >&5 <<_CSEOF
27526
27527 This file was extended by $as_me, which was
27528 generated by GNU Autoconf 2.59. Invocation command line was
27529
27530 CONFIG_FILES = $CONFIG_FILES
27531 CONFIG_HEADERS = $CONFIG_HEADERS
27532 CONFIG_LINKS = $CONFIG_LINKS
27533 CONFIG_COMMANDS = $CONFIG_COMMANDS
27534 $ $0 $@
27535
27536 _CSEOF
27537 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
27538 echo >&5
27539 _ACEOF
27540
27541 # Files that config.status was made for.
27542 if test -n "$ac_config_files"; then
27543 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
27544 fi
27545
27546 if test -n "$ac_config_headers"; then
27547 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
27548 fi
27549
27550 if test -n "$ac_config_links"; then
27551 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
27552 fi
27553
27554 if test -n "$ac_config_commands"; then
27555 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
27556 fi
27557
27558 cat >>$CONFIG_STATUS <<\_ACEOF
27559
27560 ac_cs_usage="\
27561 \`$as_me' instantiates files from templates according to the
27562 current configuration.
27563
27564 Usage: $0 [OPTIONS] [FILE]...
27565
27566 -h, --help print this help, then exit
27567 -V, --version print version number, then exit
27568 -q, --quiet do not print progress messages
27569 -d, --debug don't remove temporary files
27570 --recheck update $as_me by reconfiguring in the same conditions
27571 --file=FILE[:TEMPLATE]
27572 instantiate the configuration file FILE
27573
27574 Configuration files:
27575 $config_files
27576
27577 Configuration commands:
27578 $config_commands
27579
27580 Report bugs to <bug-autoconf@gnu.org>."
27581 _ACEOF
27582
27583 cat >>$CONFIG_STATUS <<_ACEOF
27584 ac_cs_version="\\
27585 config.status
27586 configured by $0, generated by GNU Autoconf 2.59,
27587 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
27588
27589 Copyright (C) 2003 Free Software Foundation, Inc.
27590 This config.status script is free software; the Free Software Foundation
27591 gives unlimited permission to copy, distribute and modify it."
27592 srcdir=$srcdir
27593 INSTALL="$INSTALL"
27594 _ACEOF
27595
27596 cat >>$CONFIG_STATUS <<\_ACEOF
27597 # If no file are specified by the user, then we need to provide default
27598 # value. By we need to know if files were specified by the user.
27599 ac_need_defaults=:
27600 while test $# != 0
27601 do
27602 case $1 in
27603 --*=*)
27604 ac_option=`expr "x$1" : 'x\([^=]*\)='`
27605 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
27606 ac_shift=:
27607 ;;
27608 -*)
27609 ac_option=$1
27610 ac_optarg=$2
27611 ac_shift=shift
27612 ;;
27613 *) # This is not an option, so the user has probably given explicit
27614 # arguments.
27615 ac_option=$1
27616 ac_need_defaults=false;;
27617 esac
27618
27619 case $ac_option in
27620 # Handling of the options.
27621 _ACEOF
27622 cat >>$CONFIG_STATUS <<\_ACEOF
27623 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27624 ac_cs_recheck=: ;;
27625 --version | --vers* | -V )
27626 echo "$ac_cs_version"; exit 0 ;;
27627 --he | --h)
27628 # Conflict between --help and --header
27629 { { echo "$as_me:$LINENO: error: ambiguous option: $1
27630 Try \`$0 --help' for more information." >&5
27631 echo "$as_me: error: ambiguous option: $1
27632 Try \`$0 --help' for more information." >&2;}
27633 { (exit 1); exit 1; }; };;
27634 --help | --hel | -h )
27635 echo "$ac_cs_usage"; exit 0 ;;
27636 --debug | --d* | -d )
27637 debug=: ;;
27638 --file | --fil | --fi | --f )
27639 $ac_shift
27640 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
27641 ac_need_defaults=false;;
27642 --header | --heade | --head | --hea )
27643 $ac_shift
27644 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
27645 ac_need_defaults=false;;
27646 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27647 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27648 ac_cs_silent=: ;;
27649
27650 # This is an error.
27651 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
27652 Try \`$0 --help' for more information." >&5
27653 echo "$as_me: error: unrecognized option: $1
27654 Try \`$0 --help' for more information." >&2;}
27655 { (exit 1); exit 1; }; } ;;
27656
27657 *) ac_config_targets="$ac_config_targets $1" ;;
27658
27659 esac
27660 shift
27661 done
27662
27663 ac_configure_extra_args=
27664
27665 if $ac_cs_silent; then
27666 exec 6>/dev/null
27667 ac_configure_extra_args="$ac_configure_extra_args --silent"
27668 fi
27669
27670 _ACEOF
27671 cat >>$CONFIG_STATUS <<_ACEOF
27672 if \$ac_cs_recheck; then
27673 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27674 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
27675 fi
27676
27677 _ACEOF
27678
27679 cat >>$CONFIG_STATUS <<_ACEOF
27680 #
27681 # INIT-COMMANDS section.
27682 #
27683
27684 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
27685 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
27686 # from automake.
27687 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
27688 # Capture the value of LINGUAS because we need it to compute CATALOGS.
27689 LINGUAS="${LINGUAS-%UNSET%}"
27690
27691
27692 _ACEOF
27693
27694
27695
27696 cat >>$CONFIG_STATUS <<\_ACEOF
27697 for ac_config_target in $ac_config_targets
27698 do
27699 case "$ac_config_target" in
27700 # Handling of arguments.
27701 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27702 "libhdate.spec" ) CONFIG_FILES="$CONFIG_FILES libhdate.spec" ;;
27703 "libhdate.pc" ) CONFIG_FILES="$CONFIG_FILES libhdate.pc" ;;
27704 "intl/Makefile" ) CONFIG_FILES="$CONFIG_FILES intl/Makefile" ;;
27705 "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
27706 "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
27707 "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
27708 "examples/hcal/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/hcal/Makefile" ;;
27709 "examples/ical/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/ical/Makefile" ;;
27710 "examples/html/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/html/Makefile" ;;
27711 "examples/hebcal/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/hebcal/Makefile" ;;
27712 "examples/bindings/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/bindings/Makefile" ;;
27713 "bindings/Makefile" ) CONFIG_FILES="$CONFIG_FILES bindings/Makefile" ;;
27714 "bindings/python/Makefile" ) CONFIG_FILES="$CONFIG_FILES bindings/python/Makefile" ;;
27715 "bindings/perl/Makefile" ) CONFIG_FILES="$CONFIG_FILES bindings/perl/Makefile" ;;
27716 "bindings/pascal/Makefile" ) CONFIG_FILES="$CONFIG_FILES bindings/pascal/Makefile" ;;
27717 "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
27718 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27719 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
27720 { (exit 1); exit 1; }; };;
27721 esac
27722 done
27723
27724 # If the user did not use the arguments to specify the items to instantiate,
27725 # then the envvar interface is used. Set only those that are not.
27726 # We use the long form for the default assignment because of an extremely
27727 # bizarre bug on SunOS 4.1.3.
27728 if $ac_need_defaults; then
27729 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27730 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27731 fi
27732
27733 # Have a temporary directory for convenience. Make it in the build tree
27734 # simply because there is no reason to put it here, and in addition,
27735 # creating and moving files from /tmp can sometimes cause problems.
27736 # Create a temporary directory, and hook for its removal unless debugging.
27737 $debug ||
27738 {
27739 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
27740 trap '{ (exit 1); exit 1; }' 1 2 13 15
27741 }
27742
27743 # Create a (secure) tmp directory for tmp files.
27744
27745 {
27746 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
27747 test -n "$tmp" && test -d "$tmp"
27748 } ||
27749 {
27750 tmp=./confstat$$-$RANDOM
27751 (umask 077 && mkdir $tmp)
27752 } ||
27753 {
27754 echo "$me: cannot create a temporary directory in ." >&2
27755 { (exit 1); exit 1; }
27756 }
27757
27758 _ACEOF
27759
27760 cat >>$CONFIG_STATUS <<_ACEOF
27761
27762 #
27763 # CONFIG_FILES section.
27764 #
27765
27766 # No need to generate the scripts if there are no CONFIG_FILES.
27767 # This happens for instance when ./config.status config.h
27768 if test -n "\$CONFIG_FILES"; then
27769 # Protect against being on the right side of a sed subst in config.status.
27770 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
27771 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
27772 s,@SHELL@,$SHELL,;t t
27773 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
27774 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
27775 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
27776 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
27777 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
27778 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
27779 s,@exec_prefix@,$exec_prefix,;t t
27780 s,@prefix@,$prefix,;t t
27781 s,@program_transform_name@,$program_transform_name,;t t
27782 s,@bindir@,$bindir,;t t
27783 s,@sbindir@,$sbindir,;t t
27784 s,@libexecdir@,$libexecdir,;t t
27785 s,@datadir@,$datadir,;t t
27786 s,@sysconfdir@,$sysconfdir,;t t
27787 s,@sharedstatedir@,$sharedstatedir,;t t
27788 s,@localstatedir@,$localstatedir,;t t
27789 s,@libdir@,$libdir,;t t
27790 s,@includedir@,$includedir,;t t
27791 s,@oldincludedir@,$oldincludedir,;t t
27792 s,@infodir@,$infodir,;t t
27793 s,@mandir@,$mandir,;t t
27794 s,@build_alias@,$build_alias,;t t
27795 s,@host_alias@,$host_alias,;t t
27796 s,@target_alias@,$target_alias,;t t
27797 s,@DEFS@,$DEFS,;t t
27798 s,@ECHO_C@,$ECHO_C,;t t
27799 s,@ECHO_N@,$ECHO_N,;t t
27800 s,@ECHO_T@,$ECHO_T,;t t
27801 s,@LIBS@,$LIBS,;t t
27802 s,@VERSION_INFO@,$VERSION_INFO,;t t
27803 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
27804 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
27805 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
27806 s,@PACKAGE@,$PACKAGE,;t t
27807 s,@VERSION@,$VERSION,;t t
27808 s,@ACLOCAL@,$ACLOCAL,;t t
27809 s,@AUTOCONF@,$AUTOCONF,;t t
27810 s,@AUTOMAKE@,$AUTOMAKE,;t t
27811 s,@AUTOHEADER@,$AUTOHEADER,;t t
27812 s,@MAKEINFO@,$MAKEINFO,;t t
27813 s,@SET_MAKE@,$SET_MAKE,;t t
27814 s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
27815 s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
27816 s,@MAINT@,$MAINT,;t t
27817 s,@CC@,$CC,;t t
27818 s,@CFLAGS@,$CFLAGS,;t t
27819 s,@LDFLAGS@,$LDFLAGS,;t t
27820 s,@CPPFLAGS@,$CPPFLAGS,;t t
27821 s,@ac_ct_CC@,$ac_ct_CC,;t t
27822 s,@EXEEXT@,$EXEEXT,;t t
27823 s,@OBJEXT@,$OBJEXT,;t t
27824 s,@LN_S@,$LN_S,;t t
27825 s,@CPP@,$CPP,;t t
27826 s,@EGREP@,$EGREP,;t t
27827 s,@build@,$build,;t t
27828 s,@build_cpu@,$build_cpu,;t t
27829 s,@build_vendor@,$build_vendor,;t t
27830 s,@build_os@,$build_os,;t t
27831 s,@host@,$host,;t t
27832 s,@host_cpu@,$host_cpu,;t t
27833 s,@host_vendor@,$host_vendor,;t t
27834 s,@host_os@,$host_os,;t t
27835 s,@ECHO@,$ECHO,;t t
27836 s,@AR@,$AR,;t t
27837 s,@ac_ct_AR@,$ac_ct_AR,;t t
27838 s,@RANLIB@,$RANLIB,;t t
27839 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
27840 s,@STRIP@,$STRIP,;t t
27841 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
27842 s,@CXX@,$CXX,;t t
27843 s,@CXXFLAGS@,$CXXFLAGS,;t t
27844 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
27845 s,@CXXCPP@,$CXXCPP,;t t
27846 s,@F77@,$F77,;t t
27847 s,@FFLAGS@,$FFLAGS,;t t
27848 s,@ac_ct_F77@,$ac_ct_F77,;t t
27849 s,@LIBTOOL@,$LIBTOOL,;t t
27850 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
27851 s,@have_swig@,$have_swig,;t t
27852 s,@have_pascal@,$have_pascal,;t t
27853 s,@PA_VERSION@,$PA_VERSION,;t t
27854 s,@PA_MODULES_PATH@,$PA_MODULES_PATH,;t t
27855 s,@WITH_PASCAL_TRUE@,$WITH_PASCAL_TRUE,;t t
27856 s,@WITH_PASCAL_FALSE@,$WITH_PASCAL_FALSE,;t t
27857 s,@have_python@,$have_python,;t t
27858 s,@PY_VERSION@,$PY_VERSION,;t t
27859 s,@PY_CFLAGS@,$PY_CFLAGS,;t t
27860 s,@PY_MODULES_PATH@,$PY_MODULES_PATH,;t t
27861 s,@WITH_PYTHON_TRUE@,$WITH_PYTHON_TRUE,;t t
27862 s,@WITH_PYTHON_FALSE@,$WITH_PYTHON_FALSE,;t t
27863 s,@have_perl@,$have_perl,;t t
27864 s,@PE_CFLAGS@,$PE_CFLAGS,;t t
27865 s,@PE_MODULES_PATH@,$PE_MODULES_PATH,;t t
27866 s,@WITH_PERL_TRUE@,$WITH_PERL_TRUE,;t t
27867 s,@WITH_PERL_FALSE@,$WITH_PERL_FALSE,;t t
27868 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
27869 s,@USE_NLS@,$USE_NLS,;t t
27870 s,@MSGFMT@,$MSGFMT,;t t
27871 s,@GMSGFMT@,$GMSGFMT,;t t
27872 s,@XGETTEXT@,$XGETTEXT,;t t
27873 s,@MSGMERGE@,$MSGMERGE,;t t
27874 s,@GLIBC2@,$GLIBC2,;t t
27875 s,@ALLOCA@,$ALLOCA,;t t
27876 s,@GLIBC21@,$GLIBC21,;t t
27877 s,@INTL_MACOSX_LIBS@,$INTL_MACOSX_LIBS,;t t
27878 s,@HAVE_POSIX_PRINTF@,$HAVE_POSIX_PRINTF,;t t
27879 s,@HAVE_ASPRINTF@,$HAVE_ASPRINTF,;t t
27880 s,@HAVE_SNPRINTF@,$HAVE_SNPRINTF,;t t
27881 s,@HAVE_WPRINTF@,$HAVE_WPRINTF,;t t
27882 s,@LIBICONV@,$LIBICONV,;t t
27883 s,@LTLIBICONV@,$LTLIBICONV,;t t
27884 s,@INTLBISON@,$INTLBISON,;t t
27885 s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t
27886 s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
27887 s,@CATOBJEXT@,$CATOBJEXT,;t t
27888 s,@DATADIRNAME@,$DATADIRNAME,;t t
27889 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
27890 s,@GENCAT@,$GENCAT,;t t
27891 s,@INTLOBJS@,$INTLOBJS,;t t
27892 s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t
27893 s,@INTLLIBS@,$INTLLIBS,;t t
27894 s,@LIBINTL@,$LIBINTL,;t t
27895 s,@LTLIBINTL@,$LTLIBINTL,;t t
27896 s,@POSUB@,$POSUB,;t t
27897 s,@WITH_EXAMPLES_TRUE@,$WITH_EXAMPLES_TRUE,;t t
27898 s,@WITH_EXAMPLES_FALSE@,$WITH_EXAMPLES_FALSE,;t t
27899 s,@WITH_HCAL_TRUE@,$WITH_HCAL_TRUE,;t t
27900 s,@WITH_HCAL_FALSE@,$WITH_HCAL_FALSE,;t t
27901 s,@LIBOBJS@,$LIBOBJS,;t t
27902 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
27903 CEOF
27904
27905 _ACEOF
27906
27907 cat >>$CONFIG_STATUS <<\_ACEOF
27908 # Split the substitutions into bite-sized pieces for seds with
27909 # small command number limits, like on Digital OSF/1 and HP-UX.
27910 ac_max_sed_lines=48
27911 ac_sed_frag=1 # Number of current file.
27912 ac_beg=1 # First line for current file.
27913 ac_end=$ac_max_sed_lines # Line after last line for current file.
27914 ac_more_lines=:
27915 ac_sed_cmds=
27916 while $ac_more_lines; do
27917 if test $ac_beg -gt 1; then
27918 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27919 else
27920 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27921 fi
27922 if test ! -s $tmp/subs.frag; then
27923 ac_more_lines=false
27924 else
27925 # The purpose of the label and of the branching condition is to
27926 # speed up the sed processing (if there are no `@' at all, there
27927 # is no need to browse any of the substitutions).
27928 # These are the two extra sed commands mentioned above.
27929 (echo ':t
27930 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
27931 if test -z "$ac_sed_cmds"; then
27932 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
27933 else
27934 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
27935 fi
27936 ac_sed_frag=`expr $ac_sed_frag + 1`
27937 ac_beg=$ac_end
27938 ac_end=`expr $ac_end + $ac_max_sed_lines`
27939 fi
27940 done
27941 if test -z "$ac_sed_cmds"; then
27942 ac_sed_cmds=cat
27943 fi
27944 fi # test -n "$CONFIG_FILES"
27945
27946 _ACEOF
27947 cat >>$CONFIG_STATUS <<\_ACEOF
27948 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
27949 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27950 case $ac_file in
27951 - | *:- | *:-:* ) # input from stdin
27952 cat >$tmp/stdin
27953 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27954 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27955 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27956 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27957 * ) ac_file_in=$ac_file.in ;;
27958 esac
27959
27960 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
27961 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
27962 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27963 X"$ac_file" : 'X\(//\)[^/]' \| \
27964 X"$ac_file" : 'X\(//\)$' \| \
27965 X"$ac_file" : 'X\(/\)' \| \
27966 . : '\(.\)' 2>/dev/null ||
27967 echo X"$ac_file" |
27968 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27969 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27970 /^X\(\/\/\)$/{ s//\1/; q; }
27971 /^X\(\/\).*/{ s//\1/; q; }
27972 s/.*/./; q'`
27973 { if $as_mkdir_p; then
27974 mkdir -p "$ac_dir"
27975 else
27976 as_dir="$ac_dir"
27977 as_dirs=
27978 while test ! -d "$as_dir"; do
27979 as_dirs="$as_dir $as_dirs"
27980 as_dir=`(dirname "$as_dir") 2>/dev/null ||
27981 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27982 X"$as_dir" : 'X\(//\)[^/]' \| \
27983 X"$as_dir" : 'X\(//\)$' \| \
27984 X"$as_dir" : 'X\(/\)' \| \
27985 . : '\(.\)' 2>/dev/null ||
27986 echo X"$as_dir" |
27987 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27988 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27989 /^X\(\/\/\)$/{ s//\1/; q; }
27990 /^X\(\/\).*/{ s//\1/; q; }
27991 s/.*/./; q'`
27992 done
27993 test ! -n "$as_dirs" || mkdir $as_dirs
27994 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
27995 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
27996 { (exit 1); exit 1; }; }; }
27997
27998 ac_builddir=.
27999
28000 if test "$ac_dir" != .; then
28001 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
28002 # A "../" for each directory in $ac_dir_suffix.
28003 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
28004 else
28005 ac_dir_suffix= ac_top_builddir=
28006 fi
28007
28008 case $srcdir in
28009 .) # No --srcdir option. We are building in place.
28010 ac_srcdir=.
28011 if test -z "$ac_top_builddir"; then
28012 ac_top_srcdir=.
28013 else
28014 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
28015 fi ;;
28016 [\\/]* | ?:[\\/]* ) # Absolute path.
28017 ac_srcdir=$srcdir$ac_dir_suffix;
28018 ac_top_srcdir=$srcdir ;;
28019 *) # Relative path.
28020 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
28021 ac_top_srcdir=$ac_top_builddir$srcdir ;;
28022 esac
28023
28024 # Do not use `cd foo && pwd` to compute absolute paths, because
28025 # the directories may not exist.
28026 case `pwd` in
28027 .) ac_abs_builddir="$ac_dir";;
28028 *)
28029 case "$ac_dir" in
28030 .) ac_abs_builddir=`pwd`;;
28031 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
28032 *) ac_abs_builddir=`pwd`/"$ac_dir";;
28033 esac;;
28034 esac
28035 case $ac_abs_builddir in
28036 .) ac_abs_top_builddir=${ac_top_builddir}.;;
28037 *)
28038 case ${ac_top_builddir}. in
28039 .) ac_abs_top_builddir=$ac_abs_builddir;;
28040 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
28041 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
28042 esac;;
28043 esac
28044 case $ac_abs_builddir in
28045 .) ac_abs_srcdir=$ac_srcdir;;
28046 *)
28047 case $ac_srcdir in
28048 .) ac_abs_srcdir=$ac_abs_builddir;;
28049 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
28050 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
28051 esac;;
28052 esac
28053 case $ac_abs_builddir in
28054 .) ac_abs_top_srcdir=$ac_top_srcdir;;
28055 *)
28056 case $ac_top_srcdir in
28057 .) ac_abs_top_srcdir=$ac_abs_builddir;;
28058 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
28059 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
28060 esac;;
28061 esac
28062
28063
28064 case $INSTALL in
28065 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
28066 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
28067 esac
28068
28069 # Let's still pretend it is `configure' which instantiates (i.e., don't
28070 # use $as_me), people would be surprised to read:
28071 # /* config.h. Generated by config.status. */
28072 if test x"$ac_file" = x-; then
28073 configure_input=
28074 else
28075 configure_input="$ac_file. "
28076 fi
28077 configure_input=$configure_input"Generated from `echo $ac_file_in |
28078 sed 's,.*/,,'` by configure."
28079
28080 # First look for the input files in the build tree, otherwise in the
28081 # src tree.
28082 ac_file_inputs=`IFS=:
28083 for f in $ac_file_in; do
28084 case $f in
28085 -) echo $tmp/stdin ;;
28086 [\\/$]*)
28087 # Absolute (can't be DOS-style, as IFS=:)
28088 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
28089 echo "$as_me: error: cannot find input file: $f" >&2;}
28090 { (exit 1); exit 1; }; }
28091 echo "$f";;
28092 *) # Relative
28093 if test -f "$f"; then
28094 # Build tree
28095 echo "$f"
28096 elif test -f "$srcdir/$f"; then
28097 # Source tree
28098 echo "$srcdir/$f"
28099 else
28100 # /dev/null tree
28101 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
28102 echo "$as_me: error: cannot find input file: $f" >&2;}
28103 { (exit 1); exit 1; }; }
28104 fi;;
28105 esac
28106 done` || { (exit 1); exit 1; }
28107
28108 if test x"$ac_file" != x-; then
28109 { echo "$as_me:$LINENO: creating $ac_file" >&5
28110 echo "$as_me: creating $ac_file" >&6;}
28111 rm -f "$ac_file"
28112 fi
28113 _ACEOF
28114 cat >>$CONFIG_STATUS <<_ACEOF
28115 sed "$ac_vpsub
28116 $extrasub
28117 _ACEOF
28118 cat >>$CONFIG_STATUS <<\_ACEOF
28119 :t
28120 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
28121 s,@configure_input@,$configure_input,;t t
28122 s,@srcdir@,$ac_srcdir,;t t
28123 s,@abs_srcdir@,$ac_abs_srcdir,;t t
28124 s,@top_srcdir@,$ac_top_srcdir,;t t
28125 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
28126 s,@builddir@,$ac_builddir,;t t
28127 s,@abs_builddir@,$ac_abs_builddir,;t t
28128 s,@top_builddir@,$ac_top_builddir,;t t
28129 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
28130 s,@INSTALL@,$ac_INSTALL,;t t
28131 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
28132 rm -f $tmp/stdin
28133 if test x"$ac_file" != x-; then
28134 mv $tmp/out $ac_file
28135 else
28136 cat $tmp/out
28137 rm -f $tmp/out
28138 fi
28139
28140 done
28141 _ACEOF
28142 cat >>$CONFIG_STATUS <<\_ACEOF
28143
28144 #
28145 # CONFIG_COMMANDS section.
28146 #
28147 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
28148 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
28149 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
28150 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
28151 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28152 X"$ac_dest" : 'X\(//\)[^/]' \| \
28153 X"$ac_dest" : 'X\(//\)$' \| \
28154 X"$ac_dest" : 'X\(/\)' \| \
28155 . : '\(.\)' 2>/dev/null ||
28156 echo X"$ac_dest" |
28157 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
28158 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
28159 /^X\(\/\/\)$/{ s//\1/; q; }
28160 /^X\(\/\).*/{ s//\1/; q; }
28161 s/.*/./; q'`
28162 { if $as_mkdir_p; then
28163 mkdir -p "$ac_dir"
28164 else
28165 as_dir="$ac_dir"
28166 as_dirs=
28167 while test ! -d "$as_dir"; do
28168 as_dirs="$as_dir $as_dirs"
28169 as_dir=`(dirname "$as_dir") 2>/dev/null ||
28170 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28171 X"$as_dir" : 'X\(//\)[^/]' \| \
28172 X"$as_dir" : 'X\(//\)$' \| \
28173 X"$as_dir" : 'X\(/\)' \| \
28174 . : '\(.\)' 2>/dev/null ||
28175 echo X"$as_dir" |
28176 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
28177 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
28178 /^X\(\/\/\)$/{ s//\1/; q; }
28179 /^X\(\/\).*/{ s//\1/; q; }
28180 s/.*/./; q'`
28181 done
28182 test ! -n "$as_dirs" || mkdir $as_dirs
28183 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
28184 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
28185 { (exit 1); exit 1; }; }; }
28186
28187 ac_builddir=.
28188
28189 if test "$ac_dir" != .; then
28190 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
28191 # A "../" for each directory in $ac_dir_suffix.
28192 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
28193 else
28194 ac_dir_suffix= ac_top_builddir=
28195 fi
28196
28197 case $srcdir in
28198 .) # No --srcdir option. We are building in place.
28199 ac_srcdir=.
28200 if test -z "$ac_top_builddir"; then
28201 ac_top_srcdir=.
28202 else
28203 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
28204 fi ;;
28205 [\\/]* | ?:[\\/]* ) # Absolute path.
28206 ac_srcdir=$srcdir$ac_dir_suffix;
28207 ac_top_srcdir=$srcdir ;;
28208 *) # Relative path.
28209 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
28210 ac_top_srcdir=$ac_top_builddir$srcdir ;;
28211 esac
28212
28213 # Do not use `cd foo && pwd` to compute absolute paths, because
28214 # the directories may not exist.
28215 case `pwd` in
28216 .) ac_abs_builddir="$ac_dir";;
28217 *)
28218 case "$ac_dir" in
28219 .) ac_abs_builddir=`pwd`;;
28220 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
28221 *) ac_abs_builddir=`pwd`/"$ac_dir";;
28222 esac;;
28223 esac
28224 case $ac_abs_builddir in
28225 .) ac_abs_top_builddir=${ac_top_builddir}.;;
28226 *)
28227 case ${ac_top_builddir}. in
28228 .) ac_abs_top_builddir=$ac_abs_builddir;;
28229 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
28230 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
28231 esac;;
28232 esac
28233 case $ac_abs_builddir in
28234 .) ac_abs_srcdir=$ac_srcdir;;
28235 *)
28236 case $ac_srcdir in
28237 .) ac_abs_srcdir=$ac_abs_builddir;;
28238 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
28239 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
28240 esac;;
28241 esac
28242 case $ac_abs_builddir in
28243 .) ac_abs_top_srcdir=$ac_top_srcdir;;
28244 *)
28245 case $ac_top_srcdir in
28246 .) ac_abs_top_srcdir=$ac_abs_builddir;;
28247 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
28248 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
28249 esac;;
28250 esac
28251
28252
28253 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
28254 echo "$as_me: executing $ac_dest commands" >&6;}
28255 case $ac_dest in
28256 default-1 )
28257 for ac_file in $CONFIG_FILES; do
28258 # Support "outfile[:infile[:infile...]]"
28259 case "$ac_file" in
28260 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
28261 esac
28262 # PO directories have a Makefile.in generated from Makefile.in.in.
28263 case "$ac_file" in */Makefile.in)
28264 # Adjust a relative srcdir.
28265 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
28266 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
28267 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
28268 # In autoconf-2.13 it is called $ac_given_srcdir.
28269 # In autoconf-2.50 it is called $srcdir.
28270 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
28271 case "$ac_given_srcdir" in
28272 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
28273 /*) top_srcdir="$ac_given_srcdir" ;;
28274 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
28275 esac
28276 # Treat a directory as a PO directory if and only if it has a
28277 # POTFILES.in file. This allows packages to have multiple PO
28278 # directories under different names or in different locations.
28279 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
28280 rm -f "$ac_dir/POTFILES"
28281 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
28282 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
28283 POMAKEFILEDEPS="POTFILES.in"
28284 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
28285 # on $ac_dir but don't depend on user-specified configuration
28286 # parameters.
28287 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
28288 # The LINGUAS file contains the set of available languages.
28289 if test -n "$OBSOLETE_ALL_LINGUAS"; then
28290 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
28291 fi
28292 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
28293 # Hide the ALL_LINGUAS assigment from automake.
28294 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
28295 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
28296 else
28297 # The set of available languages was given in configure.in.
28298 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
28299 fi
28300 # Compute POFILES
28301 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
28302 # Compute UPDATEPOFILES
28303 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
28304 # Compute DUMMYPOFILES
28305 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
28306 # Compute GMOFILES
28307 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
28308 case "$ac_given_srcdir" in
28309 .) srcdirpre= ;;
28310 *) srcdirpre='$(srcdir)/' ;;
28311 esac
28312 POFILES=
28313 UPDATEPOFILES=
28314 DUMMYPOFILES=
28315 GMOFILES=
28316 for lang in $ALL_LINGUAS; do
28317 POFILES="$POFILES $srcdirpre$lang.po"
28318 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
28319 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
28320 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
28321 done
28322 # CATALOGS depends on both $ac_dir and the user's LINGUAS
28323 # environment variable.
28324 INST_LINGUAS=
28325 if test -n "$ALL_LINGUAS"; then
28326 for presentlang in $ALL_LINGUAS; do
28327 useit=no
28328 if test "%UNSET%" != "$LINGUAS"; then
28329 desiredlanguages="$LINGUAS"
28330 else
28331 desiredlanguages="$ALL_LINGUAS"
28332 fi
28333 for desiredlang in $desiredlanguages; do
28334 # Use the presentlang catalog if desiredlang is
28335 # a. equal to presentlang, or
28336 # b. a variant of presentlang (because in this case,
28337 # presentlang can be used as a fallback for messages
28338 # which are not translated in the desiredlang catalog).
28339 case "$desiredlang" in
28340 "$presentlang"*) useit=yes;;
28341 esac
28342 done
28343 if test $useit = yes; then
28344 INST_LINGUAS="$INST_LINGUAS $presentlang"
28345 fi
28346 done
28347 fi
28348 CATALOGS=
28349 if test -n "$INST_LINGUAS"; then
28350 for lang in $INST_LINGUAS; do
28351 CATALOGS="$CATALOGS $lang.gmo"
28352 done
28353 fi
28354 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
28355 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"
28356 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
28357 if test -f "$f"; then
28358 case "$f" in
28359 *.orig | *.bak | *~) ;;
28360 *) cat "$f" >> "$ac_dir/Makefile" ;;
28361 esac
28362 fi
28363 done
28364 fi
28365 ;;
28366 esac
28367 done ;;
28368 esac
28369 done
28370 _ACEOF
28371
28372 cat >>$CONFIG_STATUS <<\_ACEOF
28373
28374 { (exit 0); exit 0; }
28375 _ACEOF
28376 chmod +x $CONFIG_STATUS
28377 ac_clean_files=$ac_clean_files_save
28378
28379
28380 # configure is writing to config.log, and then calls config.status.
28381 # config.status does its own redirection, appending to config.log.
28382 # Unfortunately, on DOS this fails, as config.log is still kept open
28383 # by configure, so config.status won't be able to write to it; its
28384 # output is simply discarded. So we exec the FD to /dev/null,
28385 # effectively closing config.log, so it can be properly (re)opened and
28386 # appended to by config.status. When coming back to configure, we
28387 # need to make the FD available again.
28388 if test "$no_create" != yes; then
28389 ac_cs_success=:
28390 ac_config_status_args=
28391 test "$silent" = yes &&
28392 ac_config_status_args="$ac_config_status_args --quiet"
28393 exec 5>/dev/null
28394 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
28395 exec 5>>config.log
28396 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28397 # would make configure fail if this is the last instruction.
28398 $ac_cs_success || { (exit 1); exit 1; }
28399 fi
28400
28401
28402 echo "
28403 $PACKAGE-$VERSION
28404
28405 prefix: ${prefix}
28406 compiler: ${CC}
28407
28408 have swig ${have_swig}
28409 have free pascal ${have_pascal}
28410 have python ${have_python}
28411 have perl ${have_perl}
28412
28413 build hcal ${build_hcal}
28414 build examples ${build_examples}
28415
28416 build python binding ${build_python}
28417 build perl binding ${build_perl}
28418 puild pascal binding ${build_pascal}
28419
28420 perl site lib path: $PE_MODULES_PATH
28421 python site lib path: $PY_MODULES_PATH
28422 pascal site lib path: $PA_MODULES_PATH
28423 "
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=2
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"
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/libhdate0/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/libhdate0/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 [ [ month ] year ]
15 .SH "DESCRIPTION"
16 .I Hcal
17 prints a calendar with both common and Hebrew dates for the
18 specified month, or the whole year if no month is specified.
19 If no arguments are given, it prints the current month.
20 Major holidays are marked by a `*', other holidays by a `+',
21 fast days by a `\-'.
22 .PP
23 If the year is greater than 3000,
24 .I hcal
25 takes the given date as a Hebrew date, and translates it
26 back to the common calendar.
27 Months are numbered with Tishrey being 1 and Elul 12; Adar I and Adar II are months 13 and 14.
28 .SH "SEE ALSO"
29 date(1), cal(1), hdate(1), hebcal(1), remind(1), hdate.h(3), hdate_struct(3)
30 .SH "AUTHOR"
31 Yaacov Zamir 2005, text copied from Amos Shapir's hdate man file.
0 /* hcal.c
1 * Example file for libhdate.
2 *
3 * compile:
4 * gcc `pkg-config --libs --cflags libhdate` hcal.c -o hcal
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 #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 #define FALSE 0
30 #define TRUE -1
31
32 int
33 print_header(int month, int year)
34 {
35 hdate_struct h1, h2;
36 int j;
37
38 /* set dates for begining and end of calendar */
39 hdate_set_gdate (&h1, 1, month, year);
40 hdate_set_gdate (&h2, 1, month % 12 + 1, year);
41
42 /* Print Gregorian month and year */
43 printf ("%s %d\n", hdate_get_month_string (h1.gd_mon, FALSE), h1.gd_year);
44
45 /* Print Hebrew month and year */
46 if (h1.hd_mon != h2.hd_mon)
47 {
48 printf ("%s-", hdate_get_hebrew_month_string (h1.hd_mon, FALSE));
49 }
50 printf ("%s %s\n", hdate_get_hebrew_month_string (h2.hd_mon, FALSE), hdate_get_int_string(h1.hd_year));
51
52 for (j=1; j<8; j++)
53 {
54 printf ("%3s", hdate_get_day_string (j, TRUE));
55
56 if (j != 7)
57 printf ("\t");
58 }
59
60 printf ("\n");
61
62 return 0;
63 }
64
65 int
66 print_calendar(int month, int year)
67 {
68 hdate_struct h;
69 int jd;
70 int i,j;
71 char type_char[] = {'/', '+', '*', '-'};
72 int holyday_type;
73
74 /* Find day to start calendar with */
75 hdate_set_gdate (&h, 1, month, year);
76
77 /* return print head to sunday */
78 jd = h.hd_jd - h.hd_dw + 1;
79
80 /* Loop over all days in this month */
81 for (i=0; i<6; i++)
82 {
83 for (j=0; j<7; j++)
84 {
85 /* Get this day hebrew date */
86 hdate_set_jd (&h, jd);
87
88 /* Get this day holyday type ba harez (diaspora flag = 0) */
89 holyday_type = hdate_get_holyday_type (hdate_get_holyday (&h, 0));
90
91 if (h.gd_mon == month)
92 {
93 /* Print a day */
94 printf ("%2d%c%3s", h.gd_day, type_char[holyday_type], hdate_get_int_string(h.hd_day));
95 }
96 if (j != 6)
97 printf ("\t");
98
99 jd++;
100 }
101 printf ("\n");
102 }
103
104 return 0;
105 }
106
107 int
108 print_month (int month, int year)
109 {
110 hdate_struct h;
111
112 /* check if hebrew year (year > 3000) */
113 if (year > 3000)
114 hdate_set_hdate (&h, 1, month, year);
115 else
116 hdate_set_gdate (&h, 1, month, year);
117
118 /* Print calendar header */
119 print_header (h.gd_mon, h.gd_year);
120 print_calendar (h.gd_mon, h.gd_year);
121
122 printf ("\n");
123
124 return 0;
125 }
126
127 int
128 main (int argc, char* argv[])
129 {
130 int month;
131 int year;
132 hdate_struct h;
133
134 /* Get date from user */
135 if (argc == 3)
136 {
137 month = atoi (argv[1]);
138 year = atoi (argv[2]);
139 }
140 else if (argc == 2)
141 {
142 month = 0;
143 year = atoi (argv[1]);
144
145 /* Check for valid years */
146 if (year < 1)
147 {
148 /* Print help for user and exit */
149 printf ("USAGE: %s [[month] year]\n", argv[0]);
150 exit (0);
151 }
152 }
153 else if (argc == 1)
154 {
155 hdate_set_gdate (&h, 0, 0, 0); /* get today's year */
156 month = h.gd_mon;
157 year = h.gd_year;
158 }
159 else
160 {
161 /* Print help for user and exit */
162 printf ("USAGE: %s [[month] year]\n", argv[0]);
163 exit (0);
164 }
165
166 /* Set the locale, for libhdate to print locale messages */
167 setlocale (LC_ALL,"");
168
169 /* print all year */
170 if (month == 0)
171 {
172 for (month = 1; month < 13; month++)
173 {
174 print_month (month, year);
175 }
176 }
177 else /* print only this month */
178 {
179 print_month (month, year);
180 }
181 return 0;
182 }
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 [\-sShdri]
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 \-S
36 : Print using short format.
37 .PP
38 .I \-h
39 : Print holidays.
40 .PP
41 .I \-r
42 : Print weekly reading on saturday.
43 .PP
44 .I \-d
45 : Use diaspora reading and holidays.
46 .PP
47 .I \-i
48 : Use iCal formated output.
49 .PP
50 .I \-l
51 xx : Set the latitude for solar calculations to
52 .PP
53 xx degrees. Negative values are south.
54 .PP
55 .I \-L
56 xx : Set the longitude for solar calculations to
57 .PP
58 xx degrees. *Negative values are EAST*.
59 .PP
60 .I \-z
61 : Use specified timezone.
62 .PP
63 ( default location for sunrise/set is Tel Aviv ).
64 .SH "SEE ALSO"
65 date(1), cal(1), hcal(1), hebcal(1), remind(1), hdate.h(3), hdate_struct(3)
66 .SH "AUTHOR"
67 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 (" -S : Print using short format.\n");
58 printf (" -h : Print holidays.\n");
59 printf (" -H : Print just holidays.\n");
60 printf (" -r : Print weekly reading on saturday.\n");
61 printf (" -R : Print just weekly reading on saturday.\n");
62
63 printf (" -d : Use diaspora reading and holidays.\n");
64 printf (" -i : Use iCal formated output.\n");
65 printf (" -l xx : Set the latitude for solar calculations to\n");
66 printf (" xx degrees. Negative values are south.\n");
67 printf (" -L xx : Set the longitude for solar calculations to\n");
68 printf (" xx degrees. *Negative values are EAST*.\n");
69 printf (" The -l and -L switches must both be used, or not at all.\n");
70 printf (" -z : Use specified timezone,\n");
71
72 printf (" ( default location for sunrise/set is Tel Aviv winter time ).\n");
73 printf (" some useful locations and time zones:\n");
74 printf (" Eilat : 29, -34, 2\n");
75 printf (" Haifa : 32, -34, 2\n");
76 printf (" Jerusalem : 31, -35, 2\n");
77 printf (" Tel Aviv : 32, -34, 2\n");
78
79 return 0;
80 }
81
82 /* print ical header */
83 int
84 print_ical_header ()
85 {
86 /* Print start of iCal format */
87 printf ("BEGIN:VCALENDAR\n");
88 printf ("VERSION:2.0\n");
89 printf ("CALSCALE:GREGORIAN\n");
90 printf ("METHOD:PUBLISH\n");
91
92 return 0;
93 }
94
95 /* print ical footer */
96 int
97 print_ical_footer ()
98 {
99 /* Print end of iCal format */
100 printf ("END:VCALENDAR\n");
101
102 return 0;
103 }
104
105 /* print one day - gregorian and hebrew date */
106 int
107 print_date (hdate_struct * h, int opt_S, int opt_i)
108 {
109 if (opt_i)
110 {
111 printf ("%s %s ",
112 hdate_get_int_string (h->hd_day),
113 hdate_get_hebrew_month_string (h->hd_mon, opt_S));
114 printf ("%s", hdate_get_int_string (h->hd_year));
115 }
116 else if (opt_S)
117 {
118 printf ("%d.%d.%d %s ",
119 h->gd_day, h->gd_mon, h->gd_year,
120 hdate_get_int_string (h->hd_day));
121 printf ("%s\n",
122 hdate_get_hebrew_month_string (h->hd_mon, opt_S));
123 }
124 else
125 {
126 printf ("%s, %d %s %d, ",
127 hdate_get_day_string (h->hd_dw, opt_S),
128 h->gd_day,
129 hdate_get_month_string (h->gd_mon, opt_S),
130 h->gd_year);
131 printf ("%s %s ",
132 hdate_get_int_string (h->hd_day),
133 hdate_get_hebrew_month_string (h->hd_mon, opt_S));
134 printf ("%s\n", hdate_get_int_string (h->hd_year));
135 }
136
137 return 0;
138 }
139
140 /* print one day - sunrise/set times */
141 int
142 print_sunrise (hdate_struct * h, double lat, double lon, int tz, int opt_i)
143 {
144 int sunrise, sunset;
145
146 /* get times */
147 hdate_get_utc_sun_time (h->gd_day, h->gd_mon, h->gd_year, lat, lon,
148 &sunrise, &sunset);
149
150 sunset = sunset + tz * 60;
151 sunrise = sunrise + tz * 60;
152
153 /* print sunset/rise times */
154 printf ("%d:%d - %d:%d ",
155 sunrise / 60, sunrise % 60, sunset / 60, sunset % 60);
156
157 return 0;
158 }
159
160 /* print one day - holiday */
161 int
162 print_holiday (hdate_struct * h, int opt_d, int opt_S, int opt_i)
163 {
164 int holyday;
165
166 holyday = hdate_get_holyday (h, opt_d);
167
168 if (holyday)
169 {
170 /* print holyday */
171 printf ("%s ", hdate_get_holyday_string (holyday, opt_S));
172 }
173
174 return 0;
175 }
176
177 /* print one day - reading */
178 int
179 print_reading (hdate_struct * h, int opt_d, int opt_S, int opt_i)
180 {
181 int reading;
182
183 reading = hdate_get_parasha (h, opt_d);
184
185 if (reading)
186 {
187 /* print parash */
188 printf ("%s", hdate_get_parasha_string (reading, opt_S));
189 }
190
191 return 0;
192 }
193
194 /* print one day - all */
195 int
196 print_day (hdate_struct * h,
197 int opt_d, int opt_S,
198 double lat, double lon, int tz, int opt_s, int opt_h, int opt_r,
199 int opt_R, int opt_H, int opt_i)
200 {
201 /* check for just parasha or holiday flag */
202 if (opt_R && opt_H &&
203 !hdate_get_parasha (h, opt_d) && !hdate_get_holyday (h, opt_d))
204 return 0;
205 if (opt_R && !opt_H && !hdate_get_parasha (h, opt_d))
206 return 0;
207 if (opt_H && !opt_R && !hdate_get_holyday (h, opt_d))
208 return 0;
209
210 /* check for iCal format */
211 if (opt_i)
212 {
213 print_ical_header ();
214
215 printf ("BEGIN:VEVENT\n");
216 printf ("UID:%d\n", ++iCal_uid_counter);
217 printf ("DTSTART;VALUE=DATE:%04d%02d%02d\n", h->gd_year,
218 h->gd_mon, h->gd_day);
219 printf ("SUMMARY:");
220 }
221
222 /* print the day */
223 print_date (h, opt_S, opt_i);
224
225 /* check for iCal format */
226 if (opt_i &&
227 (((opt_h && hdate_get_holyday (h, opt_d)) ||
228 (opt_r && hdate_get_parasha (h, opt_d))) || opt_s))
229 printf ("\\, ");
230
231 if (opt_s)
232 {
233 print_sunrise (h, lat, lon, tz, opt_i);
234
235 if (!opt_i && ((opt_h && hdate_get_holyday (h, opt_d)) ||
236 (opt_r && hdate_get_parasha (h, opt_d))))
237 printf (", ");
238 if (opt_i && ((opt_h && hdate_get_holyday (h, opt_d)) ||
239 (opt_r && hdate_get_parasha (h, opt_d))))
240 printf ("\\, ");
241 }
242 if (opt_h)
243 {
244 print_holiday (h, opt_d, opt_S, opt_i);
245
246 if (!opt_i && (opt_r && hdate_get_parasha (h, opt_d)
247 && hdate_get_holyday (h, opt_d)))
248 printf (", ");
249 if (opt_i && (opt_r && hdate_get_parasha (h, opt_d)
250 && hdate_get_holyday (h, opt_d)))
251 printf ("\\, ");
252 }
253 if (opt_r)
254 {
255 print_reading (h, opt_d, opt_S, opt_i);
256 }
257
258 if (opt_r || opt_h || opt_s || opt_i)
259 {
260 printf ("\n");
261 }
262
263 /* check for iCal format */
264 if (opt_i)
265 {
266 printf ("CLASS:PUBLIC\n");
267 printf ("DTEND;VALUE=DATE:%04d%02d%02d\n", h->gd_year,
268 h->gd_mon, h->gd_day);
269 printf ("CATEGORIES:Holidays\n");
270 printf ("END:VEVENT\n");
271
272 print_ical_footer ();
273 }
274
275 return 0;
276 }
277
278 /* print one month - all */
279 int
280 print_month (int opt_d, int opt_S,
281 double lat, double lon, int tz,
282 int opt_s, int opt_h, int opt_r, int opt_R, int opt_H, int opt_i,
283 int month, int year)
284 {
285 hdate_struct h;
286 int jd;
287
288 /* get date of month start */
289 hdate_set_gdate (&h, 1, month, year);
290 jd = h.hd_jd;
291
292 /* print month header */
293 if (!opt_i)
294 printf ("\n%s:\n", hdate_get_month_string (h.gd_mon, opt_S));
295
296 /* print month days */
297 while (h.gd_mon == month)
298 {
299 print_day (&h, opt_d, opt_S, lat, lon, tz, opt_s, opt_h,
300 opt_r, opt_R, opt_H, opt_i);
301
302 jd++;
303 hdate_set_jd (&h, jd);
304 }
305
306 return 0;
307 }
308
309 /* print one hebrew month - all */
310 int
311 print_hebrew_month (int opt_d, int opt_S,
312 double lat, double lon, int tz,
313 int opt_s, int opt_h, int opt_r, int opt_R, int opt_H,
314 int opt_i, int month, int year)
315 {
316 hdate_struct h;
317 int jd;
318
319 /* get date of month start */
320 hdate_set_hdate (&h, 1, month, year);
321 jd = h.hd_jd;
322
323 if (h.hd_size_of_year > 365 && month == 6) /* adar of meoberet */
324 {
325 /* print Adar I and Adar II month days */
326 hdate_set_hdate (&h, 1, 13, year);
327 jd = h.hd_jd;
328
329 /* print month header */
330 if (!opt_i)
331 printf ("\n%s:\n",
332 hdate_get_hebrew_month_string (h.hd_mon,
333 opt_S));
334
335 /* print adar I days */
336 while (h.hd_mon == 13)
337 {
338 print_day (&h, opt_d, opt_S, lat, lon, tz, opt_s,
339 opt_h, opt_r, opt_R, opt_H, opt_i);
340
341 jd++;
342 hdate_set_jd (&h, jd);
343 }
344
345 hdate_set_hdate (&h, 1, 14, year);
346 jd = h.hd_jd;
347
348 /* print month header */
349 if (!opt_i)
350 printf ("\n%s:\n",
351 hdate_get_hebrew_month_string (h.hd_mon,
352 opt_S));
353
354 /* print adar II days */
355 while (h.hd_mon == 14)
356 {
357 print_day (&h, opt_d, opt_S, lat, lon, tz, opt_s,
358 opt_h, opt_r, opt_R, opt_H, opt_i);
359
360 jd++;
361 hdate_set_jd (&h, jd);
362 }
363 }
364 else
365 {
366 /* print month header */
367 if (!opt_i)
368 printf ("\n%s:\n",
369 hdate_get_hebrew_month_string (h.hd_mon,
370 opt_S));
371
372 /* print month days */
373 while (h.hd_mon == month)
374 {
375 print_day (&h, opt_d, opt_S, lat, lon, tz, opt_s,
376 opt_h, opt_r, opt_R, opt_H, opt_i);
377
378 jd++;
379 hdate_set_jd (&h, jd);
380 }
381 }
382
383 return 0;
384 }
385
386 /* print one gregorian year - all */
387 int
388 print_year (int opt_d, int opt_S,
389 double lat, double lon, int tz, int opt_s, int opt_h, int opt_r,
390 int opt_R, int opt_H, int opt_i, int year)
391 {
392 int month = 1;
393
394 /* print year header */
395 if (!opt_i)
396 printf ("%d:\n", year);
397
398 /* print year months */
399 while (month < 13)
400 {
401 print_month (opt_d, opt_S, lat, lon, tz, opt_s, opt_h, opt_r,
402 opt_R, opt_H, opt_i, month, year);
403 month++;
404 }
405
406 return 0;
407 }
408
409 /* print one hebrew year - all */
410 int
411 print_hebrew_year (int opt_d, int opt_S,
412 double lat, double lon, int tz,
413 int opt_s, int opt_h, int opt_r, int opt_R, int opt_H,
414 int opt_i, int year)
415 {
416 int month = 1;
417
418 /* print year header */
419 if (!opt_i)
420 printf ("%s:\n", hdate_get_int_string (year));
421
422 /* print year months */
423 while (month < 13)
424 {
425 print_hebrew_month (opt_d, opt_S, lat, lon, tz, opt_s, opt_h,
426 opt_r, opt_R, opt_H, opt_i, month, year);
427 month++;
428 }
429
430 return 0;
431 }
432
433 int
434 main (int argc, char *argv[])
435 {
436 hdate_struct h; /* The Hebrew date */
437 char c;
438
439 int day; /* The Gregorian date */
440 int month;
441 int year;
442
443 /* hebcal style command line options */
444 char *progname = argv[0];
445 int opt_s = 0; /* -s option sunrise/set times */
446 int opt_S = 0; /* -S Short format flag */
447 int opt_h = 0; /* -h option holidays */
448 int opt_H = 0; /* -H option just holidays */
449 int opt_r = 0; /* -r option reading */
450 int opt_R = 0; /* -R option just reading */
451 int opt_d = 0; /* -d option diaspora */
452 int opt_i = 0; /* -i option iCal */
453
454 double lat = 32.0; /* -l option default to Tel aviv latitude */
455 double lon = -34.0; /* -L option default to Tel aviv longitude */
456 int tz = 2; /* -z option default to Tel aviv time zone */
457
458 /* init locale */
459 setlocale (LC_ALL, "");
460
461 /* command line parsing */
462 while ((c = getopt (argc, argv, "sShHrRdil:L:z:")) != EOF)
463 {
464 switch (c)
465 {
466 case 's':
467 opt_s = 1;
468 break;
469 case 'S':
470 opt_S = 1;
471 break;
472 case 'H':
473 opt_H = 1;
474 case 'h':
475 opt_h = 1;
476 break;
477 case 'R':
478 opt_R = 1;
479 case 'r':
480 opt_r = 1;
481 break;
482 case 'd':
483 opt_d = 1;
484 break;
485 case 'i':
486 opt_i = 1;
487 break;
488 case 'l':
489 if (optarg)
490 lat = (double) atof (optarg);
491 break;
492 case 'L':
493 if (optarg)
494 lon = (double) atof (optarg);
495 break;
496 case 'z':
497 if (optarg)
498 tz = atoi (optarg);
499 break;
500 default:
501 print_help (argv[0]);
502 exit (0);
503 break;
504 }
505 }
506
507 /* Get calendar */
508 if (argc == optind) /* no date entered */
509 {
510 /* set date for today */
511 hdate_set_gdate (&h, 0, 0, 0);
512
513 print_day (&h, opt_d, opt_S, lat, lon, tz, opt_s, opt_h,
514 opt_r, opt_R, opt_H, opt_i);
515
516 exit (0);
517 }
518 else if (argc == (optind + 1)) /*only year */
519 {
520 /* get year */
521 year = atoi (argv[optind]);
522
523 if (year <= 0) /* error */
524 {
525 print_help (argv[0]);
526 exit (0);
527 }
528 if (year > 3000) /* hebrew year */
529 {
530 print_hebrew_year (opt_d, opt_S, lat, lon, tz, opt_s,
531 opt_h, opt_r, opt_R, opt_H, opt_i,
532 year);
533
534 exit (0);
535 }
536 else
537 {
538 print_year (opt_d, opt_S, lat, lon, tz, opt_s, opt_h,
539 opt_r, opt_R, opt_H, opt_i, year);
540
541 exit (0);
542 }
543 }
544 else if (argc == (optind + 2)) /*only month and year */
545 {
546 /* get year */
547 year = atoi (argv[optind + 1]);
548 month = atoi (argv[optind]);
549
550 if (year <= 0) /* error */
551 {
552 print_help (argv[0]);
553 exit (0);
554 }
555 if (year > 3000) /* hebrew year */
556 {
557 print_hebrew_month (opt_d, opt_S, lat, lon, tz, opt_s,
558 opt_h, opt_r, opt_R, opt_H, opt_i,
559 month, year);
560
561 exit (0);
562 }
563 else
564 {
565 print_month (opt_d, opt_S, lat, lon, tz, opt_s, opt_h,
566 opt_r, opt_R, opt_H, opt_i, month, year);
567
568 exit (0);
569 }
570 }
571 else if (argc == (optind + 3)) /*day month and year */
572 {
573 /* get year */
574 year = atoi (argv[optind + 2]);
575 month = atoi (argv[optind + 1]);
576 day = atoi (argv[optind]);
577
578 if (year <= 0) /* error */
579 {
580 print_help (argv[0]);
581 exit (0);
582 }
583
584 /* set date */
585 if (year > 3000) /* hebrew year */
586 {
587 hdate_set_hdate (&h, day, month, year);
588 }
589 else
590 {
591 hdate_set_gdate (&h, day, month, year);
592 }
593
594 print_day (&h, opt_d, opt_S, lat, lon, tz, opt_s, opt_h,
595 opt_r, opt_R, opt_H, opt_i);
596
597 exit (0);
598 }
599 else
600 {
601 print_help (argv[0]);
602 exit (0);
603 }
604
605 return 0;
606 }
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/libhdate0/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/libhdate0/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/libhdate0/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/libhdate0/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.2
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.3
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 %{_libdir}/libhdate.a
72 %{_libdir}/libhdate.la
73 %{_includedir}/hdate.h
74 %{_includedir}/hdatepp.h
75 %{_libdir}/pkgconfig/*
76 %{_prefix}/share/man/man3/hdate.h.3.gz
77 %{_prefix}/share/man/man3/hdate_struct.3.gz
78 %{_prefix}/share/doc/libhdate/examples/*
79
80 %package python
81 Summary: Python binding for %{name}
82 Group: Development/Libraries
83 Requires: %{name} = %{version}
84
85 %description python
86 This package contains %{name} binding to python
87
88 %files python
89 %{_libdir}/python2.3/_hdate.so
90 %{_libdir}/python2.3/hdate.py
91
92 %package perl
93 Summary: Perl binding for %{name}
94 Group: Development/Libraries
95 Requires: %{name} = %{version}
96
97 %description perl
98 This package contains %{name} binding to perl
99
100 %files perl
101 %{_libdir}/perl5/site_perl/hdate.pm
102 %{_libdir}/perl5/site_perl/auto/hdate/hdate.so
103
104 %package pascal
105 Summary: free pascal binding for %{name}
106 Group: Development/Libraries
107 Requires: %{name} = %{version}
108
109 %description pascal
110 This package contains %{name} binding to free pascal
111
112 %files pascal
113 %{_libdir}/fpc/2.0.0/units/linux/hdate/*
114
115 %post
116 /sbin/ldconfig
117
118 %postun
119 /sbin/ldconfig
120
121 %changelog
122 * Thu Mar 4 2005 Yaacov Zamir
123 - Add python and perl packages
124 - Add manfiles
125
126 * Thu Feb 24 2005 Oron Peled <oron@actcom.co.il>
127 - Split to normal runtime and -devel packages (like most
128 libraries do)
129 - Run ldconfig in post install/uninstall
130 - Remove duplicate documentation in /usr/doc (bad location
131 anyway)
132 - Run configure macro, so all dirs get their default values
133 - Use smp_mflags macro for build
134 - Change tagname from Copyright (deprecated) to License
135 - 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 %{_libdir}/libhdate.a
72 %{_libdir}/libhdate.la
73 %{_includedir}/hdate.h
74 %{_includedir}/hdatepp.h
75 %{_libdir}/pkgconfig/*
76 %{_prefix}/share/man/man3/hdate.h.3.gz
77 %{_prefix}/share/man/man3/hdate_struct.3.gz
78 %{_prefix}/share/doc/libhdate/examples/*
79
80 %package python
81 Summary: Python binding for %{name}
82 Group: Development/Libraries
83 Requires: %{name} = %{version}
84
85 %description python
86 This package contains %{name} binding to python
87
88 %files python
89 %{_libdir}/python@PY_VERSION@/_hdate.so
90 %{_libdir}/python@PY_VERSION@/hdate.py
91
92 %package perl
93 Summary: Perl binding for %{name}
94 Group: Development/Libraries
95 Requires: %{name} = %{version}
96
97 %description perl
98 This package contains %{name} binding to perl
99
100 %files perl
101 %{_libdir}/perl5/site_perl/hdate.pm
102 %{_libdir}/perl5/site_perl/auto/hdate/hdate.so
103
104 %package pascal
105 Summary: free pascal binding for %{name}
106 Group: Development/Libraries
107 Requires: %{name} = %{version}
108
109 %description pascal
110 This package contains %{name} binding to free pascal
111
112 %files pascal
113 %{_libdir}/fpc/@PA_VERSION@/units/linux/hdate/*
114
115 %post
116 /sbin/ldconfig
117
118 %postun
119 /sbin/ldconfig
120
121 %changelog
122 * Thu Mar 4 2005 Yaacov Zamir
123 - Add python and perl packages
124 - Add manfiles
125
126 * Thu Feb 24 2005 Oron Peled <oron@actcom.co.il>
127 - Split to normal runtime and -devel packages (like most
128 libraries do)
129 - Run ldconfig in post install/uninstall
130 - Remove duplicate documentation in /usr/doc (bad location
131 anyway)
132 - Run configure macro, so all dirs get their default values
133 - Use smp_mflags macro for build
134 - Change tagname from Copyright (deprecated) to License
135 - 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.20 Debian 1.5.20-2"
46 TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)"
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 lo2o="s/\\.lo\$/.${objext}/"
135 o2lo="s/\\.${objext}\$/.lo/"
136
137 #####################################
138 # Shell function definitions:
139 # This seems to be the best place for them
140
141 # func_win32_libid arg
142 # return the library type of file 'arg'
143 #
144 # Need a lot of goo to handle *both* DLLs and import libs
145 # Has to be a shell function in order to 'eat' the argument
146 # that is supplied when $file_magic_command is called.
147 func_win32_libid ()
148 {
149 win32_libid_type="unknown"
150 win32_fileres=`file -L $1 2>/dev/null`
151 case $win32_fileres in
152 *ar\ archive\ import\ library*) # definitely import
153 win32_libid_type="x86 archive import"
154 ;;
155 *ar\ archive*) # could be an import, or static
156 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
157 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
158 win32_nmres=`eval $NM -f posix -A $1 | \
159 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
160 if test "X$win32_nmres" = "Ximport" ; then
161 win32_libid_type="x86 archive import"
162 else
163 win32_libid_type="x86 archive static"
164 fi
165 fi
166 ;;
167 *DLL*)
168 win32_libid_type="x86 DLL"
169 ;;
170 *executable*) # but shell scripts are "executable" too...
171 case $win32_fileres in
172 *MS\ Windows\ PE\ Intel*)
173 win32_libid_type="x86 DLL"
174 ;;
175 esac
176 ;;
177 esac
178 $echo $win32_libid_type
179 }
180
181
182 # func_infer_tag arg
183 # Infer tagged configuration to use if any are available and
184 # if one wasn't chosen via the "--tag" command line option.
185 # Only attempt this if the compiler in the base compile
186 # command doesn't match the default compiler.
187 # arg is usually of the form 'gcc ...'
188 func_infer_tag ()
189 {
190 if test -n "$available_tags" && test -z "$tagname"; then
191 CC_quoted=
192 for arg in $CC; do
193 case $arg in
194 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
195 arg="\"$arg\""
196 ;;
197 esac
198 CC_quoted="$CC_quoted $arg"
199 done
200 case $@ in
201 # Blanks in the command may have been stripped by the calling shell,
202 # but not from the CC environment variable when configure was run.
203 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
204 # Blanks at the start of $base_compile will cause this to fail
205 # if we don't check for them as well.
206 *)
207 for z in $available_tags; do
208 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
209 # Evaluate the configuration.
210 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
211 CC_quoted=
212 for arg in $CC; do
213 # Double-quote args containing other shell metacharacters.
214 case $arg in
215 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
216 arg="\"$arg\""
217 ;;
218 esac
219 CC_quoted="$CC_quoted $arg"
220 done
221 case "$@ " in
222 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
223 # The compiler in the base compile command matches
224 # the one in the tagged configuration.
225 # Assume this is the tagged configuration we want.
226 tagname=$z
227 break
228 ;;
229 esac
230 fi
231 done
232 # If $tagname still isn't set, then no tagged configuration
233 # was found and let the user know that the "--tag" command
234 # line option must be used.
235 if test -z "$tagname"; then
236 $echo "$modename: unable to infer tagged configuration"
237 $echo "$modename: specify a tag with \`--tag'" 1>&2
238 exit $EXIT_FAILURE
239 # else
240 # $echo "$modename: using $tagname tagged configuration"
241 fi
242 ;;
243 esac
244 fi
245 }
246
247
248 # func_extract_an_archive dir oldlib
249 func_extract_an_archive ()
250 {
251 f_ex_an_ar_dir="$1"; shift
252 f_ex_an_ar_oldlib="$1"
253
254 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
255 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
256 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
257 :
258 else
259 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
260 exit $EXIT_FAILURE
261 fi
262 }
263
264 # func_extract_archives gentop oldlib ...
265 func_extract_archives ()
266 {
267 my_gentop="$1"; shift
268 my_oldlibs=${1+"$@"}
269 my_oldobjs=""
270 my_xlib=""
271 my_xabs=""
272 my_xdir=""
273 my_status=""
274
275 $show "${rm}r $my_gentop"
276 $run ${rm}r "$my_gentop"
277 $show "$mkdir $my_gentop"
278 $run $mkdir "$my_gentop"
279 my_status=$?
280 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
281 exit $my_status
282 fi
283
284 for my_xlib in $my_oldlibs; do
285 # Extract the objects.
286 case $my_xlib in
287 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
288 *) my_xabs=`pwd`"/$my_xlib" ;;
289 esac
290 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
291 my_xdir="$my_gentop/$my_xlib"
292
293 $show "${rm}r $my_xdir"
294 $run ${rm}r "$my_xdir"
295 $show "$mkdir $my_xdir"
296 $run $mkdir "$my_xdir"
297 status=$?
298 if test "$status" -ne 0 && test ! -d "$my_xdir"; then
299 exit $status
300 fi
301 case $host in
302 *-darwin*)
303 $show "Extracting $my_xabs"
304 # Do not bother doing anything if just a dry run
305 if test -z "$run"; then
306 darwin_orig_dir=`pwd`
307 cd $my_xdir || exit $?
308 darwin_archive=$my_xabs
309 darwin_curdir=`pwd`
310 darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
311 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
312 if test -n "$darwin_arches"; then
313 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
314 darwin_arch=
315 $show "$darwin_base_archive has multiple architectures $darwin_arches"
316 for darwin_arch in $darwin_arches ; do
317 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
318 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
319 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
320 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
321 cd "$darwin_curdir"
322 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
323 done # $darwin_arches
324 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
325 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
326 darwin_file=
327 darwin_files=
328 for darwin_file in $darwin_filelist; do
329 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
330 lipo -create -output "$darwin_file" $darwin_files
331 done # $darwin_filelist
332 ${rm}r unfat-$$
333 cd "$darwin_orig_dir"
334 else
335 cd "$darwin_orig_dir"
336 func_extract_an_archive "$my_xdir" "$my_xabs"
337 fi # $darwin_arches
338 fi # $run
339 ;;
340 *)
341 func_extract_an_archive "$my_xdir" "$my_xabs"
342 ;;
343 esac
344 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
345 done
346 func_extract_archives_result="$my_oldobjs"
347 }
348 # End of Shell function definitions
349 #####################################
350
351 # Darwin sucks
352 eval std_shrext=\"$shrext_cmds\"
353
354 # Parse our command line options once, thoroughly.
355 while test "$#" -gt 0
356 do
357 arg="$1"
358 shift
359
360 case $arg in
361 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
362 *) optarg= ;;
363 esac
364
365 # If the previous option needs an argument, assign it.
366 if test -n "$prev"; then
367 case $prev in
368 execute_dlfiles)
369 execute_dlfiles="$execute_dlfiles $arg"
370 ;;
371 tag)
372 tagname="$arg"
373 preserve_args="${preserve_args}=$arg"
374
375 # Check whether tagname contains only valid characters
376 case $tagname in
377 *[!-_A-Za-z0-9,/]*)
378 $echo "$progname: invalid tag name: $tagname" 1>&2
379 exit $EXIT_FAILURE
380 ;;
381 esac
382
383 case $tagname in
384 CC)
385 # Don't test for the "default" C tag, as we know, it's there, but
386 # not specially marked.
387 ;;
388 *)
389 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
390 taglist="$taglist $tagname"
391 # Evaluate the configuration.
392 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
393 else
394 $echo "$progname: ignoring unknown tag $tagname" 1>&2
395 fi
396 ;;
397 esac
398 ;;
399 *)
400 eval "$prev=\$arg"
401 ;;
402 esac
403
404 prev=
405 prevopt=
406 continue
407 fi
408
409 # Have we seen a non-optional argument yet?
410 case $arg in
411 --help)
412 show_help=yes
413 ;;
414
415 --version)
416 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
417 $echo
418 $echo "Copyright (C) 2005 Free Software Foundation, Inc."
419 $echo "This is free software; see the source for copying conditions. There is NO"
420 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
421 exit $?
422 ;;
423
424 --config)
425 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
426 # Now print the configurations for the tags.
427 for tagname in $taglist; do
428 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
429 done
430 exit $?
431 ;;
432
433 --debug)
434 $echo "$progname: enabling shell trace mode"
435 set -x
436 preserve_args="$preserve_args $arg"
437 ;;
438
439 --dry-run | -n)
440 run=:
441 ;;
442
443 --features)
444 $echo "host: $host"
445 if test "$build_libtool_libs" = yes; then
446 $echo "enable shared libraries"
447 else
448 $echo "disable shared libraries"
449 fi
450 if test "$build_old_libs" = yes; then
451 $echo "enable static libraries"
452 else
453 $echo "disable static libraries"
454 fi
455 exit $?
456 ;;
457
458 --finish) mode="finish" ;;
459
460 --mode) prevopt="--mode" prev=mode ;;
461 --mode=*) mode="$optarg" ;;
462
463 --preserve-dup-deps) duplicate_deps="yes" ;;
464
465 --quiet | --silent)
466 show=:
467 preserve_args="$preserve_args $arg"
468 ;;
469
470 --tag) prevopt="--tag" prev=tag ;;
471 --tag=*)
472 set tag "$optarg" ${1+"$@"}
473 shift
474 prev=tag
475 preserve_args="$preserve_args --tag"
476 ;;
477
478 -dlopen)
479 prevopt="-dlopen"
480 prev=execute_dlfiles
481 ;;
482
483 -*)
484 $echo "$modename: unrecognized option \`$arg'" 1>&2
485 $echo "$help" 1>&2
486 exit $EXIT_FAILURE
487 ;;
488
489 *)
490 nonopt="$arg"
491 break
492 ;;
493 esac
494 done
495
496 if test -n "$prevopt"; then
497 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
498 $echo "$help" 1>&2
499 exit $EXIT_FAILURE
500 fi
501
502 # If this variable is set in any of the actions, the command in it
503 # will be execed at the end. This prevents here-documents from being
504 # left over by shells.
505 exec_cmd=
506
507 if test -z "$show_help"; then
508
509 # Infer the operation mode.
510 if test -z "$mode"; then
511 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
512 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
513 case $nonopt in
514 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
515 mode=link
516 for arg
517 do
518 case $arg in
519 -c)
520 mode=compile
521 break
522 ;;
523 esac
524 done
525 ;;
526 *db | *dbx | *strace | *truss)
527 mode=execute
528 ;;
529 *install*|cp|mv)
530 mode=install
531 ;;
532 *rm)
533 mode=uninstall
534 ;;
535 *)
536 # If we have no mode, but dlfiles were specified, then do execute mode.
537 test -n "$execute_dlfiles" && mode=execute
538
539 # Just use the default operation mode.
540 if test -z "$mode"; then
541 if test -n "$nonopt"; then
542 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
543 else
544 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
545 fi
546 fi
547 ;;
548 esac
549 fi
550
551 # Only execute mode is allowed to have -dlopen flags.
552 if test -n "$execute_dlfiles" && test "$mode" != execute; then
553 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
554 $echo "$help" 1>&2
555 exit $EXIT_FAILURE
556 fi
557
558 # Change the help message to a mode-specific one.
559 generic_help="$help"
560 help="Try \`$modename --help --mode=$mode' for more information."
561
562 # These modes are in order of execution frequency so that they run quickly.
563 case $mode in
564 # libtool compile mode
565 compile)
566 modename="$modename: compile"
567 # Get the compilation command and the source file.
568 base_compile=
569 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
570 suppress_opt=yes
571 suppress_output=
572 arg_mode=normal
573 libobj=
574 later=
575
576 for arg
577 do
578 case $arg_mode in
579 arg )
580 # do not "continue". Instead, add this to base_compile
581 lastarg="$arg"
582 arg_mode=normal
583 ;;
584
585 target )
586 libobj="$arg"
587 arg_mode=normal
588 continue
589 ;;
590
591 normal )
592 # Accept any command-line options.
593 case $arg in
594 -o)
595 if test -n "$libobj" ; then
596 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
597 exit $EXIT_FAILURE
598 fi
599 arg_mode=target
600 continue
601 ;;
602
603 -static | -prefer-pic | -prefer-non-pic)
604 later="$later $arg"
605 continue
606 ;;
607
608 -no-suppress)
609 suppress_opt=no
610 continue
611 ;;
612
613 -Xcompiler)
614 arg_mode=arg # the next one goes into the "base_compile" arg list
615 continue # The current "srcfile" will either be retained or
616 ;; # replaced later. I would guess that would be a bug.
617
618 -Wc,*)
619 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
620 lastarg=
621 save_ifs="$IFS"; IFS=','
622 for arg in $args; do
623 IFS="$save_ifs"
624
625 # Double-quote args containing other shell metacharacters.
626 # Many Bourne shells cannot handle close brackets correctly
627 # in scan sets, so we specify it separately.
628 case $arg in
629 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
630 arg="\"$arg\""
631 ;;
632 esac
633 lastarg="$lastarg $arg"
634 done
635 IFS="$save_ifs"
636 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
637
638 # Add the arguments to base_compile.
639 base_compile="$base_compile $lastarg"
640 continue
641 ;;
642
643 * )
644 # Accept the current argument as the source file.
645 # The previous "srcfile" becomes the current argument.
646 #
647 lastarg="$srcfile"
648 srcfile="$arg"
649 ;;
650 esac # case $arg
651 ;;
652 esac # case $arg_mode
653
654 # Aesthetically quote the previous argument.
655 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
656
657 case $lastarg in
658 # Double-quote args containing other shell metacharacters.
659 # Many Bourne shells cannot handle close brackets correctly
660 # in scan sets, and some SunOS ksh mistreat backslash-escaping
661 # in scan sets (worked around with variable expansion),
662 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
663 # at all, so we specify them separately.
664 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
665 lastarg="\"$lastarg\""
666 ;;
667 esac
668
669 base_compile="$base_compile $lastarg"
670 done # for arg
671
672 case $arg_mode in
673 arg)
674 $echo "$modename: you must specify an argument for -Xcompile"
675 exit $EXIT_FAILURE
676 ;;
677 target)
678 $echo "$modename: you must specify a target with \`-o'" 1>&2
679 exit $EXIT_FAILURE
680 ;;
681 *)
682 # Get the name of the library object.
683 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
684 ;;
685 esac
686
687 # Recognize several different file suffixes.
688 # If the user specifies -o file.o, it is replaced with file.lo
689 xform='[cCFSifmso]'
690 case $libobj in
691 *.ada) xform=ada ;;
692 *.adb) xform=adb ;;
693 *.ads) xform=ads ;;
694 *.asm) xform=asm ;;
695 *.c++) xform=c++ ;;
696 *.cc) xform=cc ;;
697 *.ii) xform=ii ;;
698 *.class) xform=class ;;
699 *.cpp) xform=cpp ;;
700 *.cxx) xform=cxx ;;
701 *.f90) xform=f90 ;;
702 *.for) xform=for ;;
703 *.java) xform=java ;;
704 esac
705
706 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
707
708 case $libobj in
709 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
710 *)
711 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
712 exit $EXIT_FAILURE
713 ;;
714 esac
715
716 func_infer_tag $base_compile
717
718 for arg in $later; do
719 case $arg in
720 -static)
721 build_old_libs=yes
722 continue
723 ;;
724
725 -prefer-pic)
726 pic_mode=yes
727 continue
728 ;;
729
730 -prefer-non-pic)
731 pic_mode=no
732 continue
733 ;;
734 esac
735 done
736
737 qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
738 case $qlibobj in
739 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
740 qlibobj="\"$qlibobj\"" ;;
741 esac
742 test "X$libobj" != "X$qlibobj" \
743 && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
744 && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
745 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
746 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
747 if test "X$xdir" = "X$obj"; then
748 xdir=
749 else
750 xdir=$xdir/
751 fi
752 lobj=${xdir}$objdir/$objname
753
754 if test -z "$base_compile"; then
755 $echo "$modename: you must specify a compilation command" 1>&2
756 $echo "$help" 1>&2
757 exit $EXIT_FAILURE
758 fi
759
760 # Delete any leftover library objects.
761 if test "$build_old_libs" = yes; then
762 removelist="$obj $lobj $libobj ${libobj}T"
763 else
764 removelist="$lobj $libobj ${libobj}T"
765 fi
766
767 $run $rm $removelist
768 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
769
770 # On Cygwin there's no "real" PIC flag so we must build both object types
771 case $host_os in
772 cygwin* | mingw* | pw32* | os2*)
773 pic_mode=default
774 ;;
775 esac
776 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
777 # non-PIC code in shared libraries is not supported
778 pic_mode=default
779 fi
780
781 # Calculate the filename of the output object if compiler does
782 # not support -o with -c
783 if test "$compiler_c_o" = no; then
784 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
785 lockfile="$output_obj.lock"
786 removelist="$removelist $output_obj $lockfile"
787 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
788 else
789 output_obj=
790 need_locks=no
791 lockfile=
792 fi
793
794 # Lock this critical section if it is needed
795 # We use this script file to make the link, it avoids creating a new file
796 if test "$need_locks" = yes; then
797 until $run ln "$progpath" "$lockfile" 2>/dev/null; do
798 $show "Waiting for $lockfile to be removed"
799 sleep 2
800 done
801 elif test "$need_locks" = warn; then
802 if test -f "$lockfile"; then
803 $echo "\
804 *** ERROR, $lockfile exists and contains:
805 `cat $lockfile 2>/dev/null`
806
807 This indicates that another process is trying to use the same
808 temporary object file, and libtool could not work around it because
809 your compiler does not support \`-c' and \`-o' together. If you
810 repeat this compilation, it may succeed, by chance, but you had better
811 avoid parallel builds (make -j) in this platform, or get a better
812 compiler."
813
814 $run $rm $removelist
815 exit $EXIT_FAILURE
816 fi
817 $echo "$srcfile" > "$lockfile"
818 fi
819
820 if test -n "$fix_srcfile_path"; then
821 eval srcfile=\"$fix_srcfile_path\"
822 fi
823 qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
824 case $qsrcfile in
825 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
826 qsrcfile="\"$qsrcfile\"" ;;
827 esac
828
829 $run $rm "$libobj" "${libobj}T"
830
831 # Create a libtool object file (analogous to a ".la" file),
832 # but don't create it if we're doing a dry run.
833 test -z "$run" && cat > ${libobj}T <<EOF
834 # $libobj - a libtool object file
835 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
836 #
837 # Please DO NOT delete this file!
838 # It is necessary for linking the library.
839
840 # Name of the PIC object.
841 EOF
842
843 # Only build a PIC object if we are building libtool libraries.
844 if test "$build_libtool_libs" = yes; then
845 # Without this assignment, base_compile gets emptied.
846 fbsd_hideous_sh_bug=$base_compile
847
848 if test "$pic_mode" != no; then
849 command="$base_compile $qsrcfile $pic_flag"
850 else
851 # Don't build PIC code
852 command="$base_compile $qsrcfile"
853 fi
854
855 if test ! -d "${xdir}$objdir"; then
856 $show "$mkdir ${xdir}$objdir"
857 $run $mkdir ${xdir}$objdir
858 status=$?
859 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
860 exit $status
861 fi
862 fi
863
864 if test -z "$output_obj"; then
865 # Place PIC objects in $objdir
866 command="$command -o $lobj"
867 fi
868
869 $run $rm "$lobj" "$output_obj"
870
871 $show "$command"
872 if $run eval "$command"; then :
873 else
874 test -n "$output_obj" && $run $rm $removelist
875 exit $EXIT_FAILURE
876 fi
877
878 if test "$need_locks" = warn &&
879 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
880 $echo "\
881 *** ERROR, $lockfile contains:
882 `cat $lockfile 2>/dev/null`
883
884 but it should contain:
885 $srcfile
886
887 This indicates that another process is trying to use the same
888 temporary object file, and libtool could not work around it because
889 your compiler does not support \`-c' and \`-o' together. If you
890 repeat this compilation, it may succeed, by chance, but you had better
891 avoid parallel builds (make -j) in this platform, or get a better
892 compiler."
893
894 $run $rm $removelist
895 exit $EXIT_FAILURE
896 fi
897
898 # Just move the object if needed, then go on to compile the next one
899 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
900 $show "$mv $output_obj $lobj"
901 if $run $mv $output_obj $lobj; then :
902 else
903 error=$?
904 $run $rm $removelist
905 exit $error
906 fi
907 fi
908
909 # Append the name of the PIC object to the libtool object file.
910 test -z "$run" && cat >> ${libobj}T <<EOF
911 pic_object='$objdir/$objname'
912
913 EOF
914
915 # Allow error messages only from the first compilation.
916 if test "$suppress_opt" = yes; then
917 suppress_output=' >/dev/null 2>&1'
918 fi
919 else
920 # No PIC object so indicate it doesn't exist in the libtool
921 # object file.
922 test -z "$run" && cat >> ${libobj}T <<EOF
923 pic_object=none
924
925 EOF
926 fi
927
928 # Only build a position-dependent object if we build old libraries.
929 if test "$build_old_libs" = yes; then
930 if test "$pic_mode" != yes; then
931 # Don't build PIC code
932 command="$base_compile $qsrcfile"
933 else
934 command="$base_compile $qsrcfile $pic_flag"
935 fi
936 if test "$compiler_c_o" = yes; then
937 command="$command -o $obj"
938 fi
939
940 # Suppress compiler output if we already did a PIC compilation.
941 command="$command$suppress_output"
942 $run $rm "$obj" "$output_obj"
943 $show "$command"
944 if $run eval "$command"; then :
945 else
946 $run $rm $removelist
947 exit $EXIT_FAILURE
948 fi
949
950 if test "$need_locks" = warn &&
951 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
952 $echo "\
953 *** ERROR, $lockfile contains:
954 `cat $lockfile 2>/dev/null`
955
956 but it should contain:
957 $srcfile
958
959 This indicates that another process is trying to use the same
960 temporary object file, and libtool could not work around it because
961 your compiler does not support \`-c' and \`-o' together. If you
962 repeat this compilation, it may succeed, by chance, but you had better
963 avoid parallel builds (make -j) in this platform, or get a better
964 compiler."
965
966 $run $rm $removelist
967 exit $EXIT_FAILURE
968 fi
969
970 # Just move the object if needed
971 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
972 $show "$mv $output_obj $obj"
973 if $run $mv $output_obj $obj; then :
974 else
975 error=$?
976 $run $rm $removelist
977 exit $error
978 fi
979 fi
980
981 # Append the name of the non-PIC object the libtool object file.
982 # Only append if the libtool object file exists.
983 test -z "$run" && cat >> ${libobj}T <<EOF
984 # Name of the non-PIC object.
985 non_pic_object='$objname'
986
987 EOF
988 else
989 # Append the name of the non-PIC object the libtool object file.
990 # Only append if the libtool object file exists.
991 test -z "$run" && cat >> ${libobj}T <<EOF
992 # Name of the non-PIC object.
993 non_pic_object=none
994
995 EOF
996 fi
997
998 $run $mv "${libobj}T" "${libobj}"
999
1000 # Unlock the critical section if it was locked
1001 if test "$need_locks" != no; then
1002 $run $rm "$lockfile"
1003 fi
1004
1005 exit $EXIT_SUCCESS
1006 ;;
1007
1008 # libtool link mode
1009 link | relink)
1010 modename="$modename: link"
1011 case $host in
1012 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1013 # It is impossible to link a dll without this setting, and
1014 # we shouldn't force the makefile maintainer to figure out
1015 # which system we are compiling for in order to pass an extra
1016 # flag for every libtool invocation.
1017 # allow_undefined=no
1018
1019 # FIXME: Unfortunately, there are problems with the above when trying
1020 # to make a dll which has undefined symbols, in which case not
1021 # even a static library is built. For now, we need to specify
1022 # -no-undefined on the libtool link line when we can be certain
1023 # that all symbols are satisfied, otherwise we get a static library.
1024 allow_undefined=yes
1025 ;;
1026 *)
1027 allow_undefined=yes
1028 ;;
1029 esac
1030 libtool_args="$nonopt"
1031 base_compile="$nonopt $@"
1032 compile_command="$nonopt"
1033 finalize_command="$nonopt"
1034
1035 compile_rpath=
1036 finalize_rpath=
1037 compile_shlibpath=
1038 finalize_shlibpath=
1039 convenience=
1040 old_convenience=
1041 deplibs=
1042 old_deplibs=
1043 compiler_flags=
1044 linker_flags=
1045 dllsearchpath=
1046 lib_search_path=`pwd`
1047 inst_prefix_dir=
1048
1049 avoid_version=no
1050 dlfiles=
1051 dlprefiles=
1052 dlself=no
1053 export_dynamic=no
1054 export_symbols=
1055 export_symbols_regex=
1056 generated=
1057 libobjs=
1058 ltlibs=
1059 module=no
1060 no_install=no
1061 objs=
1062 non_pic_objects=
1063 precious_files_regex=
1064 prefer_static_libs=no
1065 preload=no
1066 prev=
1067 prevarg=
1068 release=
1069 rpath=
1070 xrpath=
1071 perm_rpath=
1072 temp_rpath=
1073 thread_safe=no
1074 vinfo=
1075 vinfo_number=no
1076
1077 func_infer_tag $base_compile
1078
1079 # We need to know -static, to get the right output filenames.
1080 for arg
1081 do
1082 case $arg in
1083 -all-static | -static)
1084 if test "X$arg" = "X-all-static"; then
1085 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1086 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1087 fi
1088 if test -n "$link_static_flag"; then
1089 dlopen_self=$dlopen_self_static
1090 fi
1091 else
1092 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1093 dlopen_self=$dlopen_self_static
1094 fi
1095 fi
1096 build_libtool_libs=no
1097 build_old_libs=yes
1098 prefer_static_libs=yes
1099 break
1100 ;;
1101 esac
1102 done
1103
1104 # See if our shared archives depend on static archives.
1105 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1106
1107 # Go through the arguments, transforming them on the way.
1108 while test "$#" -gt 0; do
1109 arg="$1"
1110 shift
1111 case $arg in
1112 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1113 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1114 ;;
1115 *) qarg=$arg ;;
1116 esac
1117 libtool_args="$libtool_args $qarg"
1118
1119 # If the previous option needs an argument, assign it.
1120 if test -n "$prev"; then
1121 case $prev in
1122 output)
1123 compile_command="$compile_command @OUTPUT@"
1124 finalize_command="$finalize_command @OUTPUT@"
1125 ;;
1126 esac
1127
1128 case $prev in
1129 dlfiles|dlprefiles)
1130 if test "$preload" = no; then
1131 # Add the symbol object into the linking commands.
1132 compile_command="$compile_command @SYMFILE@"
1133 finalize_command="$finalize_command @SYMFILE@"
1134 preload=yes
1135 fi
1136 case $arg in
1137 *.la | *.lo) ;; # We handle these cases below.
1138 force)
1139 if test "$dlself" = no; then
1140 dlself=needless
1141 export_dynamic=yes
1142 fi
1143 prev=
1144 continue
1145 ;;
1146 self)
1147 if test "$prev" = dlprefiles; then
1148 dlself=yes
1149 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1150 dlself=yes
1151 else
1152 dlself=needless
1153 export_dynamic=yes
1154 fi
1155 prev=
1156 continue
1157 ;;
1158 *)
1159 if test "$prev" = dlfiles; then
1160 dlfiles="$dlfiles $arg"
1161 else
1162 dlprefiles="$dlprefiles $arg"
1163 fi
1164 prev=
1165 continue
1166 ;;
1167 esac
1168 ;;
1169 expsyms)
1170 export_symbols="$arg"
1171 if test ! -f "$arg"; then
1172 $echo "$modename: symbol file \`$arg' does not exist"
1173 exit $EXIT_FAILURE
1174 fi
1175 prev=
1176 continue
1177 ;;
1178 expsyms_regex)
1179 export_symbols_regex="$arg"
1180 prev=
1181 continue
1182 ;;
1183 inst_prefix)
1184 inst_prefix_dir="$arg"
1185 prev=
1186 continue
1187 ;;
1188 precious_regex)
1189 precious_files_regex="$arg"
1190 prev=
1191 continue
1192 ;;
1193 release)
1194 release="-$arg"
1195 prev=
1196 continue
1197 ;;
1198 objectlist)
1199 if test -f "$arg"; then
1200 save_arg=$arg
1201 moreargs=
1202 for fil in `cat $save_arg`
1203 do
1204 # moreargs="$moreargs $fil"
1205 arg=$fil
1206 # A libtool-controlled object.
1207
1208 # Check to see that this really is a libtool object.
1209 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1210 pic_object=
1211 non_pic_object=
1212
1213 # Read the .lo file
1214 # If there is no directory component, then add one.
1215 case $arg in
1216 */* | *\\*) . $arg ;;
1217 *) . ./$arg ;;
1218 esac
1219
1220 if test -z "$pic_object" || \
1221 test -z "$non_pic_object" ||
1222 test "$pic_object" = none && \
1223 test "$non_pic_object" = none; then
1224 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1225 exit $EXIT_FAILURE
1226 fi
1227
1228 # Extract subdirectory from the argument.
1229 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1230 if test "X$xdir" = "X$arg"; then
1231 xdir=
1232 else
1233 xdir="$xdir/"
1234 fi
1235
1236 if test "$pic_object" != none; then
1237 # Prepend the subdirectory the object is found in.
1238 pic_object="$xdir$pic_object"
1239
1240 if test "$prev" = dlfiles; then
1241 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1242 dlfiles="$dlfiles $pic_object"
1243 prev=
1244 continue
1245 else
1246 # If libtool objects are unsupported, then we need to preload.
1247 prev=dlprefiles
1248 fi
1249 fi
1250
1251 # CHECK ME: I think I busted this. -Ossama
1252 if test "$prev" = dlprefiles; then
1253 # Preload the old-style object.
1254 dlprefiles="$dlprefiles $pic_object"
1255 prev=
1256 fi
1257
1258 # A PIC object.
1259 libobjs="$libobjs $pic_object"
1260 arg="$pic_object"
1261 fi
1262
1263 # Non-PIC object.
1264 if test "$non_pic_object" != none; then
1265 # Prepend the subdirectory the object is found in.
1266 non_pic_object="$xdir$non_pic_object"
1267
1268 # A standard non-PIC object
1269 non_pic_objects="$non_pic_objects $non_pic_object"
1270 if test -z "$pic_object" || test "$pic_object" = none ; then
1271 arg="$non_pic_object"
1272 fi
1273 fi
1274 else
1275 # Only an error if not doing a dry-run.
1276 if test -z "$run"; then
1277 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1278 exit $EXIT_FAILURE
1279 else
1280 # Dry-run case.
1281
1282 # Extract subdirectory from the argument.
1283 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1284 if test "X$xdir" = "X$arg"; then
1285 xdir=
1286 else
1287 xdir="$xdir/"
1288 fi
1289
1290 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1291 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1292 libobjs="$libobjs $pic_object"
1293 non_pic_objects="$non_pic_objects $non_pic_object"
1294 fi
1295 fi
1296 done
1297 else
1298 $echo "$modename: link input file \`$save_arg' does not exist"
1299 exit $EXIT_FAILURE
1300 fi
1301 arg=$save_arg
1302 prev=
1303 continue
1304 ;;
1305 rpath | xrpath)
1306 # We need an absolute path.
1307 case $arg in
1308 [\\/]* | [A-Za-z]:[\\/]*) ;;
1309 *)
1310 $echo "$modename: only absolute run-paths are allowed" 1>&2
1311 exit $EXIT_FAILURE
1312 ;;
1313 esac
1314 if test "$prev" = rpath; then
1315 case "$rpath " in
1316 *" $arg "*) ;;
1317 *) rpath="$rpath $arg" ;;
1318 esac
1319 else
1320 case "$xrpath " in
1321 *" $arg "*) ;;
1322 *) xrpath="$xrpath $arg" ;;
1323 esac
1324 fi
1325 prev=
1326 continue
1327 ;;
1328 xcompiler)
1329 compiler_flags="$compiler_flags $qarg"
1330 prev=
1331 compile_command="$compile_command $qarg"
1332 finalize_command="$finalize_command $qarg"
1333 continue
1334 ;;
1335 xlinker)
1336 linker_flags="$linker_flags $qarg"
1337 compiler_flags="$compiler_flags $wl$qarg"
1338 prev=
1339 compile_command="$compile_command $wl$qarg"
1340 finalize_command="$finalize_command $wl$qarg"
1341 continue
1342 ;;
1343 xcclinker)
1344 linker_flags="$linker_flags $qarg"
1345 compiler_flags="$compiler_flags $qarg"
1346 prev=
1347 compile_command="$compile_command $qarg"
1348 finalize_command="$finalize_command $qarg"
1349 continue
1350 ;;
1351 shrext)
1352 shrext_cmds="$arg"
1353 prev=
1354 continue
1355 ;;
1356 darwin_framework)
1357 compiler_flags="$compiler_flags $arg"
1358 compile_command="$compile_command $arg"
1359 finalize_command="$finalize_command $arg"
1360 prev=
1361 continue
1362 ;;
1363 *)
1364 eval "$prev=\"\$arg\""
1365 prev=
1366 continue
1367 ;;
1368 esac
1369 fi # test -n "$prev"
1370
1371 prevarg="$arg"
1372
1373 case $arg in
1374 -all-static)
1375 if test -n "$link_static_flag"; then
1376 compile_command="$compile_command $link_static_flag"
1377 finalize_command="$finalize_command $link_static_flag"
1378 fi
1379 continue
1380 ;;
1381
1382 -allow-undefined)
1383 # FIXME: remove this flag sometime in the future.
1384 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1385 continue
1386 ;;
1387
1388 -avoid-version)
1389 avoid_version=yes
1390 continue
1391 ;;
1392
1393 -dlopen)
1394 prev=dlfiles
1395 continue
1396 ;;
1397
1398 -dlpreopen)
1399 prev=dlprefiles
1400 continue
1401 ;;
1402
1403 -export-dynamic)
1404 export_dynamic=yes
1405 continue
1406 ;;
1407
1408 -export-symbols | -export-symbols-regex)
1409 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1410 $echo "$modename: more than one -exported-symbols argument is not allowed"
1411 exit $EXIT_FAILURE
1412 fi
1413 if test "X$arg" = "X-export-symbols"; then
1414 prev=expsyms
1415 else
1416 prev=expsyms_regex
1417 fi
1418 continue
1419 ;;
1420
1421 -framework|-arch)
1422 prev=darwin_framework
1423 compiler_flags="$compiler_flags $arg"
1424 compile_command="$compile_command $arg"
1425 finalize_command="$finalize_command $arg"
1426 continue
1427 ;;
1428
1429 -inst-prefix-dir)
1430 prev=inst_prefix
1431 continue
1432 ;;
1433
1434 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1435 # so, if we see these flags be careful not to treat them like -L
1436 -L[A-Z][A-Z]*:*)
1437 case $with_gcc/$host in
1438 no/*-*-irix* | /*-*-irix*)
1439 compile_command="$compile_command $arg"
1440 finalize_command="$finalize_command $arg"
1441 ;;
1442 esac
1443 continue
1444 ;;
1445
1446 -L*)
1447 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1448 # We need an absolute path.
1449 case $dir in
1450 [\\/]* | [A-Za-z]:[\\/]*) ;;
1451 *)
1452 absdir=`cd "$dir" && pwd`
1453 if test -z "$absdir"; then
1454 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1455 exit $EXIT_FAILURE
1456 fi
1457 dir="$absdir"
1458 ;;
1459 esac
1460 case "$deplibs " in
1461 *" -L$dir "*) ;;
1462 *)
1463 deplibs="$deplibs -L$dir"
1464 lib_search_path="$lib_search_path $dir"
1465 ;;
1466 esac
1467 case $host in
1468 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1469 case :$dllsearchpath: in
1470 *":$dir:"*) ;;
1471 *) dllsearchpath="$dllsearchpath:$dir";;
1472 esac
1473 ;;
1474 esac
1475 continue
1476 ;;
1477
1478 -l*)
1479 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1480 case $host in
1481 *-*-cygwin* | *-*-pw32* | *-*-beos*)
1482 # These systems don't actually have a C or math library (as such)
1483 continue
1484 ;;
1485 *-*-mingw* | *-*-os2*)
1486 # These systems don't actually have a C library (as such)
1487 test "X$arg" = "X-lc" && continue
1488 ;;
1489 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1490 # Do not include libc due to us having libc/libc_r.
1491 test "X$arg" = "X-lc" && continue
1492 ;;
1493 *-*-rhapsody* | *-*-darwin1.[012])
1494 # Rhapsody C and math libraries are in the System framework
1495 deplibs="$deplibs -framework System"
1496 continue
1497 esac
1498 elif test "X$arg" = "X-lc_r"; then
1499 case $host in
1500 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1501 # Do not include libc_r directly, use -pthread flag.
1502 continue
1503 ;;
1504 esac
1505 fi
1506 deplibs="$deplibs $arg"
1507 continue
1508 ;;
1509
1510 # Tru64 UNIX uses -model [arg] to determine the layout of C++
1511 # classes, name mangling, and exception handling.
1512 -model)
1513 compile_command="$compile_command $arg"
1514 compiler_flags="$compiler_flags $arg"
1515 finalize_command="$finalize_command $arg"
1516 prev=xcompiler
1517 continue
1518 ;;
1519
1520 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1521 compiler_flags="$compiler_flags $arg"
1522 compile_command="$compile_command $arg"
1523 finalize_command="$finalize_command $arg"
1524 continue
1525 ;;
1526
1527 -module)
1528 module=yes
1529 continue
1530 ;;
1531
1532 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1533 # -r[0-9][0-9]* specifies the processor on the SGI compiler
1534 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1535 # +DA*, +DD* enable 64-bit mode on the HP compiler
1536 # -q* pass through compiler args for the IBM compiler
1537 # -m* pass through architecture-specific compiler args for GCC
1538 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
1539
1540 # Unknown arguments in both finalize_command and compile_command need
1541 # to be aesthetically quoted because they are evaled later.
1542 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1543 case $arg in
1544 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1545 arg="\"$arg\""
1546 ;;
1547 esac
1548 compile_command="$compile_command $arg"
1549 finalize_command="$finalize_command $arg"
1550 if test "$with_gcc" = "yes" ; then
1551 compiler_flags="$compiler_flags $arg"
1552 fi
1553 continue
1554 ;;
1555
1556 -shrext)
1557 prev=shrext
1558 continue
1559 ;;
1560
1561 -no-fast-install)
1562 fast_install=no
1563 continue
1564 ;;
1565
1566 -no-install)
1567 case $host in
1568 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1569 # The PATH hackery in wrapper scripts is required on Windows
1570 # in order for the loader to find any dlls it needs.
1571 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1572 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1573 fast_install=no
1574 ;;
1575 *) no_install=yes ;;
1576 esac
1577 continue
1578 ;;
1579
1580 -no-undefined)
1581 allow_undefined=no
1582 continue
1583 ;;
1584
1585 -objectlist)
1586 prev=objectlist
1587 continue
1588 ;;
1589
1590 -o) prev=output ;;
1591
1592 -precious-files-regex)
1593 prev=precious_regex
1594 continue
1595 ;;
1596
1597 -release)
1598 prev=release
1599 continue
1600 ;;
1601
1602 -rpath)
1603 prev=rpath
1604 continue
1605 ;;
1606
1607 -R)
1608 prev=xrpath
1609 continue
1610 ;;
1611
1612 -R*)
1613 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1614 # We need an absolute path.
1615 case $dir in
1616 [\\/]* | [A-Za-z]:[\\/]*) ;;
1617 *)
1618 $echo "$modename: only absolute run-paths are allowed" 1>&2
1619 exit $EXIT_FAILURE
1620 ;;
1621 esac
1622 case "$xrpath " in
1623 *" $dir "*) ;;
1624 *) xrpath="$xrpath $dir" ;;
1625 esac
1626 continue
1627 ;;
1628
1629 -static)
1630 # The effects of -static are defined in a previous loop.
1631 # We used to do the same as -all-static on platforms that
1632 # didn't have a PIC flag, but the assumption that the effects
1633 # would be equivalent was wrong. It would break on at least
1634 # Digital Unix and AIX.
1635 continue
1636 ;;
1637
1638 -thread-safe)
1639 thread_safe=yes
1640 continue
1641 ;;
1642
1643 -version-info)
1644 prev=vinfo
1645 continue
1646 ;;
1647 -version-number)
1648 prev=vinfo
1649 vinfo_number=yes
1650 continue
1651 ;;
1652
1653 -Wc,*)
1654 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1655 arg=
1656 save_ifs="$IFS"; IFS=','
1657 for flag in $args; do
1658 IFS="$save_ifs"
1659 case $flag in
1660 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1661 flag="\"$flag\""
1662 ;;
1663 esac
1664 arg="$arg $wl$flag"
1665 compiler_flags="$compiler_flags $flag"
1666 done
1667 IFS="$save_ifs"
1668 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1669 ;;
1670
1671 -Wl,*)
1672 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1673 arg=
1674 save_ifs="$IFS"; IFS=','
1675 for flag in $args; do
1676 IFS="$save_ifs"
1677 case $flag in
1678 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1679 flag="\"$flag\""
1680 ;;
1681 esac
1682 arg="$arg $wl$flag"
1683 compiler_flags="$compiler_flags $wl$flag"
1684 linker_flags="$linker_flags $flag"
1685 done
1686 IFS="$save_ifs"
1687 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1688 ;;
1689
1690 -Xcompiler)
1691 prev=xcompiler
1692 continue
1693 ;;
1694
1695 -Xlinker)
1696 prev=xlinker
1697 continue
1698 ;;
1699
1700 -XCClinker)
1701 prev=xcclinker
1702 continue
1703 ;;
1704
1705 # Some other compiler flag.
1706 -* | +*)
1707 # Unknown arguments in both finalize_command and compile_command need
1708 # to be aesthetically quoted because they are evaled later.
1709 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1710 case $arg in
1711 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1712 arg="\"$arg\""
1713 ;;
1714 esac
1715 ;;
1716
1717 *.$objext)
1718 # A standard object.
1719 objs="$objs $arg"
1720 ;;
1721
1722 *.lo)
1723 # A libtool-controlled object.
1724
1725 # Check to see that this really is a libtool object.
1726 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1727 pic_object=
1728 non_pic_object=
1729
1730 # Read the .lo file
1731 # If there is no directory component, then add one.
1732 case $arg in
1733 */* | *\\*) . $arg ;;
1734 *) . ./$arg ;;
1735 esac
1736
1737 if test -z "$pic_object" || \
1738 test -z "$non_pic_object" ||
1739 test "$pic_object" = none && \
1740 test "$non_pic_object" = none; then
1741 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1742 exit $EXIT_FAILURE
1743 fi
1744
1745 # Extract subdirectory from the argument.
1746 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1747 if test "X$xdir" = "X$arg"; then
1748 xdir=
1749 else
1750 xdir="$xdir/"
1751 fi
1752
1753 if test "$pic_object" != none; then
1754 # Prepend the subdirectory the object is found in.
1755 pic_object="$xdir$pic_object"
1756
1757 if test "$prev" = dlfiles; then
1758 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1759 dlfiles="$dlfiles $pic_object"
1760 prev=
1761 continue
1762 else
1763 # If libtool objects are unsupported, then we need to preload.
1764 prev=dlprefiles
1765 fi
1766 fi
1767
1768 # CHECK ME: I think I busted this. -Ossama
1769 if test "$prev" = dlprefiles; then
1770 # Preload the old-style object.
1771 dlprefiles="$dlprefiles $pic_object"
1772 prev=
1773 fi
1774
1775 # A PIC object.
1776 libobjs="$libobjs $pic_object"
1777 arg="$pic_object"
1778 fi
1779
1780 # Non-PIC object.
1781 if test "$non_pic_object" != none; then
1782 # Prepend the subdirectory the object is found in.
1783 non_pic_object="$xdir$non_pic_object"
1784
1785 # A standard non-PIC object
1786 non_pic_objects="$non_pic_objects $non_pic_object"
1787 if test -z "$pic_object" || test "$pic_object" = none ; then
1788 arg="$non_pic_object"
1789 fi
1790 fi
1791 else
1792 # Only an error if not doing a dry-run.
1793 if test -z "$run"; then
1794 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1795 exit $EXIT_FAILURE
1796 else
1797 # Dry-run case.
1798
1799 # Extract subdirectory from the argument.
1800 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1801 if test "X$xdir" = "X$arg"; then
1802 xdir=
1803 else
1804 xdir="$xdir/"
1805 fi
1806
1807 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1808 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1809 libobjs="$libobjs $pic_object"
1810 non_pic_objects="$non_pic_objects $non_pic_object"
1811 fi
1812 fi
1813 ;;
1814
1815 *.$libext)
1816 # An archive.
1817 deplibs="$deplibs $arg"
1818 old_deplibs="$old_deplibs $arg"
1819 continue
1820 ;;
1821
1822 *.la)
1823 # A libtool-controlled library.
1824
1825 if test "$prev" = dlfiles; then
1826 # This library was specified with -dlopen.
1827 dlfiles="$dlfiles $arg"
1828 prev=
1829 elif test "$prev" = dlprefiles; then
1830 # The library was specified with -dlpreopen.
1831 dlprefiles="$dlprefiles $arg"
1832 prev=
1833 else
1834 deplibs="$deplibs $arg"
1835 fi
1836 continue
1837 ;;
1838
1839 # Some other compiler argument.
1840 *)
1841 # Unknown arguments in both finalize_command and compile_command need
1842 # to be aesthetically quoted because they are evaled later.
1843 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1844 case $arg in
1845 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1846 arg="\"$arg\""
1847 ;;
1848 esac
1849 ;;
1850 esac # arg
1851
1852 # Now actually substitute the argument into the commands.
1853 if test -n "$arg"; then
1854 compile_command="$compile_command $arg"
1855 finalize_command="$finalize_command $arg"
1856 fi
1857 done # argument parsing loop
1858
1859 if test -n "$prev"; then
1860 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1861 $echo "$help" 1>&2
1862 exit $EXIT_FAILURE
1863 fi
1864
1865 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1866 eval arg=\"$export_dynamic_flag_spec\"
1867 compile_command="$compile_command $arg"
1868 finalize_command="$finalize_command $arg"
1869 fi
1870
1871 oldlibs=
1872 # calculate the name of the file, without its directory
1873 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
1874 libobjs_save="$libobjs"
1875
1876 if test -n "$shlibpath_var"; then
1877 # get the directories listed in $shlibpath_var
1878 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
1879 else
1880 shlib_search_path=
1881 fi
1882 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
1883 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
1884
1885 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1886 if test "X$output_objdir" = "X$output"; then
1887 output_objdir="$objdir"
1888 else
1889 output_objdir="$output_objdir/$objdir"
1890 fi
1891 # Create the object directory.
1892 if test ! -d "$output_objdir"; then
1893 $show "$mkdir $output_objdir"
1894 $run $mkdir $output_objdir
1895 status=$?
1896 if test "$status" -ne 0 && test ! -d "$output_objdir"; then
1897 exit $status
1898 fi
1899 fi
1900
1901 # Determine the type of output
1902 case $output in
1903 "")
1904 $echo "$modename: you must specify an output file" 1>&2
1905 $echo "$help" 1>&2
1906 exit $EXIT_FAILURE
1907 ;;
1908 *.$libext) linkmode=oldlib ;;
1909 *.lo | *.$objext) linkmode=obj ;;
1910 *.la) linkmode=lib ;;
1911 *) linkmode=prog ;; # Anything else should be a program.
1912 esac
1913
1914 case $host in
1915 *cygwin* | *mingw* | *pw32*)
1916 # don't eliminate duplications in $postdeps and $predeps
1917 duplicate_compiler_generated_deps=yes
1918 ;;
1919 *)
1920 duplicate_compiler_generated_deps=$duplicate_deps
1921 ;;
1922 esac
1923 specialdeplibs=
1924
1925 libs=
1926 # Find all interdependent deplibs by searching for libraries
1927 # that are linked more than once (e.g. -la -lb -la)
1928 for deplib in $deplibs; do
1929 if test "X$duplicate_deps" = "Xyes" ; then
1930 case "$libs " in
1931 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1932 esac
1933 fi
1934 libs="$libs $deplib"
1935 done
1936
1937 if test "$linkmode" = lib; then
1938 libs="$predeps $libs $compiler_lib_search_path $postdeps"
1939
1940 # Compute libraries that are listed more than once in $predeps
1941 # $postdeps and mark them as special (i.e., whose duplicates are
1942 # not to be eliminated).
1943 pre_post_deps=
1944 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
1945 for pre_post_dep in $predeps $postdeps; do
1946 case "$pre_post_deps " in
1947 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
1948 esac
1949 pre_post_deps="$pre_post_deps $pre_post_dep"
1950 done
1951 fi
1952 pre_post_deps=
1953 fi
1954
1955 deplibs=
1956 newdependency_libs=
1957 newlib_search_path=
1958 need_relink=no # whether we're linking any uninstalled libtool libraries
1959 notinst_deplibs= # not-installed libtool libraries
1960 notinst_path= # paths that contain not-installed libtool libraries
1961 case $linkmode in
1962 lib)
1963 passes="conv link"
1964 for file in $dlfiles $dlprefiles; do
1965 case $file in
1966 *.la) ;;
1967 *)
1968 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
1969 exit $EXIT_FAILURE
1970 ;;
1971 esac
1972 done
1973 ;;
1974 prog)
1975 compile_deplibs=
1976 finalize_deplibs=
1977 alldeplibs=no
1978 newdlfiles=
1979 newdlprefiles=
1980 passes="conv scan dlopen dlpreopen link"
1981 ;;
1982 *) passes="conv"
1983 ;;
1984 esac
1985 for pass in $passes; do
1986 if test "$linkmode,$pass" = "lib,link" ||
1987 test "$linkmode,$pass" = "prog,scan"; then
1988 libs="$deplibs"
1989 deplibs=
1990 fi
1991 if test "$linkmode" = prog; then
1992 case $pass in
1993 dlopen) libs="$dlfiles" ;;
1994 dlpreopen) libs="$dlprefiles" ;;
1995 link)
1996 libs="$deplibs %DEPLIBS%"
1997 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
1998 ;;
1999 esac
2000 fi
2001 if test "$pass" = dlopen; then
2002 # Collect dlpreopened libraries
2003 save_deplibs="$deplibs"
2004 deplibs=
2005 fi
2006 for deplib in $libs; do
2007 lib=
2008 found=no
2009 case $deplib in
2010 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
2011 if test "$linkmode,$pass" = "prog,link"; then
2012 compile_deplibs="$deplib $compile_deplibs"
2013 finalize_deplibs="$deplib $finalize_deplibs"
2014 else
2015 compiler_flags="$compiler_flags $deplib"
2016 fi
2017 continue
2018 ;;
2019 -l*)
2020 if test "$linkmode" != lib && test "$linkmode" != prog; then
2021 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2022 continue
2023 fi
2024 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2025 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2026 for search_ext in .la $std_shrext .so .a; do
2027 # Search the libtool library
2028 lib="$searchdir/lib${name}${search_ext}"
2029 if test -f "$lib"; then
2030 if test "$search_ext" = ".la"; then
2031 found=yes
2032 else
2033 found=no
2034 fi
2035 break 2
2036 fi
2037 done
2038 done
2039 if test "$found" != yes; then
2040 # deplib doesn't seem to be a libtool library
2041 if test "$linkmode,$pass" = "prog,link"; then
2042 compile_deplibs="$deplib $compile_deplibs"
2043 finalize_deplibs="$deplib $finalize_deplibs"
2044 else
2045 deplibs="$deplib $deplibs"
2046 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2047 fi
2048 continue
2049 else # deplib is a libtool library
2050 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2051 # We need to do some special things here, and not later.
2052 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2053 case " $predeps $postdeps " in
2054 *" $deplib "*)
2055 if (${SED} -e '2q' $lib |
2056 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2057 library_names=
2058 old_library=
2059 case $lib in
2060 */* | *\\*) . $lib ;;
2061 *) . ./$lib ;;
2062 esac
2063 for l in $old_library $library_names; do
2064 ll="$l"
2065 done
2066 if test "X$ll" = "X$old_library" ; then # only static version available
2067 found=no
2068 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2069 test "X$ladir" = "X$lib" && ladir="."
2070 lib=$ladir/$old_library
2071 if test "$linkmode,$pass" = "prog,link"; then
2072 compile_deplibs="$deplib $compile_deplibs"
2073 finalize_deplibs="$deplib $finalize_deplibs"
2074 else
2075 deplibs="$deplib $deplibs"
2076 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2077 fi
2078 continue
2079 fi
2080 fi
2081 ;;
2082 *) ;;
2083 esac
2084 fi
2085 fi
2086 ;; # -l
2087 -L*)
2088 case $linkmode in
2089 lib)
2090 deplibs="$deplib $deplibs"
2091 test "$pass" = conv && continue
2092 newdependency_libs="$deplib $newdependency_libs"
2093 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2094 ;;
2095 prog)
2096 if test "$pass" = conv; then
2097 deplibs="$deplib $deplibs"
2098 continue
2099 fi
2100 if test "$pass" = scan; then
2101 deplibs="$deplib $deplibs"
2102 else
2103 compile_deplibs="$deplib $compile_deplibs"
2104 finalize_deplibs="$deplib $finalize_deplibs"
2105 fi
2106 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2107 ;;
2108 *)
2109 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2110 ;;
2111 esac # linkmode
2112 continue
2113 ;; # -L
2114 -R*)
2115 if test "$pass" = link; then
2116 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2117 # Make sure the xrpath contains only unique directories.
2118 case "$xrpath " in
2119 *" $dir "*) ;;
2120 *) xrpath="$xrpath $dir" ;;
2121 esac
2122 fi
2123 deplibs="$deplib $deplibs"
2124 continue
2125 ;;
2126 *.la) lib="$deplib" ;;
2127 *.$libext)
2128 if test "$pass" = conv; then
2129 deplibs="$deplib $deplibs"
2130 continue
2131 fi
2132 case $linkmode in
2133 lib)
2134 valid_a_lib=no
2135 case $deplibs_check_method in
2136 match_pattern*)
2137 set dummy $deplibs_check_method
2138 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2139 if eval $echo \"$deplib\" 2>/dev/null \
2140 | $SED 10q \
2141 | $EGREP "$match_pattern_regex" > /dev/null; then
2142 valid_a_lib=yes
2143 fi
2144 ;;
2145 pass_all)
2146 valid_a_lib=yes
2147 ;;
2148 esac
2149 if test "$valid_a_lib" != yes; then
2150 $echo
2151 $echo "*** Warning: Trying to link with static lib archive $deplib."
2152 $echo "*** I have the capability to make that library automatically link in when"
2153 $echo "*** you link to this library. But I can only do this if you have a"
2154 $echo "*** shared version of the library, which you do not appear to have"
2155 $echo "*** because the file extensions .$libext of this argument makes me believe"
2156 $echo "*** that it is just a static archive that I should not used here."
2157 else
2158 $echo
2159 $echo "*** Warning: Linking the shared library $output against the"
2160 $echo "*** static library $deplib is not portable!"
2161 deplibs="$deplib $deplibs"
2162 fi
2163 continue
2164 ;;
2165 prog)
2166 if test "$pass" != link; then
2167 deplibs="$deplib $deplibs"
2168 else
2169 compile_deplibs="$deplib $compile_deplibs"
2170 finalize_deplibs="$deplib $finalize_deplibs"
2171 fi
2172 continue
2173 ;;
2174 esac # linkmode
2175 ;; # *.$libext
2176 *.lo | *.$objext)
2177 if test "$pass" = conv; then
2178 deplibs="$deplib $deplibs"
2179 elif test "$linkmode" = prog; then
2180 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2181 # If there is no dlopen support or we're linking statically,
2182 # we need to preload.
2183 newdlprefiles="$newdlprefiles $deplib"
2184 compile_deplibs="$deplib $compile_deplibs"
2185 finalize_deplibs="$deplib $finalize_deplibs"
2186 else
2187 newdlfiles="$newdlfiles $deplib"
2188 fi
2189 fi
2190 continue
2191 ;;
2192 %DEPLIBS%)
2193 alldeplibs=yes
2194 continue
2195 ;;
2196 esac # case $deplib
2197 if test "$found" = yes || test -f "$lib"; then :
2198 else
2199 $echo "$modename: cannot find the library \`$lib'" 1>&2
2200 exit $EXIT_FAILURE
2201 fi
2202
2203 # Check to see that this really is a libtool archive.
2204 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2205 else
2206 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2207 exit $EXIT_FAILURE
2208 fi
2209
2210 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2211 test "X$ladir" = "X$lib" && ladir="."
2212
2213 dlname=
2214 dlopen=
2215 dlpreopen=
2216 libdir=
2217 library_names=
2218 old_library=
2219 # If the library was installed with an old release of libtool,
2220 # it will not redefine variables installed, or shouldnotlink
2221 installed=yes
2222 shouldnotlink=no
2223 avoidtemprpath=
2224
2225
2226 # Read the .la file
2227 case $lib in
2228 */* | *\\*) . $lib ;;
2229 *) . ./$lib ;;
2230 esac
2231
2232 if test "$linkmode,$pass" = "lib,link" ||
2233 test "$linkmode,$pass" = "prog,scan" ||
2234 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
2235 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
2236 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
2237 fi
2238
2239 if test "$pass" = conv; then
2240 # Only check for convenience libraries
2241 deplibs="$lib $deplibs"
2242 if test -z "$libdir"; then
2243 if test -z "$old_library"; then
2244 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2245 exit $EXIT_FAILURE
2246 fi
2247 # It is a libtool convenience library, so add in its objects.
2248 convenience="$convenience $ladir/$objdir/$old_library"
2249 old_convenience="$old_convenience $ladir/$objdir/$old_library"
2250 tmp_libs=
2251 for deplib in $dependency_libs; do
2252 deplibs="$deplib $deplibs"
2253 if test "X$duplicate_deps" = "Xyes" ; then
2254 case "$tmp_libs " in
2255 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2256 esac
2257 fi
2258 tmp_libs="$tmp_libs $deplib"
2259 done
2260 elif test "$linkmode" != prog && test "$linkmode" != lib; then
2261 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2262 exit $EXIT_FAILURE
2263 fi
2264 continue
2265 fi # $pass = conv
2266
2267
2268 # Get the name of the library we link against.
2269 linklib=
2270 for l in $old_library $library_names; do
2271 linklib="$l"
2272 done
2273 if test -z "$linklib"; then
2274 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2275 exit $EXIT_FAILURE
2276 fi
2277
2278 # This library was specified with -dlopen.
2279 if test "$pass" = dlopen; then
2280 if test -z "$libdir"; then
2281 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2282 exit $EXIT_FAILURE
2283 fi
2284 if test -z "$dlname" ||
2285 test "$dlopen_support" != yes ||
2286 test "$build_libtool_libs" = no; then
2287 # If there is no dlname, no dlopen support or we're linking
2288 # statically, we need to preload. We also need to preload any
2289 # dependent libraries so libltdl's deplib preloader doesn't
2290 # bomb out in the load deplibs phase.
2291 dlprefiles="$dlprefiles $lib $dependency_libs"
2292 else
2293 newdlfiles="$newdlfiles $lib"
2294 fi
2295 continue
2296 fi # $pass = dlopen
2297
2298 # We need an absolute path.
2299 case $ladir in
2300 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
2301 *)
2302 abs_ladir=`cd "$ladir" && pwd`
2303 if test -z "$abs_ladir"; then
2304 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2305 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2306 abs_ladir="$ladir"
2307 fi
2308 ;;
2309 esac
2310 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2311
2312 # Find the relevant object directory and library name.
2313 if test "X$installed" = Xyes; then
2314 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2315 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2316 dir="$ladir"
2317 absdir="$abs_ladir"
2318 libdir="$abs_ladir"
2319 else
2320 dir="$libdir"
2321 absdir="$libdir"
2322 fi
2323 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2324 else
2325 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2326 dir="$ladir"
2327 absdir="$abs_ladir"
2328 # Remove this search path later
2329 notinst_path="$notinst_path $abs_ladir"
2330 else
2331 dir="$ladir/$objdir"
2332 absdir="$abs_ladir/$objdir"
2333 # Remove this search path later
2334 notinst_path="$notinst_path $abs_ladir"
2335 fi
2336 fi # $installed = yes
2337 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2338
2339 # This library was specified with -dlpreopen.
2340 if test "$pass" = dlpreopen; then
2341 if test -z "$libdir"; then
2342 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2343 exit $EXIT_FAILURE
2344 fi
2345 # Prefer using a static library (so that no silly _DYNAMIC symbols
2346 # are required to link).
2347 if test -n "$old_library"; then
2348 newdlprefiles="$newdlprefiles $dir/$old_library"
2349 # Otherwise, use the dlname, so that lt_dlopen finds it.
2350 elif test -n "$dlname"; then
2351 newdlprefiles="$newdlprefiles $dir/$dlname"
2352 else
2353 newdlprefiles="$newdlprefiles $dir/$linklib"
2354 fi
2355 fi # $pass = dlpreopen
2356
2357 if test -z "$libdir"; then
2358 # Link the convenience library
2359 if test "$linkmode" = lib; then
2360 deplibs="$dir/$old_library $deplibs"
2361 elif test "$linkmode,$pass" = "prog,link"; then
2362 compile_deplibs="$dir/$old_library $compile_deplibs"
2363 finalize_deplibs="$dir/$old_library $finalize_deplibs"
2364 else
2365 deplibs="$lib $deplibs" # used for prog,scan pass
2366 fi
2367 continue
2368 fi
2369
2370
2371 if test "$linkmode" = prog && test "$pass" != link; then
2372 newlib_search_path="$newlib_search_path $ladir"
2373 deplibs="$lib $deplibs"
2374
2375 linkalldeplibs=no
2376 if test "$link_all_deplibs" != no || test -z "$library_names" ||
2377 test "$build_libtool_libs" = no; then
2378 linkalldeplibs=yes
2379 fi
2380
2381 tmp_libs=
2382 for deplib in $dependency_libs; do
2383 case $deplib in
2384 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2385 esac
2386 # Need to link against all dependency_libs?
2387 if test "$linkalldeplibs" = yes; then
2388 deplibs="$deplib $deplibs"
2389 else
2390 # Need to hardcode shared library paths
2391 # or/and link against static libraries
2392 newdependency_libs="$deplib $newdependency_libs"
2393 fi
2394 if test "X$duplicate_deps" = "Xyes" ; then
2395 case "$tmp_libs " in
2396 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2397 esac
2398 fi
2399 tmp_libs="$tmp_libs $deplib"
2400 done # for deplib
2401 continue
2402 fi # $linkmode = prog...
2403
2404 if test "$linkmode,$pass" = "prog,link"; then
2405 if test -n "$library_names" &&
2406 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2407 # We need to hardcode the library path
2408 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2409 # Make sure the rpath contains only unique directories.
2410 case "$temp_rpath " in
2411 *" $dir "*) ;;
2412 *" $absdir "*) ;;
2413 *) temp_rpath="$temp_rpath $absdir" ;;
2414 esac
2415 fi
2416
2417 # Hardcode the library path.
2418 # Skip directories that are in the system default run-time
2419 # search path.
2420 case " $sys_lib_dlsearch_path " in
2421 *" $absdir "*) ;;
2422 *)
2423 case "$compile_rpath " in
2424 *" $absdir "*) ;;
2425 *) compile_rpath="$compile_rpath $absdir"
2426 esac
2427 ;;
2428 esac
2429 case " $sys_lib_dlsearch_path " in
2430 *" $libdir "*) ;;
2431 *)
2432 case "$finalize_rpath " in
2433 *" $libdir "*) ;;
2434 *) finalize_rpath="$finalize_rpath $libdir"
2435 esac
2436 ;;
2437 esac
2438 fi # $linkmode,$pass = prog,link...
2439
2440 if test "$alldeplibs" = yes &&
2441 { test "$deplibs_check_method" = pass_all ||
2442 { test "$build_libtool_libs" = yes &&
2443 test -n "$library_names"; }; }; then
2444 # We only need to search for static libraries
2445 continue
2446 fi
2447 fi
2448
2449 link_static=no # Whether the deplib will be linked statically
2450 if test -n "$library_names" &&
2451 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2452 if test "$installed" = no; then
2453 notinst_deplibs="$notinst_deplibs $lib"
2454 need_relink=yes
2455 fi
2456 # This is a shared library
2457
2458 # Warn about portability, can't link against -module's on
2459 # some systems (darwin)
2460 if test "$shouldnotlink" = yes && test "$pass" = link ; then
2461 $echo
2462 if test "$linkmode" = prog; then
2463 $echo "*** Warning: Linking the executable $output against the loadable module"
2464 else
2465 $echo "*** Warning: Linking the shared library $output against the loadable module"
2466 fi
2467 $echo "*** $linklib is not portable!"
2468 fi
2469 if test "$linkmode" = lib &&
2470 test "$hardcode_into_libs" = yes; then
2471 # Hardcode the library path.
2472 # Skip directories that are in the system default run-time
2473 # search path.
2474 case " $sys_lib_dlsearch_path " in
2475 *" $absdir "*) ;;
2476 *)
2477 case "$compile_rpath " in
2478 *" $absdir "*) ;;
2479 *) compile_rpath="$compile_rpath $absdir"
2480 esac
2481 ;;
2482 esac
2483 case " $sys_lib_dlsearch_path " in
2484 *" $libdir "*) ;;
2485 *)
2486 case "$finalize_rpath " in
2487 *" $libdir "*) ;;
2488 *) finalize_rpath="$finalize_rpath $libdir"
2489 esac
2490 ;;
2491 esac
2492 fi
2493
2494 if test -n "$old_archive_from_expsyms_cmds"; then
2495 # figure out the soname
2496 set dummy $library_names
2497 realname="$2"
2498 shift; shift
2499 libname=`eval \\$echo \"$libname_spec\"`
2500 # use dlname if we got it. it's perfectly good, no?
2501 if test -n "$dlname"; then
2502 soname="$dlname"
2503 elif test -n "$soname_spec"; then
2504 # bleh windows
2505 case $host in
2506 *cygwin* | mingw*)
2507 major=`expr $current - $age`
2508 versuffix="-$major"
2509 ;;
2510 esac
2511 eval soname=\"$soname_spec\"
2512 else
2513 soname="$realname"
2514 fi
2515
2516 # Make a new name for the extract_expsyms_cmds to use
2517 soroot="$soname"
2518 soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
2519 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2520
2521 # If the library has no export list, then create one now
2522 if test -f "$output_objdir/$soname-def"; then :
2523 else
2524 $show "extracting exported symbol list from \`$soname'"
2525 save_ifs="$IFS"; IFS='~'
2526 cmds=$extract_expsyms_cmds
2527 for cmd in $cmds; do
2528 IFS="$save_ifs"
2529 eval cmd=\"$cmd\"
2530 $show "$cmd"
2531 $run eval "$cmd" || exit $?
2532 done
2533 IFS="$save_ifs"
2534 fi
2535
2536 # Create $newlib
2537 if test -f "$output_objdir/$newlib"; then :; else
2538 $show "generating import library for \`$soname'"
2539 save_ifs="$IFS"; IFS='~'
2540 cmds=$old_archive_from_expsyms_cmds
2541 for cmd in $cmds; do
2542 IFS="$save_ifs"
2543 eval cmd=\"$cmd\"
2544 $show "$cmd"
2545 $run eval "$cmd" || exit $?
2546 done
2547 IFS="$save_ifs"
2548 fi
2549 # make sure the library variables are pointing to the new library
2550 dir=$output_objdir
2551 linklib=$newlib
2552 fi # test -n "$old_archive_from_expsyms_cmds"
2553
2554 if test "$linkmode" = prog || test "$mode" != relink; then
2555 add_shlibpath=
2556 add_dir=
2557 add=
2558 lib_linked=yes
2559 case $hardcode_action in
2560 immediate | unsupported)
2561 if test "$hardcode_direct" = no; then
2562 add="$dir/$linklib"
2563 case $host in
2564 *-*-sco3.2v5* ) add_dir="-L$dir" ;;
2565 *-*-darwin* )
2566 # if the lib is a module then we can not link against
2567 # it, someone is ignoring the new warnings I added
2568 if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
2569 $echo "** Warning, lib $linklib is a module, not a shared library"
2570 if test -z "$old_library" ; then
2571 $echo
2572 $echo "** And there doesn't seem to be a static archive available"
2573 $echo "** The link will probably fail, sorry"
2574 else
2575 add="$dir/$old_library"
2576 fi
2577 fi
2578 esac
2579 elif test "$hardcode_minus_L" = no; then
2580 case $host in
2581 *-*-sunos*) add_shlibpath="$dir" ;;
2582 esac
2583 add_dir="-L$dir"
2584 add="-l$name"
2585 elif test "$hardcode_shlibpath_var" = no; then
2586 add_shlibpath="$dir"
2587 add="-l$name"
2588 else
2589 lib_linked=no
2590 fi
2591 ;;
2592 relink)
2593 if test "$hardcode_direct" = yes; then
2594 add="$dir/$linklib"
2595 elif test "$hardcode_minus_L" = yes; then
2596 add_dir="-L$dir"
2597 # Try looking first in the location we're being installed to.
2598 if test -n "$inst_prefix_dir"; then
2599 case $libdir in
2600 [\\/]*)
2601 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2602 ;;
2603 esac
2604 fi
2605 add="-l$name"
2606 elif test "$hardcode_shlibpath_var" = yes; then
2607 add_shlibpath="$dir"
2608 add="-l$name"
2609 else
2610 lib_linked=no
2611 fi
2612 ;;
2613 *) lib_linked=no ;;
2614 esac
2615
2616 if test "$lib_linked" != yes; then
2617 $echo "$modename: configuration error: unsupported hardcode properties"
2618 exit $EXIT_FAILURE
2619 fi
2620
2621 if test -n "$add_shlibpath"; then
2622 case :$compile_shlibpath: in
2623 *":$add_shlibpath:"*) ;;
2624 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
2625 esac
2626 fi
2627 if test "$linkmode" = prog; then
2628 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
2629 test -n "$add" && compile_deplibs="$add $compile_deplibs"
2630 else
2631 test -n "$add_dir" && deplibs="$add_dir $deplibs"
2632 test -n "$add" && deplibs="$add $deplibs"
2633 if test "$hardcode_direct" != yes && \
2634 test "$hardcode_minus_L" != yes && \
2635 test "$hardcode_shlibpath_var" = yes; then
2636 case :$finalize_shlibpath: in
2637 *":$libdir:"*) ;;
2638 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2639 esac
2640 fi
2641 fi
2642 fi
2643
2644 if test "$linkmode" = prog || test "$mode" = relink; then
2645 add_shlibpath=
2646 add_dir=
2647 add=
2648 # Finalize command for both is simple: just hardcode it.
2649 if test "$hardcode_direct" = yes; then
2650 add="$libdir/$linklib"
2651 elif test "$hardcode_minus_L" = yes; then
2652 add_dir="-L$libdir"
2653 add="-l$name"
2654 elif test "$hardcode_shlibpath_var" = yes; then
2655 case :$finalize_shlibpath: in
2656 *":$libdir:"*) ;;
2657 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2658 esac
2659 add="-l$name"
2660 elif test "$hardcode_automatic" = yes; then
2661 if test -n "$inst_prefix_dir" &&
2662 test -f "$inst_prefix_dir$libdir/$linklib" ; then
2663 add="$inst_prefix_dir$libdir/$linklib"
2664 else
2665 add="$libdir/$linklib"
2666 fi
2667 else
2668 # We cannot seem to hardcode it, guess we'll fake it.
2669 add_dir="-L$libdir"
2670 # Try looking first in the location we're being installed to.
2671 if test -n "$inst_prefix_dir"; then
2672 case $libdir in
2673 [\\/]*)
2674 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2675 ;;
2676 esac
2677 fi
2678 add="-l$name"
2679 fi
2680
2681 if test "$linkmode" = prog; then
2682 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
2683 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
2684 else
2685 test -n "$add_dir" && deplibs="$add_dir $deplibs"
2686 test -n "$add" && deplibs="$add $deplibs"
2687 fi
2688 fi
2689 elif test "$linkmode" = prog; then
2690 # Here we assume that one of hardcode_direct or hardcode_minus_L
2691 # is not unsupported. This is valid on all known static and
2692 # shared platforms.
2693 if test "$hardcode_direct" != unsupported; then
2694 test -n "$old_library" && linklib="$old_library"
2695 compile_deplibs="$dir/$linklib $compile_deplibs"
2696 finalize_deplibs="$dir/$linklib $finalize_deplibs"
2697 else
2698 compile_deplibs="-l$name -L$dir $compile_deplibs"
2699 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
2700 fi
2701 elif test "$build_libtool_libs" = yes; then
2702 # Not a shared library
2703 if test "$deplibs_check_method" != pass_all; then
2704 # We're trying link a shared library against a static one
2705 # but the system doesn't support it.
2706
2707 # Just print a warning and add the library to dependency_libs so
2708 # that the program can be linked against the static library.
2709 $echo
2710 $echo "*** Warning: This system can not link to static lib archive $lib."
2711 $echo "*** I have the capability to make that library automatically link in when"
2712 $echo "*** you link to this library. But I can only do this if you have a"
2713 $echo "*** shared version of the library, which you do not appear to have."
2714 if test "$module" = yes; then
2715 $echo "*** But as you try to build a module library, libtool will still create "
2716 $echo "*** a static module, that should work as long as the dlopening application"
2717 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
2718 if test -z "$global_symbol_pipe"; then
2719 $echo
2720 $echo "*** However, this would only work if libtool was able to extract symbol"
2721 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2722 $echo "*** not find such a program. So, this module is probably useless."
2723 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
2724 fi
2725 if test "$build_old_libs" = no; then
2726 build_libtool_libs=module
2727 build_old_libs=yes
2728 else
2729 build_libtool_libs=no
2730 fi
2731 fi
2732 else
2733 deplibs="$dir/$old_library $deplibs"
2734 link_static=yes
2735 fi
2736 fi # link shared/static library?
2737
2738 if test "$linkmode" = lib; then
2739 if test -n "$dependency_libs" &&
2740 { test "$hardcode_into_libs" != yes ||
2741 test "$build_old_libs" = yes ||
2742 test "$link_static" = yes; }; then
2743 # Extract -R from dependency_libs
2744 temp_deplibs=
2745 for libdir in $dependency_libs; do
2746 case $libdir in
2747 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2748 case " $xrpath " in
2749 *" $temp_xrpath "*) ;;
2750 *) xrpath="$xrpath $temp_xrpath";;
2751 esac;;
2752 *) temp_deplibs="$temp_deplibs $libdir";;
2753 esac
2754 done
2755 dependency_libs="$temp_deplibs"
2756 fi
2757
2758 newlib_search_path="$newlib_search_path $absdir"
2759 # Link against this library
2760 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
2761 # ... and its dependency_libs
2762 tmp_libs=
2763 for deplib in $dependency_libs; do
2764 newdependency_libs="$deplib $newdependency_libs"
2765 if test "X$duplicate_deps" = "Xyes" ; then
2766 case "$tmp_libs " in
2767 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2768 esac
2769 fi
2770 tmp_libs="$tmp_libs $deplib"
2771 done
2772
2773 if test "$link_all_deplibs" != no; then
2774 # Add the search paths of all dependency libraries
2775 for deplib in $dependency_libs; do
2776 case $deplib in
2777 -L*) path="$deplib" ;;
2778 *.la)
2779 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2780 test "X$dir" = "X$deplib" && dir="."
2781 # We need an absolute path.
2782 case $dir in
2783 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
2784 *)
2785 absdir=`cd "$dir" && pwd`
2786 if test -z "$absdir"; then
2787 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2788 absdir="$dir"
2789 fi
2790 ;;
2791 esac
2792 if grep "^installed=no" $deplib > /dev/null; then
2793 path="$absdir/$objdir"
2794 else
2795 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2796 if test -z "$libdir"; then
2797 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2798 exit $EXIT_FAILURE
2799 fi
2800 if test "$absdir" != "$libdir"; then
2801 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2802 fi
2803 path="$absdir"
2804 fi
2805 depdepl=
2806 case $host in
2807 *-*-darwin*)
2808 # we do not want to link against static libs,
2809 # but need to link against shared
2810 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
2811 if test -n "$deplibrary_names" ; then
2812 for tmp in $deplibrary_names ; do
2813 depdepl=$tmp
2814 done
2815 if test -f "$path/$depdepl" ; then
2816 depdepl="$path/$depdepl"
2817 fi
2818 # do not add paths which are already there
2819 case " $newlib_search_path " in
2820 *" $path "*) ;;
2821 *) newlib_search_path="$newlib_search_path $path";;
2822 esac
2823 fi
2824 path=""
2825 ;;
2826 *)
2827 path="-L$path"
2828 ;;
2829 esac
2830 ;;
2831 -l*)
2832 case $host in
2833 *-*-darwin*)
2834 # Again, we only want to link against shared libraries
2835 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
2836 for tmp in $newlib_search_path ; do
2837 if test -f "$tmp/lib$tmp_libs.dylib" ; then
2838 eval depdepl="$tmp/lib$tmp_libs.dylib"
2839 break
2840 fi
2841 done
2842 path=""
2843 ;;
2844 *) continue ;;
2845 esac
2846 ;;
2847 *) continue ;;
2848 esac
2849 case " $deplibs " in
2850 *" $path "*) ;;
2851 *) deplibs="$path $deplibs" ;;
2852 esac
2853 case " $deplibs " in
2854 *" $depdepl "*) ;;
2855 *) deplibs="$depdepl $deplibs" ;;
2856 esac
2857 done
2858 fi # link_all_deplibs != no
2859 fi # linkmode = lib
2860 done # for deplib in $libs
2861 dependency_libs="$newdependency_libs"
2862 if test "$pass" = dlpreopen; then
2863 # Link the dlpreopened libraries before other libraries
2864 for deplib in $save_deplibs; do
2865 deplibs="$deplib $deplibs"
2866 done
2867 fi
2868 if test "$pass" != dlopen; then
2869 if test "$pass" != conv; then
2870 # Make sure lib_search_path contains only unique directories.
2871 lib_search_path=
2872 for dir in $newlib_search_path; do
2873 case "$lib_search_path " in
2874 *" $dir "*) ;;
2875 *) lib_search_path="$lib_search_path $dir" ;;
2876 esac
2877 done
2878 newlib_search_path=
2879 fi
2880
2881 if test "$linkmode,$pass" != "prog,link"; then
2882 vars="deplibs"
2883 else
2884 vars="compile_deplibs finalize_deplibs"
2885 fi
2886 for var in $vars dependency_libs; do
2887 # Add libraries to $var in reverse order
2888 eval tmp_libs=\"\$$var\"
2889 new_libs=
2890 for deplib in $tmp_libs; do
2891 # FIXME: Pedantically, this is the right thing to do, so
2892 # that some nasty dependency loop isn't accidentally
2893 # broken:
2894 #new_libs="$deplib $new_libs"
2895 # Pragmatically, this seems to cause very few problems in
2896 # practice:
2897 case $deplib in
2898 -L*) new_libs="$deplib $new_libs" ;;
2899 -R*) ;;
2900 *)
2901 # And here is the reason: when a library appears more
2902 # than once as an explicit dependence of a library, or
2903 # is implicitly linked in more than once by the
2904 # compiler, it is considered special, and multiple
2905 # occurrences thereof are not removed. Compare this
2906 # with having the same library being listed as a
2907 # dependency of multiple other libraries: in this case,
2908 # we know (pedantically, we assume) the library does not
2909 # need to be listed more than once, so we keep only the
2910 # last copy. This is not always right, but it is rare
2911 # enough that we require users that really mean to play
2912 # such unportable linking tricks to link the library
2913 # using -Wl,-lname, so that libtool does not consider it
2914 # for duplicate removal.
2915 case " $specialdeplibs " in
2916 *" $deplib "*) new_libs="$deplib $new_libs" ;;
2917 *)
2918 case " $new_libs " in
2919 *" $deplib "*) ;;
2920 *) new_libs="$deplib $new_libs" ;;
2921 esac
2922 ;;
2923 esac
2924 ;;
2925 esac
2926 done
2927 tmp_libs=
2928 for deplib in $new_libs; do
2929 case $deplib in
2930 -L*)
2931 case " $tmp_libs " in
2932 *" $deplib "*) ;;
2933 *) tmp_libs="$tmp_libs $deplib" ;;
2934 esac
2935 ;;
2936 *) tmp_libs="$tmp_libs $deplib" ;;
2937 esac
2938 done
2939 eval $var=\"$tmp_libs\"
2940 done # for var
2941 fi
2942 # Last step: remove runtime libs from dependency_libs
2943 # (they stay in deplibs)
2944 tmp_libs=
2945 for i in $dependency_libs ; do
2946 case " $predeps $postdeps $compiler_lib_search_path " in
2947 *" $i "*)
2948 i=""
2949 ;;
2950 esac
2951 if test -n "$i" ; then
2952 tmp_libs="$tmp_libs $i"
2953 fi
2954 done
2955 dependency_libs=$tmp_libs
2956 done # for pass
2957 if test "$linkmode" = prog; then
2958 dlfiles="$newdlfiles"
2959 dlprefiles="$newdlprefiles"
2960 fi
2961
2962 case $linkmode in
2963 oldlib)
2964 if test -n "$deplibs"; then
2965 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
2966 fi
2967
2968 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2969 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
2970 fi
2971
2972 if test -n "$rpath"; then
2973 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
2974 fi
2975
2976 if test -n "$xrpath"; then
2977 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
2978 fi
2979
2980 if test -n "$vinfo"; then
2981 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
2982 fi
2983
2984 if test -n "$release"; then
2985 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
2986 fi
2987
2988 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
2989 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
2990 fi
2991
2992 # Now set the variables for building old libraries.
2993 build_libtool_libs=no
2994 oldlibs="$output"
2995 objs="$objs$old_deplibs"
2996 ;;
2997
2998 lib)
2999 # Make sure we only generate libraries of the form `libNAME.la'.
3000 case $outputname in
3001 lib*)
3002 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3003 eval shared_ext=\"$shrext_cmds\"
3004 eval libname=\"$libname_spec\"
3005 ;;
3006 *)
3007 if test "$module" = no; then
3008 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3009 $echo "$help" 1>&2
3010 exit $EXIT_FAILURE
3011 fi
3012 if test "$need_lib_prefix" != no; then
3013 # Add the "lib" prefix for modules if required
3014 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3015 eval shared_ext=\"$shrext_cmds\"
3016 eval libname=\"$libname_spec\"
3017 else
3018 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3019 fi
3020 ;;
3021 esac
3022
3023 if test -n "$objs"; then
3024 if test "$deplibs_check_method" != pass_all; then
3025 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3026 exit $EXIT_FAILURE
3027 else
3028 $echo
3029 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3030 $echo "*** objects $objs is not portable!"
3031 libobjs="$libobjs $objs"
3032 fi
3033 fi
3034
3035 if test "$dlself" != no; then
3036 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3037 fi
3038
3039 set dummy $rpath
3040 if test "$#" -gt 2; then
3041 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3042 fi
3043 install_libdir="$2"
3044
3045 oldlibs=
3046 if test -z "$rpath"; then
3047 if test "$build_libtool_libs" = yes; then
3048 # Building a libtool convenience library.
3049 # Some compilers have problems with a `.al' extension so
3050 # convenience libraries should have the same extension an
3051 # archive normally would.
3052 oldlibs="$output_objdir/$libname.$libext $oldlibs"
3053 build_libtool_libs=convenience
3054 build_old_libs=yes
3055 fi
3056
3057 if test -n "$vinfo"; then
3058 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3059 fi
3060
3061 if test -n "$release"; then
3062 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3063 fi
3064 else
3065
3066 # Parse the version information argument.
3067 save_ifs="$IFS"; IFS=':'
3068 set dummy $vinfo 0 0 0
3069 IFS="$save_ifs"
3070
3071 if test -n "$8"; then
3072 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3073 $echo "$help" 1>&2
3074 exit $EXIT_FAILURE
3075 fi
3076
3077 # convert absolute version numbers to libtool ages
3078 # this retains compatibility with .la files and attempts
3079 # to make the code below a bit more comprehensible
3080
3081 case $vinfo_number in
3082 yes)
3083 number_major="$2"
3084 number_minor="$3"
3085 number_revision="$4"
3086 #
3087 # There are really only two kinds -- those that
3088 # use the current revision as the major version
3089 # and those that subtract age and use age as
3090 # a minor version. But, then there is irix
3091 # which has an extra 1 added just for fun
3092 #
3093 case $version_type in
3094 darwin|linux|osf|windows)
3095 current=`expr $number_major + $number_minor`
3096 age="$number_minor"
3097 revision="$number_revision"
3098 ;;
3099 freebsd-aout|freebsd-elf|sunos)
3100 current="$number_major"
3101 revision="$number_minor"
3102 age="0"
3103 ;;
3104 irix|nonstopux)
3105 current=`expr $number_major + $number_minor - 1`
3106 age="$number_minor"
3107 revision="$number_minor"
3108 ;;
3109 *)
3110 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3111 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3112 exit $EXIT_FAILURE
3113 ;;
3114 esac
3115 ;;
3116 no)
3117 current="$2"
3118 revision="$3"
3119 age="$4"
3120 ;;
3121 esac
3122
3123 # Check that each of the things are valid numbers.
3124 case $current in
3125 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]) ;;
3126 *)
3127 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3128 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3129 exit $EXIT_FAILURE
3130 ;;
3131 esac
3132
3133 case $revision in
3134 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]) ;;
3135 *)
3136 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3137 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3138 exit $EXIT_FAILURE
3139 ;;
3140 esac
3141
3142 case $age in
3143 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]) ;;
3144 *)
3145 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
3146 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3147 exit $EXIT_FAILURE
3148 ;;
3149 esac
3150
3151 if test "$age" -gt "$current"; then
3152 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3153 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3154 exit $EXIT_FAILURE
3155 fi
3156
3157 # Calculate the version variables.
3158 major=
3159 versuffix=
3160 verstring=
3161 case $version_type in
3162 none) ;;
3163
3164 darwin)
3165 # Like Linux, but with the current version available in
3166 # verstring for coding it into the library header
3167 major=.`expr $current - $age`
3168 versuffix="$major.$age.$revision"
3169 # Darwin ld doesn't like 0 for these options...
3170 minor_current=`expr $current + 1`
3171 verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3172 ;;
3173
3174 freebsd-aout)
3175 major=".$current"
3176 versuffix=".$current.$revision";
3177 ;;
3178
3179 freebsd-elf)
3180 major=".$current"
3181 versuffix=".$current";
3182 ;;
3183
3184 irix | nonstopux)
3185 major=`expr $current - $age + 1`
3186
3187 case $version_type in
3188 nonstopux) verstring_prefix=nonstopux ;;
3189 *) verstring_prefix=sgi ;;
3190 esac
3191 verstring="$verstring_prefix$major.$revision"
3192
3193 # Add in all the interfaces that we are compatible with.
3194 loop=$revision
3195 while test "$loop" -ne 0; do
3196 iface=`expr $revision - $loop`
3197 loop=`expr $loop - 1`
3198 verstring="$verstring_prefix$major.$iface:$verstring"
3199 done
3200
3201 # Before this point, $major must not contain `.'.
3202 major=.$major
3203 versuffix="$major.$revision"
3204 ;;
3205
3206 linux)
3207 major=.`expr $current - $age`
3208 versuffix="$major.$age.$revision"
3209 ;;
3210
3211 osf)
3212 major=.`expr $current - $age`
3213 versuffix=".$current.$age.$revision"
3214 verstring="$current.$age.$revision"
3215
3216 # Add in all the interfaces that we are compatible with.
3217 loop=$age
3218 while test "$loop" -ne 0; do
3219 iface=`expr $current - $loop`
3220 loop=`expr $loop - 1`
3221 verstring="$verstring:${iface}.0"
3222 done
3223
3224 # Make executables depend on our current version.
3225 verstring="$verstring:${current}.0"
3226 ;;
3227
3228 sunos)
3229 major=".$current"
3230 versuffix=".$current.$revision"
3231 ;;
3232
3233 windows)
3234 # Use '-' rather than '.', since we only want one
3235 # extension on DOS 8.3 filesystems.
3236 major=`expr $current - $age`
3237 versuffix="-$major"
3238 ;;
3239
3240 *)
3241 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3242 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3243 exit $EXIT_FAILURE
3244 ;;
3245 esac
3246
3247 # Clear the version info if we defaulted, and they specified a release.
3248 if test -z "$vinfo" && test -n "$release"; then
3249 major=
3250 case $version_type in
3251 darwin)
3252 # we can't check for "0.0" in archive_cmds due to quoting
3253 # problems, so we reset it completely
3254 verstring=
3255 ;;
3256 *)
3257 verstring="0.0"
3258 ;;
3259 esac
3260 if test "$need_version" = no; then
3261 versuffix=
3262 else
3263 versuffix=".0.0"
3264 fi
3265 fi
3266
3267 # Remove version info from name if versioning should be avoided
3268 if test "$avoid_version" = yes && test "$need_version" = no; then
3269 major=
3270 versuffix=
3271 verstring=""
3272 fi
3273
3274 # Check to see if the archive will have undefined symbols.
3275 if test "$allow_undefined" = yes; then
3276 if test "$allow_undefined_flag" = unsupported; then
3277 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3278 build_libtool_libs=no
3279 build_old_libs=yes
3280 fi
3281 else
3282 # Don't allow undefined symbols.
3283 allow_undefined_flag="$no_undefined_flag"
3284 fi
3285 fi
3286
3287 if test "$mode" != relink; then
3288 # Remove our outputs, but don't remove object files since they
3289 # may have been created when compiling PIC objects.
3290 removelist=
3291 tempremovelist=`$echo "$output_objdir/*"`
3292 for p in $tempremovelist; do
3293 case $p in
3294 *.$objext)
3295 ;;
3296 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3297 if test "X$precious_files_regex" != "X"; then
3298 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
3299 then
3300 continue
3301 fi
3302 fi
3303 removelist="$removelist $p"
3304 ;;
3305 *) ;;
3306 esac
3307 done
3308 if test -n "$removelist"; then
3309 $show "${rm}r $removelist"
3310 $run ${rm}r $removelist
3311 fi
3312 fi
3313
3314 # Now set the variables for building old libraries.
3315 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
3316 oldlibs="$oldlibs $output_objdir/$libname.$libext"
3317
3318 # Transform .lo files to .o files.
3319 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3320 fi
3321
3322 # Eliminate all temporary directories.
3323 for path in $notinst_path; do
3324 lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
3325 deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
3326 dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
3327 done
3328
3329 if test -n "$xrpath"; then
3330 # If the user specified any rpath flags, then add them.
3331 temp_xrpath=
3332 for libdir in $xrpath; do
3333 temp_xrpath="$temp_xrpath -R$libdir"
3334 case "$finalize_rpath " in
3335 *" $libdir "*) ;;
3336 *) finalize_rpath="$finalize_rpath $libdir" ;;
3337 esac
3338 done
3339 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
3340 dependency_libs="$temp_xrpath $dependency_libs"
3341 fi
3342 fi
3343
3344 # Make sure dlfiles contains only unique files that won't be dlpreopened
3345 old_dlfiles="$dlfiles"
3346 dlfiles=
3347 for lib in $old_dlfiles; do
3348 case " $dlprefiles $dlfiles " in
3349 *" $lib "*) ;;
3350 *) dlfiles="$dlfiles $lib" ;;
3351 esac
3352 done
3353
3354 # Make sure dlprefiles contains only unique files
3355 old_dlprefiles="$dlprefiles"
3356 dlprefiles=
3357 for lib in $old_dlprefiles; do
3358 case "$dlprefiles " in
3359 *" $lib "*) ;;
3360 *) dlprefiles="$dlprefiles $lib" ;;
3361 esac
3362 done
3363
3364 if test "$build_libtool_libs" = yes; then
3365 if test -n "$rpath"; then
3366 case $host in
3367 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
3368 # these systems don't actually have a c library (as such)!
3369 ;;
3370 *-*-rhapsody* | *-*-darwin1.[012])
3371 # Rhapsody C library is in the System framework
3372 deplibs="$deplibs -framework System"
3373 ;;
3374 *-*-netbsd*)
3375 # Don't link with libc until the a.out ld.so is fixed.
3376 ;;
3377 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3378 # Do not include libc due to us having libc/libc_r.
3379 test "X$arg" = "X-lc" && continue
3380 ;;
3381 *)
3382 # Add libc to deplibs on all other systems if necessary.
3383 if test "$build_libtool_need_lc" = "yes"; then
3384 deplibs="$deplibs -lc"
3385 fi
3386 ;;
3387 esac
3388 fi
3389
3390 # Transform deplibs into only deplibs that can be linked in shared.
3391 name_save=$name
3392 libname_save=$libname
3393 release_save=$release
3394 versuffix_save=$versuffix
3395 major_save=$major
3396 # I'm not sure if I'm treating the release correctly. I think
3397 # release should show up in the -l (ie -lgmp5) so we don't want to
3398 # add it in twice. Is that correct?
3399 release=""
3400 versuffix=""
3401 major=""
3402 newdeplibs=
3403 droppeddeps=no
3404 case $deplibs_check_method in
3405 pass_all)
3406 # Don't check for shared/static. Everything works.
3407 # This might be a little naive. We might want to check
3408 # whether the library exists or not. But this is on
3409 # osf3 & osf4 and I'm not really sure... Just
3410 # implementing what was already the behavior.
3411 newdeplibs=$deplibs
3412 ;;
3413 test_compile)
3414 # This code stresses the "libraries are programs" paradigm to its
3415 # limits. Maybe even breaks it. We compile a program, linking it
3416 # against the deplibs as a proxy for the library. Then we can check
3417 # whether they linked in statically or dynamically with ldd.
3418 $rm conftest.c
3419 cat > conftest.c <<EOF
3420 int main() { return 0; }
3421 EOF
3422 $rm conftest
3423 $LTCC -o conftest conftest.c $deplibs
3424 if test "$?" -eq 0 ; then
3425 ldd_output=`ldd conftest`
3426 for i in $deplibs; do
3427 name=`expr $i : '-l\(.*\)'`
3428 # If $name is empty we are operating on a -L argument.
3429 if test "$name" != "" && test "$name" -ne "0"; then
3430 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3431 case " $predeps $postdeps " in
3432 *" $i "*)
3433 newdeplibs="$newdeplibs $i"
3434 i=""
3435 ;;
3436 esac
3437 fi
3438 if test -n "$i" ; then
3439 libname=`eval \\$echo \"$libname_spec\"`
3440 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3441 set dummy $deplib_matches
3442 deplib_match=$2
3443 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3444 newdeplibs="$newdeplibs $i"
3445 else
3446 droppeddeps=yes
3447 $echo
3448 $echo "*** Warning: dynamic linker does not accept needed library $i."
3449 $echo "*** I have the capability to make that library automatically link in when"
3450 $echo "*** you link to this library. But I can only do this if you have a"
3451 $echo "*** shared version of the library, which I believe you do not have"
3452 $echo "*** because a test_compile did reveal that the linker did not use it for"
3453 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3454 fi
3455 fi
3456 else
3457 newdeplibs="$newdeplibs $i"
3458 fi
3459 done
3460 else
3461 # Error occurred in the first compile. Let's try to salvage
3462 # the situation: Compile a separate program for each library.
3463 for i in $deplibs; do
3464 name=`expr $i : '-l\(.*\)'`
3465 # If $name is empty we are operating on a -L argument.
3466 if test "$name" != "" && test "$name" != "0"; then
3467 $rm conftest
3468 $LTCC -o conftest conftest.c $i
3469 # Did it work?
3470 if test "$?" -eq 0 ; then
3471 ldd_output=`ldd conftest`
3472 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3473 case " $predeps $postdeps " in
3474 *" $i "*)
3475 newdeplibs="$newdeplibs $i"
3476 i=""
3477 ;;
3478 esac
3479 fi
3480 if test -n "$i" ; then
3481 libname=`eval \\$echo \"$libname_spec\"`
3482 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3483 set dummy $deplib_matches
3484 deplib_match=$2
3485 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3486 newdeplibs="$newdeplibs $i"
3487 else
3488 droppeddeps=yes
3489 $echo
3490 $echo "*** Warning: dynamic linker does not accept needed library $i."
3491 $echo "*** I have the capability to make that library automatically link in when"
3492 $echo "*** you link to this library. But I can only do this if you have a"
3493 $echo "*** shared version of the library, which you do not appear to have"
3494 $echo "*** because a test_compile did reveal that the linker did not use this one"
3495 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3496 fi
3497 fi
3498 else
3499 droppeddeps=yes
3500 $echo
3501 $echo "*** Warning! Library $i is needed by this library but I was not able to"
3502 $echo "*** make it link in! You will probably need to install it or some"
3503 $echo "*** library that it depends on before this library will be fully"
3504 $echo "*** functional. Installing it before continuing would be even better."
3505 fi
3506 else
3507 newdeplibs="$newdeplibs $i"
3508 fi
3509 done
3510 fi
3511 ;;
3512 file_magic*)
3513 set dummy $deplibs_check_method
3514 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3515 for a_deplib in $deplibs; do
3516 name=`expr $a_deplib : '-l\(.*\)'`
3517 # If $name is empty we are operating on a -L argument.
3518 if test "$name" != "" && test "$name" != "0"; then
3519 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3520 case " $predeps $postdeps " in
3521 *" $a_deplib "*)
3522 newdeplibs="$newdeplibs $a_deplib"
3523 a_deplib=""
3524 ;;
3525 esac
3526 fi
3527 if test -n "$a_deplib" ; then
3528 libname=`eval \\$echo \"$libname_spec\"`
3529 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3530 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3531 for potent_lib in $potential_libs; do
3532 # Follow soft links.
3533 if ls -lLd "$potent_lib" 2>/dev/null \
3534 | grep " -> " >/dev/null; then
3535 continue
3536 fi
3537 # The statement above tries to avoid entering an
3538 # endless loop below, in case of cyclic links.
3539 # We might still enter an endless loop, since a link
3540 # loop can be closed while we follow links,
3541 # but so what?
3542 potlib="$potent_lib"
3543 while test -h "$potlib" 2>/dev/null; do
3544 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
3545 case $potliblink in
3546 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
3547 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3548 esac
3549 done
3550 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
3551 | ${SED} 10q \
3552 | $EGREP "$file_magic_regex" > /dev/null; then
3553 newdeplibs="$newdeplibs $a_deplib"
3554 a_deplib=""
3555 break 2
3556 fi
3557 done
3558 done
3559 fi
3560 if test -n "$a_deplib" ; then
3561 droppeddeps=yes
3562 $echo
3563 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3564 $echo "*** I have the capability to make that library automatically link in when"
3565 $echo "*** you link to this library. But I can only do this if you have a"
3566 $echo "*** shared version of the library, which you do not appear to have"
3567 $echo "*** because I did check the linker path looking for a file starting"
3568 if test -z "$potlib" ; then
3569 $echo "*** with $libname but no candidates were found. (...for file magic test)"
3570 else
3571 $echo "*** with $libname and none of the candidates passed a file format test"
3572 $echo "*** using a file magic. Last file checked: $potlib"
3573 fi
3574 fi
3575 else
3576 # Add a -L argument.
3577 newdeplibs="$newdeplibs $a_deplib"
3578 fi
3579 done # Gone through all deplibs.
3580 ;;
3581 match_pattern*)
3582 set dummy $deplibs_check_method
3583 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3584 for a_deplib in $deplibs; do
3585 name=`expr $a_deplib : '-l\(.*\)'`
3586 # If $name is empty we are operating on a -L argument.
3587 if test -n "$name" && test "$name" != "0"; then
3588 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3589 case " $predeps $postdeps " in
3590 *" $a_deplib "*)
3591 newdeplibs="$newdeplibs $a_deplib"
3592 a_deplib=""
3593 ;;
3594 esac
3595 fi
3596 if test -n "$a_deplib" ; then
3597 libname=`eval \\$echo \"$libname_spec\"`
3598 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3599 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3600 for potent_lib in $potential_libs; do
3601 potlib="$potent_lib" # see symlink-check above in file_magic test
3602 if eval $echo \"$potent_lib\" 2>/dev/null \
3603 | ${SED} 10q \
3604 | $EGREP "$match_pattern_regex" > /dev/null; then
3605 newdeplibs="$newdeplibs $a_deplib"
3606 a_deplib=""
3607 break 2
3608 fi
3609 done
3610 done
3611 fi
3612 if test -n "$a_deplib" ; then
3613 droppeddeps=yes
3614 $echo
3615 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3616 $echo "*** I have the capability to make that library automatically link in when"
3617 $echo "*** you link to this library. But I can only do this if you have a"
3618 $echo "*** shared version of the library, which you do not appear to have"
3619 $echo "*** because I did check the linker path looking for a file starting"
3620 if test -z "$potlib" ; then
3621 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3622 else
3623 $echo "*** with $libname and none of the candidates passed a file format test"
3624 $echo "*** using a regex pattern. Last file checked: $potlib"
3625 fi
3626 fi
3627 else
3628 # Add a -L argument.
3629 newdeplibs="$newdeplibs $a_deplib"
3630 fi
3631 done # Gone through all deplibs.
3632 ;;
3633 none | unknown | *)
3634 newdeplibs=""
3635 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3636 -e 's/ -[LR][^ ]*//g'`
3637 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3638 for i in $predeps $postdeps ; do
3639 # can't use Xsed below, because $i might contain '/'
3640 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3641 done
3642 fi
3643 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
3644 | grep . >/dev/null; then
3645 $echo
3646 if test "X$deplibs_check_method" = "Xnone"; then
3647 $echo "*** Warning: inter-library dependencies are not supported in this platform."
3648 else
3649 $echo "*** Warning: inter-library dependencies are not known to be supported."
3650 fi
3651 $echo "*** All declared inter-library dependencies are being dropped."
3652 droppeddeps=yes
3653 fi
3654 ;;
3655 esac
3656 versuffix=$versuffix_save
3657 major=$major_save
3658 release=$release_save
3659 libname=$libname_save
3660 name=$name_save
3661
3662 case $host in
3663 *-*-rhapsody* | *-*-darwin1.[012])
3664 # On Rhapsody replace the C library is the System framework
3665 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
3666 ;;
3667 esac
3668
3669 if test "$droppeddeps" = yes; then
3670 if test "$module" = yes; then
3671 $echo
3672 $echo "*** Warning: libtool could not satisfy all declared inter-library"
3673 $echo "*** dependencies of module $libname. Therefore, libtool will create"
3674 $echo "*** a static module, that should work as long as the dlopening"
3675 $echo "*** application is linked with the -dlopen flag."
3676 if test -z "$global_symbol_pipe"; then
3677 $echo
3678 $echo "*** However, this would only work if libtool was able to extract symbol"
3679 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3680 $echo "*** not find such a program. So, this module is probably useless."
3681 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3682 fi
3683 if test "$build_old_libs" = no; then
3684 oldlibs="$output_objdir/$libname.$libext"
3685 build_libtool_libs=module
3686 build_old_libs=yes
3687 else
3688 build_libtool_libs=no
3689 fi
3690 else
3691 $echo "*** The inter-library dependencies that have been dropped here will be"
3692 $echo "*** automatically added whenever a program is linked with this library"
3693 $echo "*** or is declared to -dlopen it."
3694
3695 if test "$allow_undefined" = no; then
3696 $echo
3697 $echo "*** Since this library must not contain undefined symbols,"
3698 $echo "*** because either the platform does not support them or"
3699 $echo "*** it was explicitly requested with -no-undefined,"
3700 $echo "*** libtool will only create a static version of it."
3701 if test "$build_old_libs" = no; then
3702 oldlibs="$output_objdir/$libname.$libext"
3703 build_libtool_libs=module
3704 build_old_libs=yes
3705 else
3706 build_libtool_libs=no
3707 fi
3708 fi
3709 fi
3710 fi
3711 # Done checking deplibs!
3712 deplibs=$newdeplibs
3713 fi
3714
3715 # All the library-specific variables (install_libdir is set above).
3716 library_names=
3717 old_library=
3718 dlname=
3719
3720 # Test again, we may have decided not to build it any more
3721 if test "$build_libtool_libs" = yes; then
3722 if test "$hardcode_into_libs" = yes; then
3723 # Hardcode the library paths
3724 hardcode_libdirs=
3725 dep_rpath=
3726 rpath="$finalize_rpath"
3727 test "$mode" != relink && rpath="$compile_rpath$rpath"
3728 for libdir in $rpath; do
3729 if test -n "$hardcode_libdir_flag_spec"; then
3730 if test -n "$hardcode_libdir_separator"; then
3731 if test -z "$hardcode_libdirs"; then
3732 hardcode_libdirs="$libdir"
3733 else
3734 # Just accumulate the unique libdirs.
3735 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3736 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3737 ;;
3738 *)
3739 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3740 ;;
3741 esac
3742 fi
3743 else
3744 eval flag=\"$hardcode_libdir_flag_spec\"
3745 dep_rpath="$dep_rpath $flag"
3746 fi
3747 elif test -n "$runpath_var"; then
3748 case "$perm_rpath " in
3749 *" $libdir "*) ;;
3750 *) perm_rpath="$perm_rpath $libdir" ;;
3751 esac
3752 fi
3753 done
3754 # Substitute the hardcoded libdirs into the rpath.
3755 if test -n "$hardcode_libdir_separator" &&
3756 test -n "$hardcode_libdirs"; then
3757 libdir="$hardcode_libdirs"
3758 if test -n "$hardcode_libdir_flag_spec_ld"; then
3759 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
3760 else
3761 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3762 fi
3763 fi
3764 if test -n "$runpath_var" && test -n "$perm_rpath"; then
3765 # We should set the runpath_var.
3766 rpath=
3767 for dir in $perm_rpath; do
3768 rpath="$rpath$dir:"
3769 done
3770 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3771 fi
3772 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
3773 fi
3774
3775 shlibpath="$finalize_shlibpath"
3776 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
3777 if test -n "$shlibpath"; then
3778 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3779 fi
3780
3781 # Get the real and link names of the library.
3782 eval shared_ext=\"$shrext_cmds\"
3783 eval library_names=\"$library_names_spec\"
3784 set dummy $library_names
3785 realname="$2"
3786 shift; shift
3787
3788 if test -n "$soname_spec"; then
3789 eval soname=\"$soname_spec\"
3790 else
3791 soname="$realname"
3792 fi
3793 if test -z "$dlname"; then
3794 dlname=$soname
3795 fi
3796
3797 lib="$output_objdir/$realname"
3798 for link
3799 do
3800 linknames="$linknames $link"
3801 done
3802
3803 # Use standard objects if they are pic
3804 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3805
3806 # Prepare the list of exported symbols
3807 if test -z "$export_symbols"; then
3808 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
3809 $show "generating symbol list for \`$libname.la'"
3810 export_symbols="$output_objdir/$libname.exp"
3811 $run $rm $export_symbols
3812 cmds=$export_symbols_cmds
3813 save_ifs="$IFS"; IFS='~'
3814 for cmd in $cmds; do
3815 IFS="$save_ifs"
3816 eval cmd=\"$cmd\"
3817 if len=`expr "X$cmd" : ".*"` &&
3818 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3819 $show "$cmd"
3820 $run eval "$cmd" || exit $?
3821 skipped_export=false
3822 else
3823 # The command line is too long to execute in one step.
3824 $show "using reloadable object file for export list..."
3825 skipped_export=:
3826 # Break out early, otherwise skipped_export may be
3827 # set to false by a later but shorter cmd.
3828 break
3829 fi
3830 done
3831 IFS="$save_ifs"
3832 if test -n "$export_symbols_regex"; then
3833 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
3834 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
3835 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
3836 $run eval '$mv "${export_symbols}T" "$export_symbols"'
3837 fi
3838 fi
3839 fi
3840
3841 if test -n "$export_symbols" && test -n "$include_expsyms"; then
3842 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
3843 fi
3844
3845 tmp_deplibs=
3846 for test_deplib in $deplibs; do
3847 case " $convenience " in
3848 *" $test_deplib "*) ;;
3849 *)
3850 tmp_deplibs="$tmp_deplibs $test_deplib"
3851 ;;
3852 esac
3853 done
3854 deplibs="$tmp_deplibs"
3855
3856 if test -n "$convenience"; then
3857 if test -n "$whole_archive_flag_spec"; then
3858 save_libobjs=$libobjs
3859 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
3860 else
3861 gentop="$output_objdir/${outputname}x"
3862 generated="$generated $gentop"
3863
3864 func_extract_archives $gentop $convenience
3865 libobjs="$libobjs $func_extract_archives_result"
3866 fi
3867 fi
3868
3869 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
3870 eval flag=\"$thread_safe_flag_spec\"
3871 linker_flags="$linker_flags $flag"
3872 fi
3873
3874 # Make a backup of the uninstalled library when relinking
3875 if test "$mode" = relink; then
3876 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
3877 fi
3878
3879 # Do each of the archive commands.
3880 if test "$module" = yes && test -n "$module_cmds" ; then
3881 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
3882 eval test_cmds=\"$module_expsym_cmds\"
3883 cmds=$module_expsym_cmds
3884 else
3885 eval test_cmds=\"$module_cmds\"
3886 cmds=$module_cmds
3887 fi
3888 else
3889 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
3890 eval test_cmds=\"$archive_expsym_cmds\"
3891 cmds=$archive_expsym_cmds
3892 else
3893 eval test_cmds=\"$archive_cmds\"
3894 cmds=$archive_cmds
3895 fi
3896 fi
3897
3898 if test "X$skipped_export" != "X:" &&
3899 len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
3900 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3901 :
3902 else
3903 # The command line is too long to link in one step, link piecewise.
3904 $echo "creating reloadable object files..."
3905
3906 # Save the value of $output and $libobjs because we want to
3907 # use them later. If we have whole_archive_flag_spec, we
3908 # want to use save_libobjs as it was before
3909 # whole_archive_flag_spec was expanded, because we can't
3910 # assume the linker understands whole_archive_flag_spec.
3911 # This may have to be revisited, in case too many
3912 # convenience libraries get linked in and end up exceeding
3913 # the spec.
3914 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
3915 save_libobjs=$libobjs
3916 fi
3917 save_output=$output
3918 output_la=`$echo "X$output" | $Xsed -e "$basename"`
3919
3920 # Clear the reloadable object creation command queue and
3921 # initialize k to one.
3922 test_cmds=
3923 concat_cmds=
3924 objlist=
3925 delfiles=
3926 last_robj=
3927 k=1
3928 output=$output_objdir/$output_la-${k}.$objext
3929 # Loop over the list of objects to be linked.
3930 for obj in $save_libobjs
3931 do
3932 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
3933 if test "X$objlist" = X ||
3934 { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
3935 test "$len" -le "$max_cmd_len"; }; then
3936 objlist="$objlist $obj"
3937 else
3938 # The command $test_cmds is almost too long, add a
3939 # command to the queue.
3940 if test "$k" -eq 1 ; then
3941 # The first file doesn't have a previous command to add.
3942 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
3943 else
3944 # All subsequent reloadable object files will link in
3945 # the last one created.
3946 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
3947 fi
3948 last_robj=$output_objdir/$output_la-${k}.$objext
3949 k=`expr $k + 1`
3950 output=$output_objdir/$output_la-${k}.$objext
3951 objlist=$obj
3952 len=1
3953 fi
3954 done
3955 # Handle the remaining objects by creating one last
3956 # reloadable object file. All subsequent reloadable object
3957 # files will link in the last one created.
3958 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
3959 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
3960
3961 if ${skipped_export-false}; then
3962 $show "generating symbol list for \`$libname.la'"
3963 export_symbols="$output_objdir/$libname.exp"
3964 $run $rm $export_symbols
3965 libobjs=$output
3966 # Append the command to create the export file.
3967 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
3968 fi
3969
3970 # Set up a command to remove the reloadable object files
3971 # after they are used.
3972 i=0
3973 while test "$i" -lt "$k"
3974 do
3975 i=`expr $i + 1`
3976 delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
3977 done
3978
3979 $echo "creating a temporary reloadable object file: $output"
3980
3981 # Loop through the commands generated above and execute them.
3982 save_ifs="$IFS"; IFS='~'
3983 for cmd in $concat_cmds; do
3984 IFS="$save_ifs"
3985 $show "$cmd"
3986 $run eval "$cmd" || exit $?
3987 done
3988 IFS="$save_ifs"
3989
3990 libobjs=$output
3991 # Restore the value of output.
3992 output=$save_output
3993
3994 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
3995 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
3996 fi
3997 # Expand the library linking commands again to reset the
3998 # value of $libobjs for piecewise linking.
3999
4000 # Do each of the archive commands.
4001 if test "$module" = yes && test -n "$module_cmds" ; then
4002 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4003 cmds=$module_expsym_cmds
4004 else
4005 cmds=$module_cmds
4006 fi
4007 else
4008 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4009 cmds=$archive_expsym_cmds
4010 else
4011 cmds=$archive_cmds
4012 fi
4013 fi
4014
4015 # Append the command to remove the reloadable object files
4016 # to the just-reset $cmds.
4017 eval cmds=\"\$cmds~\$rm $delfiles\"
4018 fi
4019 save_ifs="$IFS"; IFS='~'
4020 for cmd in $cmds; do
4021 IFS="$save_ifs"
4022 eval cmd=\"$cmd\"
4023 $show "$cmd"
4024 $run eval "$cmd" || {
4025 lt_exit=$?
4026
4027 # Restore the uninstalled library and exit
4028 if test "$mode" = relink; then
4029 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4030 fi
4031
4032 exit $lt_exit
4033 }
4034 done
4035 IFS="$save_ifs"
4036
4037 # Restore the uninstalled library and exit
4038 if test "$mode" = relink; then
4039 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4040
4041 if test -n "$convenience"; then
4042 if test -z "$whole_archive_flag_spec"; then
4043 $show "${rm}r $gentop"
4044 $run ${rm}r "$gentop"
4045 fi
4046 fi
4047
4048 exit $EXIT_SUCCESS
4049 fi
4050
4051 # Create links to the real library.
4052 for linkname in $linknames; do
4053 if test "$realname" != "$linkname"; then
4054 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4055 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
4056 fi
4057 done
4058
4059 # If -module or -export-dynamic was specified, set the dlname.
4060 if test "$module" = yes || test "$export_dynamic" = yes; then
4061 # On all known operating systems, these are identical.
4062 dlname="$soname"
4063 fi
4064 fi
4065 ;;
4066
4067 obj)
4068 if test -n "$deplibs"; then
4069 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4070 fi
4071
4072 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4073 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4074 fi
4075
4076 if test -n "$rpath"; then
4077 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4078 fi
4079
4080 if test -n "$xrpath"; then
4081 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4082 fi
4083
4084 if test -n "$vinfo"; then
4085 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4086 fi
4087
4088 if test -n "$release"; then
4089 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4090 fi
4091
4092 case $output in
4093 *.lo)
4094 if test -n "$objs$old_deplibs"; then
4095 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4096 exit $EXIT_FAILURE
4097 fi
4098 libobj="$output"
4099 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
4100 ;;
4101 *)
4102 libobj=
4103 obj="$output"
4104 ;;
4105 esac
4106
4107 # Delete the old objects.
4108 $run $rm $obj $libobj
4109
4110 # Objects from convenience libraries. This assumes
4111 # single-version convenience libraries. Whenever we create
4112 # different ones for PIC/non-PIC, this we'll have to duplicate
4113 # the extraction.
4114 reload_conv_objs=
4115 gentop=
4116 # reload_cmds runs $LD directly, so let us get rid of
4117 # -Wl from whole_archive_flag_spec
4118 wl=
4119
4120 if test -n "$convenience"; then
4121 if test -n "$whole_archive_flag_spec"; then
4122 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
4123 else
4124 gentop="$output_objdir/${obj}x"
4125 generated="$generated $gentop"
4126
4127 func_extract_archives $gentop $convenience
4128 reload_conv_objs="$reload_objs $func_extract_archives_result"
4129 fi
4130 fi
4131
4132 # Create the old-style object.
4133 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
4134
4135 output="$obj"
4136 cmds=$reload_cmds
4137 save_ifs="$IFS"; IFS='~'
4138 for cmd in $cmds; do
4139 IFS="$save_ifs"
4140 eval cmd=\"$cmd\"
4141 $show "$cmd"
4142 $run eval "$cmd" || exit $?
4143 done
4144 IFS="$save_ifs"
4145
4146 # Exit if we aren't doing a library object file.
4147 if test -z "$libobj"; then
4148 if test -n "$gentop"; then
4149 $show "${rm}r $gentop"
4150 $run ${rm}r $gentop
4151 fi
4152
4153 exit $EXIT_SUCCESS
4154 fi
4155
4156 if test "$build_libtool_libs" != yes; then
4157 if test -n "$gentop"; then
4158 $show "${rm}r $gentop"
4159 $run ${rm}r $gentop
4160 fi
4161
4162 # Create an invalid libtool object if no PIC, so that we don't
4163 # accidentally link it into a program.
4164 # $show "echo timestamp > $libobj"
4165 # $run eval "echo timestamp > $libobj" || exit $?
4166 exit $EXIT_SUCCESS
4167 fi
4168
4169 if test -n "$pic_flag" || test "$pic_mode" != default; then
4170 # Only do commands if we really have different PIC objects.
4171 reload_objs="$libobjs $reload_conv_objs"
4172 output="$libobj"
4173 cmds=$reload_cmds
4174 save_ifs="$IFS"; IFS='~'
4175 for cmd in $cmds; do
4176 IFS="$save_ifs"
4177 eval cmd=\"$cmd\"
4178 $show "$cmd"
4179 $run eval "$cmd" || exit $?
4180 done
4181 IFS="$save_ifs"
4182 fi
4183
4184 if test -n "$gentop"; then
4185 $show "${rm}r $gentop"
4186 $run ${rm}r $gentop
4187 fi
4188
4189 exit $EXIT_SUCCESS
4190 ;;
4191
4192 prog)
4193 case $host in
4194 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4195 esac
4196 if test -n "$vinfo"; then
4197 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4198 fi
4199
4200 if test -n "$release"; then
4201 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4202 fi
4203
4204 if test "$preload" = yes; then
4205 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
4206 test "$dlopen_self_static" = unknown; then
4207 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4208 fi
4209 fi
4210
4211 case $host in
4212 *-*-rhapsody* | *-*-darwin1.[012])
4213 # On Rhapsody replace the C library is the System framework
4214 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4215 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4216 ;;
4217 esac
4218
4219 case $host in
4220 *darwin*)
4221 # Don't allow lazy linking, it breaks C++ global constructors
4222 if test "$tagname" = CXX ; then
4223 compile_command="$compile_command ${wl}-bind_at_load"
4224 finalize_command="$finalize_command ${wl}-bind_at_load"
4225 fi
4226 ;;
4227 esac
4228
4229 compile_command="$compile_command $compile_deplibs"
4230 finalize_command="$finalize_command $finalize_deplibs"
4231
4232 if test -n "$rpath$xrpath"; then
4233 # If the user specified any rpath flags, then add them.
4234 for libdir in $rpath $xrpath; do
4235 # This is the magic to use -rpath.
4236 case "$finalize_rpath " in
4237 *" $libdir "*) ;;
4238 *) finalize_rpath="$finalize_rpath $libdir" ;;
4239 esac
4240 done
4241 fi
4242
4243 # Now hardcode the library paths
4244 rpath=
4245 hardcode_libdirs=
4246 for libdir in $compile_rpath $finalize_rpath; do
4247 if test -n "$hardcode_libdir_flag_spec"; then
4248 if test -n "$hardcode_libdir_separator"; then
4249 if test -z "$hardcode_libdirs"; then
4250 hardcode_libdirs="$libdir"
4251 else
4252 # Just accumulate the unique libdirs.
4253 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4254 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4255 ;;
4256 *)
4257 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4258 ;;
4259 esac
4260 fi
4261 else
4262 eval flag=\"$hardcode_libdir_flag_spec\"
4263 rpath="$rpath $flag"
4264 fi
4265 elif test -n "$runpath_var"; then
4266 case "$perm_rpath " in
4267 *" $libdir "*) ;;
4268 *) perm_rpath="$perm_rpath $libdir" ;;
4269 esac
4270 fi
4271 case $host in
4272 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4273 case :$dllsearchpath: in
4274 *":$libdir:"*) ;;
4275 *) dllsearchpath="$dllsearchpath:$libdir";;
4276 esac
4277 ;;
4278 esac
4279 done
4280 # Substitute the hardcoded libdirs into the rpath.
4281 if test -n "$hardcode_libdir_separator" &&
4282 test -n "$hardcode_libdirs"; then
4283 libdir="$hardcode_libdirs"
4284 eval rpath=\" $hardcode_libdir_flag_spec\"
4285 fi
4286 compile_rpath="$rpath"
4287
4288 rpath=
4289 hardcode_libdirs=
4290 for libdir in $finalize_rpath; do
4291 if test -n "$hardcode_libdir_flag_spec"; then
4292 if test -n "$hardcode_libdir_separator"; then
4293 if test -z "$hardcode_libdirs"; then
4294 hardcode_libdirs="$libdir"
4295 else
4296 # Just accumulate the unique libdirs.
4297 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4298 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4299 ;;
4300 *)
4301 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4302 ;;
4303 esac
4304 fi
4305 else
4306 eval flag=\"$hardcode_libdir_flag_spec\"
4307 rpath="$rpath $flag"
4308 fi
4309 elif test -n "$runpath_var"; then
4310 case "$finalize_perm_rpath " in
4311 *" $libdir "*) ;;
4312 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
4313 esac
4314 fi
4315 done
4316 # Substitute the hardcoded libdirs into the rpath.
4317 if test -n "$hardcode_libdir_separator" &&
4318 test -n "$hardcode_libdirs"; then
4319 libdir="$hardcode_libdirs"
4320 eval rpath=\" $hardcode_libdir_flag_spec\"
4321 fi
4322 finalize_rpath="$rpath"
4323
4324 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4325 # Transform all the library objects into standard objects.
4326 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4327 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4328 fi
4329
4330 dlsyms=
4331 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4332 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4333 dlsyms="${outputname}S.c"
4334 else
4335 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4336 fi
4337 fi
4338
4339 if test -n "$dlsyms"; then
4340 case $dlsyms in
4341 "") ;;
4342 *.c)
4343 # Discover the nlist of each of the dlfiles.
4344 nlist="$output_objdir/${outputname}.nm"
4345
4346 $show "$rm $nlist ${nlist}S ${nlist}T"
4347 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4348
4349 # Parse the name list into a source file.
4350 $show "creating $output_objdir/$dlsyms"
4351
4352 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4353 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4354 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4355
4356 #ifdef __cplusplus
4357 extern \"C\" {
4358 #endif
4359
4360 /* Prevent the only kind of declaration conflicts we can make. */
4361 #define lt_preloaded_symbols some_other_symbol
4362
4363 /* External symbol declarations for the compiler. */\
4364 "
4365
4366 if test "$dlself" = yes; then
4367 $show "generating symbol list for \`$output'"
4368
4369 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4370
4371 # Add our own program objects to the symbol list.
4372 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4373 for arg in $progfiles; do
4374 $show "extracting global C symbols from \`$arg'"
4375 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4376 done
4377
4378 if test -n "$exclude_expsyms"; then
4379 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4380 $run eval '$mv "$nlist"T "$nlist"'
4381 fi
4382
4383 if test -n "$export_symbols_regex"; then
4384 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4385 $run eval '$mv "$nlist"T "$nlist"'
4386 fi
4387
4388 # Prepare the list of exported symbols
4389 if test -z "$export_symbols"; then
4390 export_symbols="$output_objdir/$outputname.exp"
4391 $run $rm $export_symbols
4392 $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4393 else
4394 $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4395 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4396 $run eval 'mv "$nlist"T "$nlist"'
4397 fi
4398 fi
4399
4400 for arg in $dlprefiles; do
4401 $show "extracting global C symbols from \`$arg'"
4402 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4403 $run eval '$echo ": $name " >> "$nlist"'
4404 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4405 done
4406
4407 if test -z "$run"; then
4408 # Make sure we have at least an empty file.
4409 test -f "$nlist" || : > "$nlist"
4410
4411 if test -n "$exclude_expsyms"; then
4412 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4413 $mv "$nlist"T "$nlist"
4414 fi
4415
4416 # Try sorting and uniquifying the output.
4417 if grep -v "^: " < "$nlist" |
4418 if sort -k 3 </dev/null >/dev/null 2>&1; then
4419 sort -k 3
4420 else
4421 sort +2
4422 fi |
4423 uniq > "$nlist"S; then
4424 :
4425 else
4426 grep -v "^: " < "$nlist" > "$nlist"S
4427 fi
4428
4429 if test -f "$nlist"S; then
4430 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4431 else
4432 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
4433 fi
4434
4435 $echo >> "$output_objdir/$dlsyms" "\
4436
4437 #undef lt_preloaded_symbols
4438
4439 #if defined (__STDC__) && __STDC__
4440 # define lt_ptr void *
4441 #else
4442 # define lt_ptr char *
4443 # define const
4444 #endif
4445
4446 /* The mapping between symbol names and symbols. */
4447 "
4448
4449 case $host in
4450 *cygwin* | *mingw* )
4451 $echo >> "$output_objdir/$dlsyms" "\
4452 /* DATA imports from DLLs on WIN32 can't be const, because
4453 runtime relocations are performed -- see ld's documentation
4454 on pseudo-relocs */
4455 struct {
4456 "
4457 ;;
4458 * )
4459 $echo >> "$output_objdir/$dlsyms" "\
4460 const struct {
4461 "
4462 ;;
4463 esac
4464
4465
4466 $echo >> "$output_objdir/$dlsyms" "\
4467 const char *name;
4468 lt_ptr address;
4469 }
4470 lt_preloaded_symbols[] =
4471 {\
4472 "
4473
4474 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
4475
4476 $echo >> "$output_objdir/$dlsyms" "\
4477 {0, (lt_ptr) 0}
4478 };
4479
4480 /* This works around a problem in FreeBSD linker */
4481 #ifdef FREEBSD_WORKAROUND
4482 static const void *lt_preloaded_setup() {
4483 return lt_preloaded_symbols;
4484 }
4485 #endif
4486
4487 #ifdef __cplusplus
4488 }
4489 #endif\
4490 "
4491 fi
4492
4493 pic_flag_for_symtable=
4494 case $host in
4495 # compiling the symbol table file with pic_flag works around
4496 # a FreeBSD bug that causes programs to crash when -lm is
4497 # linked before any other PIC object. But we must not use
4498 # pic_flag when linking with -static. The problem exists in
4499 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4500 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
4501 case "$compile_command " in
4502 *" -static "*) ;;
4503 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
4504 esac;;
4505 *-*-hpux*)
4506 case "$compile_command " in
4507 *" -static "*) ;;
4508 *) pic_flag_for_symtable=" $pic_flag";;
4509 esac
4510 esac
4511
4512 # Now compile the dynamic symbol file.
4513 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4514 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
4515
4516 # Clean up the generated files.
4517 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4518 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4519
4520 # Transform the symbol file into the correct name.
4521 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4522 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4523 ;;
4524 *)
4525 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4526 exit $EXIT_FAILURE
4527 ;;
4528 esac
4529 else
4530 # We keep going just in case the user didn't refer to
4531 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4532 # really was required.
4533
4534 # Nullify the symbol file.
4535 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
4536 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
4537 fi
4538
4539 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4540 # Replace the output file specification.
4541 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4542 link_command="$compile_command$compile_rpath"
4543
4544 # We have no uninstalled library dependencies, so finalize right now.
4545 $show "$link_command"
4546 $run eval "$link_command"
4547 status=$?
4548
4549 # Delete the generated files.
4550 if test -n "$dlsyms"; then
4551 $show "$rm $output_objdir/${outputname}S.${objext}"
4552 $run $rm "$output_objdir/${outputname}S.${objext}"
4553 fi
4554
4555 exit $status
4556 fi
4557
4558 if test -n "$shlibpath_var"; then
4559 # We should set the shlibpath_var
4560 rpath=
4561 for dir in $temp_rpath; do
4562 case $dir in
4563 [\\/]* | [A-Za-z]:[\\/]*)
4564 # Absolute path.
4565 rpath="$rpath$dir:"
4566 ;;
4567 *)
4568 # Relative path: add a thisdir entry.
4569 rpath="$rpath\$thisdir/$dir:"
4570 ;;
4571 esac
4572 done
4573 temp_rpath="$rpath"
4574 fi
4575
4576 if test -n "$compile_shlibpath$finalize_shlibpath"; then
4577 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4578 fi
4579 if test -n "$finalize_shlibpath"; then
4580 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4581 fi
4582
4583 compile_var=
4584 finalize_var=
4585 if test -n "$runpath_var"; then
4586 if test -n "$perm_rpath"; then
4587 # We should set the runpath_var.
4588 rpath=
4589 for dir in $perm_rpath; do
4590 rpath="$rpath$dir:"
4591 done
4592 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
4593 fi
4594 if test -n "$finalize_perm_rpath"; then
4595 # We should set the runpath_var.
4596 rpath=
4597 for dir in $finalize_perm_rpath; do
4598 rpath="$rpath$dir:"
4599 done
4600 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
4601 fi
4602 fi
4603
4604 if test "$no_install" = yes; then
4605 # We don't need to create a wrapper script.
4606 link_command="$compile_var$compile_command$compile_rpath"
4607 # Replace the output file specification.
4608 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4609 # Delete the old output file.
4610 $run $rm $output
4611 # Link the executable and exit
4612 $show "$link_command"
4613 $run eval "$link_command" || exit $?
4614 exit $EXIT_SUCCESS
4615 fi
4616
4617 if test "$hardcode_action" = relink; then
4618 # Fast installation is not supported
4619 link_command="$compile_var$compile_command$compile_rpath"
4620 relink_command="$finalize_var$finalize_command$finalize_rpath"
4621
4622 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4623 $echo "$modename: \`$output' will be relinked during installation" 1>&2
4624 else
4625 if test "$fast_install" != no; then
4626 link_command="$finalize_var$compile_command$finalize_rpath"
4627 if test "$fast_install" = yes; then
4628 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
4629 else
4630 # fast_install is set to needless
4631 relink_command=
4632 fi
4633 else
4634 link_command="$compile_var$compile_command$compile_rpath"
4635 relink_command="$finalize_var$finalize_command$finalize_rpath"
4636 fi
4637 fi
4638
4639 # Replace the output file specification.
4640 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4641
4642 # Delete the old output files.
4643 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
4644
4645 $show "$link_command"
4646 $run eval "$link_command" || exit $?
4647
4648 # Now create the wrapper script.
4649 $show "creating $output"
4650
4651 # Quote the relink command for shipping.
4652 if test -n "$relink_command"; then
4653 # Preserve any variables that may affect compiler behavior
4654 for var in $variables_saved_for_relink; do
4655 if eval test -z \"\${$var+set}\"; then
4656 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4657 elif eval var_value=\$$var; test -z "$var_value"; then
4658 relink_command="$var=; export $var; $relink_command"
4659 else
4660 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4661 relink_command="$var=\"$var_value\"; export $var; $relink_command"
4662 fi
4663 done
4664 relink_command="(cd `pwd`; $relink_command)"
4665 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4666 fi
4667
4668 # Quote $echo for shipping.
4669 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
4670 case $progpath in
4671 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
4672 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
4673 esac
4674 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4675 else
4676 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4677 fi
4678
4679 # Only actually do things if our run command is non-null.
4680 if test -z "$run"; then
4681 # win32 will think the script is a binary if it has
4682 # a .exe suffix, so we strip it off here.
4683 case $output in
4684 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
4685 esac
4686 # test for cygwin because mv fails w/o .exe extensions
4687 case $host in
4688 *cygwin*)
4689 exeext=.exe
4690 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4691 *) exeext= ;;
4692 esac
4693 case $host in
4694 *cygwin* | *mingw* )
4695 cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
4696 cwrapper=`$echo ${output}.exe`
4697 $rm $cwrappersource $cwrapper
4698 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4699
4700 cat > $cwrappersource <<EOF
4701
4702 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4703 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4704
4705 The $output program cannot be directly executed until all the libtool
4706 libraries that it depends on are installed.
4707
4708 This wrapper executable should never be moved out of the build directory.
4709 If it is, it will not operate correctly.
4710
4711 Currently, it simply execs the wrapper *script* "/bin/sh $output",
4712 but could eventually absorb all of the scripts functionality and
4713 exec $objdir/$outputname directly.
4714 */
4715 EOF
4716 cat >> $cwrappersource<<"EOF"
4717 #include <stdio.h>
4718 #include <stdlib.h>
4719 #include <unistd.h>
4720 #include <malloc.h>
4721 #include <stdarg.h>
4722 #include <assert.h>
4723
4724 #if defined(PATH_MAX)
4725 # define LT_PATHMAX PATH_MAX
4726 #elif defined(MAXPATHLEN)
4727 # define LT_PATHMAX MAXPATHLEN
4728 #else
4729 # define LT_PATHMAX 1024
4730 #endif
4731
4732 #ifndef DIR_SEPARATOR
4733 #define DIR_SEPARATOR '/'
4734 #endif
4735
4736 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4737 defined (__OS2__)
4738 #define HAVE_DOS_BASED_FILE_SYSTEM
4739 #ifndef DIR_SEPARATOR_2
4740 #define DIR_SEPARATOR_2 '\\'
4741 #endif
4742 #endif
4743
4744 #ifndef DIR_SEPARATOR_2
4745 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
4746 #else /* DIR_SEPARATOR_2 */
4747 # define IS_DIR_SEPARATOR(ch) \
4748 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4749 #endif /* DIR_SEPARATOR_2 */
4750
4751 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
4752 #define XFREE(stale) do { \
4753 if (stale) { free ((void *) stale); stale = 0; } \
4754 } while (0)
4755
4756 const char *program_name = NULL;
4757
4758 void * xmalloc (size_t num);
4759 char * xstrdup (const char *string);
4760 char * basename (const char *name);
4761 char * fnqualify(const char *path);
4762 char * strendzap(char *str, const char *pat);
4763 void lt_fatal (const char *message, ...);
4764
4765 int
4766 main (int argc, char *argv[])
4767 {
4768 char **newargz;
4769 int i;
4770
4771 program_name = (char *) xstrdup ((char *) basename (argv[0]));
4772 newargz = XMALLOC(char *, argc+2);
4773 EOF
4774
4775 cat >> $cwrappersource <<EOF
4776 newargz[0] = "$SHELL";
4777 EOF
4778
4779 cat >> $cwrappersource <<"EOF"
4780 newargz[1] = fnqualify(argv[0]);
4781 /* we know the script has the same name, without the .exe */
4782 /* so make sure newargz[1] doesn't end in .exe */
4783 strendzap(newargz[1],".exe");
4784 for (i = 1; i < argc; i++)
4785 newargz[i+1] = xstrdup(argv[i]);
4786 newargz[argc+1] = NULL;
4787 EOF
4788
4789 cat >> $cwrappersource <<EOF
4790 execv("$SHELL",newargz);
4791 EOF
4792
4793 cat >> $cwrappersource <<"EOF"
4794 return 127;
4795 }
4796
4797 void *
4798 xmalloc (size_t num)
4799 {
4800 void * p = (void *) malloc (num);
4801 if (!p)
4802 lt_fatal ("Memory exhausted");
4803
4804 return p;
4805 }
4806
4807 char *
4808 xstrdup (const char *string)
4809 {
4810 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
4811 ;
4812 }
4813
4814 char *
4815 basename (const char *name)
4816 {
4817 const char *base;
4818
4819 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
4820 /* Skip over the disk name in MSDOS pathnames. */
4821 if (isalpha (name[0]) && name[1] == ':')
4822 name += 2;
4823 #endif
4824
4825 for (base = name; *name; name++)
4826 if (IS_DIR_SEPARATOR (*name))
4827 base = name + 1;
4828 return (char *) base;
4829 }
4830
4831 char *
4832 fnqualify(const char *path)
4833 {
4834 size_t size;
4835 char *p;
4836 char tmp[LT_PATHMAX + 1];
4837
4838 assert(path != NULL);
4839
4840 /* Is it qualified already? */
4841 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
4842 if (isalpha (path[0]) && path[1] == ':')
4843 return xstrdup (path);
4844 #endif
4845 if (IS_DIR_SEPARATOR (path[0]))
4846 return xstrdup (path);
4847
4848 /* prepend the current directory */
4849 /* doesn't handle '~' */
4850 if (getcwd (tmp, LT_PATHMAX) == NULL)
4851 lt_fatal ("getcwd failed");
4852 size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
4853 p = XMALLOC(char, size);
4854 sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
4855 return p;
4856 }
4857
4858 char *
4859 strendzap(char *str, const char *pat)
4860 {
4861 size_t len, patlen;
4862
4863 assert(str != NULL);
4864 assert(pat != NULL);
4865
4866 len = strlen(str);
4867 patlen = strlen(pat);
4868
4869 if (patlen <= len)
4870 {
4871 str += len - patlen;
4872 if (strcmp(str, pat) == 0)
4873 *str = '\0';
4874 }
4875 return str;
4876 }
4877
4878 static void
4879 lt_error_core (int exit_status, const char * mode,
4880 const char * message, va_list ap)
4881 {
4882 fprintf (stderr, "%s: %s: ", program_name, mode);
4883 vfprintf (stderr, message, ap);
4884 fprintf (stderr, ".\n");
4885
4886 if (exit_status >= 0)
4887 exit (exit_status);
4888 }
4889
4890 void
4891 lt_fatal (const char *message, ...)
4892 {
4893 va_list ap;
4894 va_start (ap, message);
4895 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
4896 va_end (ap);
4897 }
4898 EOF
4899 # we should really use a build-platform specific compiler
4900 # here, but OTOH, the wrappers (shell script and this C one)
4901 # are only useful if you want to execute the "real" binary.
4902 # Since the "real" binary is built for $host, then this
4903 # wrapper might as well be built for $host, too.
4904 $run $LTCC -s -o $cwrapper $cwrappersource
4905 ;;
4906 esac
4907 $rm $output
4908 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
4909
4910 $echo > $output "\
4911 #! $SHELL
4912
4913 # $output - temporary wrapper script for $objdir/$outputname
4914 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4915 #
4916 # The $output program cannot be directly executed until all the libtool
4917 # libraries that it depends on are installed.
4918 #
4919 # This wrapper script should never be moved out of the build directory.
4920 # If it is, it will not operate correctly.
4921
4922 # Sed substitution that helps us do robust quoting. It backslashifies
4923 # metacharacters that are still active within double-quoted strings.
4924 Xsed='${SED} -e 1s/^X//'
4925 sed_quote_subst='$sed_quote_subst'
4926
4927 # The HP-UX ksh and POSIX shell print the target directory to stdout
4928 # if CDPATH is set.
4929 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4930
4931 relink_command=\"$relink_command\"
4932
4933 # This environment variable determines our operation mode.
4934 if test \"\$libtool_install_magic\" = \"$magic\"; then
4935 # install mode needs the following variable:
4936 notinst_deplibs='$notinst_deplibs'
4937 else
4938 # When we are sourced in execute mode, \$file and \$echo are already set.
4939 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4940 echo=\"$qecho\"
4941 file=\"\$0\"
4942 # Make sure echo works.
4943 if test \"X\$1\" = X--no-reexec; then
4944 # Discard the --no-reexec flag, and continue.
4945 shift
4946 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
4947 # Yippee, \$echo works!
4948 :
4949 else
4950 # Restart under the correct shell, and then maybe \$echo will work.
4951 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
4952 fi
4953 fi\
4954 "
4955 $echo >> $output "\
4956
4957 # Find the directory that this script lives in.
4958 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
4959 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
4960
4961 # Follow symbolic links until we get to the real thisdir.
4962 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
4963 while test -n \"\$file\"; do
4964 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
4965
4966 # If there was a directory component, then change thisdir.
4967 if test \"x\$destdir\" != \"x\$file\"; then
4968 case \"\$destdir\" in
4969 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
4970 *) thisdir=\"\$thisdir/\$destdir\" ;;
4971 esac
4972 fi
4973
4974 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
4975 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
4976 done
4977
4978 # Try to get the absolute directory name.
4979 absdir=\`cd \"\$thisdir\" && pwd\`
4980 test -n \"\$absdir\" && thisdir=\"\$absdir\"
4981 "
4982
4983 if test "$fast_install" = yes; then
4984 $echo >> $output "\
4985 program=lt-'$outputname'$exeext
4986 progdir=\"\$thisdir/$objdir\"
4987
4988 if test ! -f \"\$progdir/\$program\" || \\
4989 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
4990 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
4991
4992 file=\"\$\$-\$program\"
4993
4994 if test ! -d \"\$progdir\"; then
4995 $mkdir \"\$progdir\"
4996 else
4997 $rm \"\$progdir/\$file\"
4998 fi"
4999
5000 $echo >> $output "\
5001
5002 # relink executable if necessary
5003 if test -n \"\$relink_command\"; then
5004 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5005 else
5006 $echo \"\$relink_command_output\" >&2
5007 $rm \"\$progdir/\$file\"
5008 exit $EXIT_FAILURE
5009 fi
5010 fi
5011
5012 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5013 { $rm \"\$progdir/\$program\";
5014 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5015 $rm \"\$progdir/\$file\"
5016 fi"
5017 else
5018 $echo >> $output "\
5019 program='$outputname'
5020 progdir=\"\$thisdir/$objdir\"
5021 "
5022 fi
5023
5024 $echo >> $output "\
5025
5026 if test -f \"\$progdir/\$program\"; then"
5027
5028 # Export our shlibpath_var if we have one.
5029 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5030 $echo >> $output "\
5031 # Add our own library path to $shlibpath_var
5032 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5033
5034 # Some systems cannot cope with colon-terminated $shlibpath_var
5035 # The second colon is a workaround for a bug in BeOS R4 sed
5036 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5037
5038 export $shlibpath_var
5039 "
5040 fi
5041
5042 # fixup the dll searchpath if we need to.
5043 if test -n "$dllsearchpath"; then
5044 $echo >> $output "\
5045 # Add the dll search path components to the executable PATH
5046 PATH=$dllsearchpath:\$PATH
5047 "
5048 fi
5049
5050 $echo >> $output "\
5051 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5052 # Run the actual program with our arguments.
5053 "
5054 case $host in
5055 # Backslashes separate directories on plain windows
5056 *-*-mingw | *-*-os2*)
5057 $echo >> $output "\
5058 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5059 "
5060 ;;
5061
5062 *)
5063 $echo >> $output "\
5064 exec \"\$progdir/\$program\" \${1+\"\$@\"}
5065 "
5066 ;;
5067 esac
5068 $echo >> $output "\
5069 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
5070 exit $EXIT_FAILURE
5071 fi
5072 else
5073 # The program doesn't exist.
5074 \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
5075 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5076 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5077 exit $EXIT_FAILURE
5078 fi
5079 fi\
5080 "
5081 chmod +x $output
5082 fi
5083 exit $EXIT_SUCCESS
5084 ;;
5085 esac
5086
5087 # See if we need to build an old-fashioned archive.
5088 for oldlib in $oldlibs; do
5089
5090 if test "$build_libtool_libs" = convenience; then
5091 oldobjs="$libobjs_save"
5092 addlibs="$convenience"
5093 build_libtool_libs=no
5094 else
5095 if test "$build_libtool_libs" = module; then
5096 oldobjs="$libobjs_save"
5097 build_libtool_libs=no
5098 else
5099 oldobjs="$old_deplibs $non_pic_objects"
5100 fi
5101 addlibs="$old_convenience"
5102 fi
5103
5104 if test -n "$addlibs"; then
5105 gentop="$output_objdir/${outputname}x"
5106 generated="$generated $gentop"
5107
5108 func_extract_archives $gentop $addlibs
5109 oldobjs="$oldobjs $func_extract_archives_result"
5110 fi
5111
5112 # Do each command in the archive commands.
5113 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5114 cmds=$old_archive_from_new_cmds
5115 else
5116 # POSIX demands no paths to be encoded in archives. We have
5117 # to avoid creating archives with duplicate basenames if we
5118 # might have to extract them afterwards, e.g., when creating a
5119 # static archive out of a convenience library, or when linking
5120 # the entirety of a libtool archive into another (currently
5121 # not supported by libtool).
5122 if (for obj in $oldobjs
5123 do
5124 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5125 done | sort | sort -uc >/dev/null 2>&1); then
5126 :
5127 else
5128 $echo "copying selected object files to avoid basename conflicts..."
5129
5130 if test -z "$gentop"; then
5131 gentop="$output_objdir/${outputname}x"
5132 generated="$generated $gentop"
5133
5134 $show "${rm}r $gentop"
5135 $run ${rm}r "$gentop"
5136 $show "$mkdir $gentop"
5137 $run $mkdir "$gentop"
5138 status=$?
5139 if test "$status" -ne 0 && test ! -d "$gentop"; then
5140 exit $status
5141 fi
5142 fi
5143
5144 save_oldobjs=$oldobjs
5145 oldobjs=
5146 counter=1
5147 for obj in $save_oldobjs
5148 do
5149 objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5150 case " $oldobjs " in
5151 " ") oldobjs=$obj ;;
5152 *[\ /]"$objbase "*)
5153 while :; do
5154 # Make sure we don't pick an alternate name that also
5155 # overlaps.
5156 newobj=lt$counter-$objbase
5157 counter=`expr $counter + 1`
5158 case " $oldobjs " in
5159 *[\ /]"$newobj "*) ;;
5160 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5161 esac
5162 done
5163 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5164 $run ln "$obj" "$gentop/$newobj" ||
5165 $run cp "$obj" "$gentop/$newobj"
5166 oldobjs="$oldobjs $gentop/$newobj"
5167 ;;
5168 *) oldobjs="$oldobjs $obj" ;;
5169 esac
5170 done
5171 fi
5172
5173 eval cmds=\"$old_archive_cmds\"
5174
5175 if len=`expr "X$cmds" : ".*"` &&
5176 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5177 cmds=$old_archive_cmds
5178 else
5179 # the command line is too long to link in one step, link in parts
5180 $echo "using piecewise archive linking..."
5181 save_RANLIB=$RANLIB
5182 RANLIB=:
5183 objlist=
5184 concat_cmds=
5185 save_oldobjs=$oldobjs
5186
5187 # Is there a better way of finding the last object in the list?
5188 for obj in $save_oldobjs
5189 do
5190 last_oldobj=$obj
5191 done
5192 for obj in $save_oldobjs
5193 do
5194 oldobjs="$objlist $obj"
5195 objlist="$objlist $obj"
5196 eval test_cmds=\"$old_archive_cmds\"
5197 if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
5198 test "$len" -le "$max_cmd_len"; then
5199 :
5200 else
5201 # the above command should be used before it gets too long
5202 oldobjs=$objlist
5203 if test "$obj" = "$last_oldobj" ; then
5204 RANLIB=$save_RANLIB
5205 fi
5206 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5207 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5208 objlist=
5209 fi
5210 done
5211 RANLIB=$save_RANLIB
5212 oldobjs=$objlist
5213 if test "X$oldobjs" = "X" ; then
5214 eval cmds=\"\$concat_cmds\"
5215 else
5216 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5217 fi
5218 fi
5219 fi
5220 save_ifs="$IFS"; IFS='~'
5221 for cmd in $cmds; do
5222 eval cmd=\"$cmd\"
5223 IFS="$save_ifs"
5224 $show "$cmd"
5225 $run eval "$cmd" || exit $?
5226 done
5227 IFS="$save_ifs"
5228 done
5229
5230 if test -n "$generated"; then
5231 $show "${rm}r$generated"
5232 $run ${rm}r$generated
5233 fi
5234
5235 # Now create the libtool archive.
5236 case $output in
5237 *.la)
5238 old_library=
5239 test "$build_old_libs" = yes && old_library="$libname.$libext"
5240 $show "creating $output"
5241
5242 # Preserve any variables that may affect compiler behavior
5243 for var in $variables_saved_for_relink; do
5244 if eval test -z \"\${$var+set}\"; then
5245 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5246 elif eval var_value=\$$var; test -z "$var_value"; then
5247 relink_command="$var=; export $var; $relink_command"
5248 else
5249 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5250 relink_command="$var=\"$var_value\"; export $var; $relink_command"
5251 fi
5252 done
5253 # Quote the link command for shipping.
5254 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5255 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5256 if test "$hardcode_automatic" = yes ; then
5257 relink_command=
5258 fi
5259
5260
5261 # Only create the output if not a dry run.
5262 if test -z "$run"; then
5263 for installed in no yes; do
5264 if test "$installed" = yes; then
5265 if test -z "$install_libdir"; then
5266 break
5267 fi
5268 output="$output_objdir/$outputname"i
5269 # Replace all uninstalled libtool libraries with the installed ones
5270 newdependency_libs=
5271 for deplib in $dependency_libs; do
5272 case $deplib in
5273 *.la)
5274 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
5275 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5276 if test -z "$libdir"; then
5277 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5278 exit $EXIT_FAILURE
5279 fi
5280 newdependency_libs="$newdependency_libs $libdir/$name"
5281 ;;
5282 *) newdependency_libs="$newdependency_libs $deplib" ;;
5283 esac
5284 done
5285 dependency_libs="$newdependency_libs"
5286 newdlfiles=
5287 for lib in $dlfiles; do
5288 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5289 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5290 if test -z "$libdir"; then
5291 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5292 exit $EXIT_FAILURE
5293 fi
5294 newdlfiles="$newdlfiles $libdir/$name"
5295 done
5296 dlfiles="$newdlfiles"
5297 newdlprefiles=
5298 for lib in $dlprefiles; do
5299 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5300 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5301 if test -z "$libdir"; then
5302 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5303 exit $EXIT_FAILURE
5304 fi
5305 newdlprefiles="$newdlprefiles $libdir/$name"
5306 done
5307 dlprefiles="$newdlprefiles"
5308 else
5309 newdlfiles=
5310 for lib in $dlfiles; do
5311 case $lib in
5312 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5313 *) abs=`pwd`"/$lib" ;;
5314 esac
5315 newdlfiles="$newdlfiles $abs"
5316 done
5317 dlfiles="$newdlfiles"
5318 newdlprefiles=
5319 for lib in $dlprefiles; do
5320 case $lib in
5321 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5322 *) abs=`pwd`"/$lib" ;;
5323 esac
5324 newdlprefiles="$newdlprefiles $abs"
5325 done
5326 dlprefiles="$newdlprefiles"
5327 fi
5328 $rm $output
5329 # place dlname in correct position for cygwin
5330 tdlname=$dlname
5331 case $host,$output,$installed,$module,$dlname in
5332 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
5333 esac
5334 $echo > $output "\
5335 # $outputname - a libtool library file
5336 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5337 #
5338 # Please DO NOT delete this file!
5339 # It is necessary for linking the library.
5340
5341 # The name that we can dlopen(3).
5342 dlname='$tdlname'
5343
5344 # Names of this library.
5345 library_names='$library_names'
5346
5347 # The name of the static archive.
5348 old_library='$old_library'
5349
5350 # Libraries that this one depends upon.
5351 dependency_libs='$dependency_libs'
5352
5353 # Version information for $libname.
5354 current=$current
5355 age=$age
5356 revision=$revision
5357
5358 # Is this an already installed library?
5359 installed=$installed
5360
5361 # Should we warn about portability when linking against -modules?
5362 shouldnotlink=$module
5363
5364 # Files to dlopen/dlpreopen
5365 dlopen='$dlfiles'
5366 dlpreopen='$dlprefiles'
5367
5368 # Directory that this library needs to be installed in:
5369 libdir='$install_libdir'"
5370 if test "$installed" = no && test "$need_relink" = yes; then
5371 $echo >> $output "\
5372 relink_command=\"$relink_command\""
5373 fi
5374 done
5375 fi
5376
5377 # Do a symbolic link so that the libtool archive can be found in
5378 # LD_LIBRARY_PATH before the program is installed.
5379 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5380 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
5381 ;;
5382 esac
5383 exit $EXIT_SUCCESS
5384 ;;
5385
5386 # libtool install mode
5387 install)
5388 modename="$modename: install"
5389
5390 # There may be an optional sh(1) argument at the beginning of
5391 # install_prog (especially on Windows NT).
5392 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5393 # Allow the use of GNU shtool's install command.
5394 $echo "X$nonopt" | grep shtool > /dev/null; then
5395 # Aesthetically quote it.
5396 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5397 case $arg in
5398 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5399 arg="\"$arg\""
5400 ;;
5401 esac
5402 install_prog="$arg "
5403 arg="$1"
5404 shift
5405 else
5406 install_prog=
5407 arg=$nonopt
5408 fi
5409
5410 # The real first argument should be the name of the installation program.
5411 # Aesthetically quote it.
5412 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5413 case $arg in
5414 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5415 arg="\"$arg\""
5416 ;;
5417 esac
5418 install_prog="$install_prog$arg"
5419
5420 # We need to accept at least all the BSD install flags.
5421 dest=
5422 files=
5423 opts=
5424 prev=
5425 install_type=
5426 isdir=no
5427 stripme=
5428 for arg
5429 do
5430 if test -n "$dest"; then
5431 files="$files $dest"
5432 dest=$arg
5433 continue
5434 fi
5435
5436 case $arg in
5437 -d) isdir=yes ;;
5438 -f)
5439 case " $install_prog " in
5440 *[\\\ /]cp\ *) ;;
5441 *) prev=$arg ;;
5442 esac
5443 ;;
5444 -g | -m | -o) prev=$arg ;;
5445 -s)
5446 stripme=" -s"
5447 continue
5448 ;;
5449 -*)
5450 ;;
5451 *)
5452 # If the previous option needed an argument, then skip it.
5453 if test -n "$prev"; then
5454 prev=
5455 else
5456 dest=$arg
5457 continue
5458 fi
5459 ;;
5460 esac
5461
5462 # Aesthetically quote the argument.
5463 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5464 case $arg in
5465 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5466 arg="\"$arg\""
5467 ;;
5468 esac
5469 install_prog="$install_prog $arg"
5470 done
5471
5472 if test -z "$install_prog"; then
5473 $echo "$modename: you must specify an install program" 1>&2
5474 $echo "$help" 1>&2
5475 exit $EXIT_FAILURE
5476 fi
5477
5478 if test -n "$prev"; then
5479 $echo "$modename: the \`$prev' option requires an argument" 1>&2
5480 $echo "$help" 1>&2
5481 exit $EXIT_FAILURE
5482 fi
5483
5484 if test -z "$files"; then
5485 if test -z "$dest"; then
5486 $echo "$modename: no file or destination specified" 1>&2
5487 else
5488 $echo "$modename: you must specify a destination" 1>&2
5489 fi
5490 $echo "$help" 1>&2
5491 exit $EXIT_FAILURE
5492 fi
5493
5494 # Strip any trailing slash from the destination.
5495 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5496
5497 # Check to see that the destination is a directory.
5498 test -d "$dest" && isdir=yes
5499 if test "$isdir" = yes; then
5500 destdir="$dest"
5501 destname=
5502 else
5503 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5504 test "X$destdir" = "X$dest" && destdir=.
5505 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5506
5507 # Not a directory, so check to see that there is only one file specified.
5508 set dummy $files
5509 if test "$#" -gt 2; then
5510 $echo "$modename: \`$dest' is not a directory" 1>&2
5511 $echo "$help" 1>&2
5512 exit $EXIT_FAILURE
5513 fi
5514 fi
5515 case $destdir in
5516 [\\/]* | [A-Za-z]:[\\/]*) ;;
5517 *)
5518 for file in $files; do
5519 case $file in
5520 *.lo) ;;
5521 *)
5522 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5523 $echo "$help" 1>&2
5524 exit $EXIT_FAILURE
5525 ;;
5526 esac
5527 done
5528 ;;
5529 esac
5530
5531 # This variable tells wrapper scripts just to set variables rather
5532 # than running their programs.
5533 libtool_install_magic="$magic"
5534
5535 staticlibs=
5536 future_libdirs=
5537 current_libdirs=
5538 for file in $files; do
5539
5540 # Do each installation.
5541 case $file in
5542 *.$libext)
5543 # Do the static libraries later.
5544 staticlibs="$staticlibs $file"
5545 ;;
5546
5547 *.la)
5548 # Check to see that this really is a libtool archive.
5549 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
5550 else
5551 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5552 $echo "$help" 1>&2
5553 exit $EXIT_FAILURE
5554 fi
5555
5556 library_names=
5557 old_library=
5558 relink_command=
5559 # If there is no directory component, then add one.
5560 case $file in
5561 */* | *\\*) . $file ;;
5562 *) . ./$file ;;
5563 esac
5564
5565 # Add the libdir to current_libdirs if it is the destination.
5566 if test "X$destdir" = "X$libdir"; then
5567 case "$current_libdirs " in
5568 *" $libdir "*) ;;
5569 *) current_libdirs="$current_libdirs $libdir" ;;
5570 esac
5571 else
5572 # Note the libdir as a future libdir.
5573 case "$future_libdirs " in
5574 *" $libdir "*) ;;
5575 *) future_libdirs="$future_libdirs $libdir" ;;
5576 esac
5577 fi
5578
5579 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
5580 test "X$dir" = "X$file/" && dir=
5581 dir="$dir$objdir"
5582
5583 if test -n "$relink_command"; then
5584 # Determine the prefix the user has applied to our future dir.
5585 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
5586
5587 # Don't allow the user to place us outside of our expected
5588 # location b/c this prevents finding dependent libraries that
5589 # are installed to the same prefix.
5590 # At present, this check doesn't affect windows .dll's that
5591 # are installed into $libdir/../bin (currently, that works fine)
5592 # but it's something to keep an eye on.
5593 if test "$inst_prefix_dir" = "$destdir"; then
5594 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5595 exit $EXIT_FAILURE
5596 fi
5597
5598 if test -n "$inst_prefix_dir"; then
5599 # Stick the inst_prefix_dir data into the link command.
5600 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
5601 else
5602 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
5603 fi
5604
5605 $echo "$modename: warning: relinking \`$file'" 1>&2
5606 $show "$relink_command"
5607 if $run eval "$relink_command"; then :
5608 else
5609 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5610 exit $EXIT_FAILURE
5611 fi
5612 fi
5613
5614 # See the names of the shared library.
5615 set dummy $library_names
5616 if test -n "$2"; then
5617 realname="$2"
5618 shift
5619 shift
5620
5621 srcname="$realname"
5622 test -n "$relink_command" && srcname="$realname"T
5623
5624 # Install the shared library and build the symlinks.
5625 $show "$install_prog $dir/$srcname $destdir/$realname"
5626 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
5627 if test -n "$stripme" && test -n "$striplib"; then
5628 $show "$striplib $destdir/$realname"
5629 $run eval "$striplib $destdir/$realname" || exit $?
5630 fi
5631
5632 if test "$#" -gt 0; then
5633 # Delete the old symlinks, and create new ones.
5634 # Try `ln -sf' first, because the `ln' binary might depend on
5635 # the symlink we replace! Solaris /bin/ln does not understand -f,
5636 # so we also need to try rm && ln -s.
5637 for linkname
5638 do
5639 if test "$linkname" != "$realname"; then
5640 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
5641 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
5642 fi
5643 done
5644 fi
5645
5646 # Do each command in the postinstall commands.
5647 lib="$destdir/$realname"
5648 cmds=$postinstall_cmds
5649 save_ifs="$IFS"; IFS='~'
5650 for cmd in $cmds; do
5651 IFS="$save_ifs"
5652 eval cmd=\"$cmd\"
5653 $show "$cmd"
5654 $run eval "$cmd" || {
5655 lt_exit=$?
5656
5657 # Restore the uninstalled library and exit
5658 if test "$mode" = relink; then
5659 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
5660 fi
5661
5662 exit $lt_exit
5663 }
5664 done
5665 IFS="$save_ifs"
5666 fi
5667
5668 # Install the pseudo-library for information purposes.
5669 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5670 instname="$dir/$name"i
5671 $show "$install_prog $instname $destdir/$name"
5672 $run eval "$install_prog $instname $destdir/$name" || exit $?
5673
5674 # Maybe install the static library, too.
5675 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
5676 ;;
5677
5678 *.lo)
5679 # Install (i.e. copy) a libtool object.
5680
5681 # Figure out destination file name, if it wasn't already specified.
5682 if test -n "$destname"; then
5683 destfile="$destdir/$destname"
5684 else
5685 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5686 destfile="$destdir/$destfile"
5687 fi
5688
5689 # Deduce the name of the destination old-style object file.
5690 case $destfile in
5691 *.lo)
5692 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
5693 ;;
5694 *.$objext)
5695 staticdest="$destfile"
5696 destfile=
5697 ;;
5698 *)
5699 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
5700 $echo "$help" 1>&2
5701 exit $EXIT_FAILURE
5702 ;;
5703 esac
5704
5705 # Install the libtool object if requested.
5706 if test -n "$destfile"; then
5707 $show "$install_prog $file $destfile"
5708 $run eval "$install_prog $file $destfile" || exit $?
5709 fi
5710
5711 # Install the old object if enabled.
5712 if test "$build_old_libs" = yes; then
5713 # Deduce the name of the old-style object file.
5714 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
5715
5716 $show "$install_prog $staticobj $staticdest"
5717 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
5718 fi
5719 exit $EXIT_SUCCESS
5720 ;;
5721
5722 *)
5723 # Figure out destination file name, if it wasn't already specified.
5724 if test -n "$destname"; then
5725 destfile="$destdir/$destname"
5726 else
5727 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5728 destfile="$destdir/$destfile"
5729 fi
5730
5731 # If the file is missing, and there is a .exe on the end, strip it
5732 # because it is most likely a libtool script we actually want to
5733 # install
5734 stripped_ext=""
5735 case $file in
5736 *.exe)
5737 if test ! -f "$file"; then
5738 file=`$echo $file|${SED} 's,.exe$,,'`
5739 stripped_ext=".exe"
5740 fi
5741 ;;
5742 esac
5743
5744 # Do a test to see if this is really a libtool program.
5745 case $host in
5746 *cygwin*|*mingw*)
5747 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
5748 ;;
5749 *)
5750 wrapper=$file
5751 ;;
5752 esac
5753 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
5754 notinst_deplibs=
5755 relink_command=
5756
5757 # Note that it is not necessary on cygwin/mingw to append a dot to
5758 # foo even if both foo and FILE.exe exist: automatic-append-.exe
5759 # behavior happens only for exec(3), not for open(2)! Also, sourcing
5760 # `FILE.' does not work on cygwin managed mounts.
5761 #
5762 # If there is no directory component, then add one.
5763 case $wrapper in
5764 */* | *\\*) . ${wrapper} ;;
5765 *) . ./${wrapper} ;;
5766 esac
5767
5768 # Check the variables that should have been set.
5769 if test -z "$notinst_deplibs"; then
5770 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
5771 exit $EXIT_FAILURE
5772 fi
5773
5774 finalize=yes
5775 for lib in $notinst_deplibs; do
5776 # Check to see that each library is installed.
5777 libdir=
5778 if test -f "$lib"; then
5779 # If there is no directory component, then add one.
5780 case $lib in
5781 */* | *\\*) . $lib ;;
5782 *) . ./$lib ;;
5783 esac
5784 fi
5785 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
5786 if test -n "$libdir" && test ! -f "$libfile"; then
5787 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
5788 finalize=no
5789 fi
5790 done
5791
5792 relink_command=
5793 # Note that it is not necessary on cygwin/mingw to append a dot to
5794 # foo even if both foo and FILE.exe exist: automatic-append-.exe
5795 # behavior happens only for exec(3), not for open(2)! Also, sourcing
5796 # `FILE.' does not work on cygwin managed mounts.
5797 #
5798 # If there is no directory component, then add one.
5799 case $wrapper in
5800 */* | *\\*) . ${wrapper} ;;
5801 *) . ./${wrapper} ;;
5802 esac
5803
5804 outputname=
5805 if test "$fast_install" = no && test -n "$relink_command"; then
5806 if test "$finalize" = yes && test -z "$run"; then
5807 tmpdir="/tmp"
5808 test -n "$TMPDIR" && tmpdir="$TMPDIR"
5809 tmpdir="$tmpdir/libtool-$$"
5810 save_umask=`umask`
5811 umask 0077
5812 if $mkdir "$tmpdir"; then
5813 umask $save_umask
5814 else
5815 umask $save_umask
5816 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
5817 continue
5818 fi
5819 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
5820 outputname="$tmpdir/$file"
5821 # Replace the output file specification.
5822 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
5823
5824 $show "$relink_command"
5825 if $run eval "$relink_command"; then :
5826 else
5827 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5828 ${rm}r "$tmpdir"
5829 continue
5830 fi
5831 file="$outputname"
5832 else
5833 $echo "$modename: warning: cannot relink \`$file'" 1>&2
5834 fi
5835 else
5836 # Install the binary that we compiled earlier.
5837 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
5838 fi
5839 fi
5840
5841 # remove .exe since cygwin /usr/bin/install will append another
5842 # one anyway
5843 case $install_prog,$host in
5844 */usr/bin/install*,*cygwin*)
5845 case $file:$destfile in
5846 *.exe:*.exe)
5847 # this is ok
5848 ;;
5849 *.exe:*)
5850 destfile=$destfile.exe
5851 ;;
5852 *:*.exe)
5853 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
5854 ;;
5855 esac
5856 ;;
5857 esac
5858 $show "$install_prog$stripme $file $destfile"
5859 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
5860 test -n "$outputname" && ${rm}r "$tmpdir"
5861 ;;
5862 esac
5863 done
5864
5865 for file in $staticlibs; do
5866 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5867
5868 # Set up the ranlib parameters.
5869 oldlib="$destdir/$name"
5870
5871 $show "$install_prog $file $oldlib"
5872 $run eval "$install_prog \$file \$oldlib" || exit $?
5873
5874 if test -n "$stripme" && test -n "$old_striplib"; then
5875 $show "$old_striplib $oldlib"
5876 $run eval "$old_striplib $oldlib" || exit $?
5877 fi
5878
5879 # Do each command in the postinstall commands.
5880 cmds=$old_postinstall_cmds
5881 save_ifs="$IFS"; IFS='~'
5882 for cmd in $cmds; do
5883 IFS="$save_ifs"
5884 eval cmd=\"$cmd\"
5885 $show "$cmd"
5886 $run eval "$cmd" || exit $?
5887 done
5888 IFS="$save_ifs"
5889 done
5890
5891 if test -n "$future_libdirs"; then
5892 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
5893 fi
5894
5895 if test -n "$current_libdirs"; then
5896 # Maybe just do a dry run.
5897 test -n "$run" && current_libdirs=" -n$current_libdirs"
5898 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
5899 else
5900 exit $EXIT_SUCCESS
5901 fi
5902 ;;
5903
5904 # libtool finish mode
5905 finish)
5906 modename="$modename: finish"
5907 libdirs="$nonopt"
5908 admincmds=
5909
5910 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
5911 for dir
5912 do
5913 libdirs="$libdirs $dir"
5914 done
5915
5916 for libdir in $libdirs; do
5917 if test -n "$finish_cmds"; then
5918 # Do each command in the finish commands.
5919 cmds=$finish_cmds
5920 save_ifs="$IFS"; IFS='~'
5921 for cmd in $cmds; do
5922 IFS="$save_ifs"
5923 eval cmd=\"$cmd\"
5924 $show "$cmd"
5925 $run eval "$cmd" || admincmds="$admincmds
5926 $cmd"
5927 done
5928 IFS="$save_ifs"
5929 fi
5930 if test -n "$finish_eval"; then
5931 # Do the single finish_eval.
5932 eval cmds=\"$finish_eval\"
5933 $run eval "$cmds" || admincmds="$admincmds
5934 $cmds"
5935 fi
5936 done
5937 fi
5938
5939 # Exit here if they wanted silent mode.
5940 test "$show" = : && exit $EXIT_SUCCESS
5941
5942 $echo "----------------------------------------------------------------------"
5943 $echo "Libraries have been installed in:"
5944 for libdir in $libdirs; do
5945 $echo " $libdir"
5946 done
5947 $echo
5948 $echo "If you ever happen to want to link against installed libraries"
5949 $echo "in a given directory, LIBDIR, you must either use libtool, and"
5950 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
5951 $echo "flag during linking and do at least one of the following:"
5952 if test -n "$shlibpath_var"; then
5953 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
5954 $echo " during execution"
5955 fi
5956 if test -n "$runpath_var"; then
5957 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
5958 $echo " during linking"
5959 fi
5960 if test -n "$hardcode_libdir_flag_spec"; then
5961 libdir=LIBDIR
5962 eval flag=\"$hardcode_libdir_flag_spec\"
5963
5964 $echo " - use the \`$flag' linker flag"
5965 fi
5966 if test -n "$admincmds"; then
5967 $echo " - have your system administrator run these commands:$admincmds"
5968 fi
5969 if test -f /etc/ld.so.conf; then
5970 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
5971 fi
5972 $echo
5973 $echo "See any operating system documentation about shared libraries for"
5974 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
5975 $echo "----------------------------------------------------------------------"
5976 exit $EXIT_SUCCESS
5977 ;;
5978
5979 # libtool execute mode
5980 execute)
5981 modename="$modename: execute"
5982
5983 # The first argument is the command name.
5984 cmd="$nonopt"
5985 if test -z "$cmd"; then
5986 $echo "$modename: you must specify a COMMAND" 1>&2
5987 $echo "$help"
5988 exit $EXIT_FAILURE
5989 fi
5990
5991 # Handle -dlopen flags immediately.
5992 for file in $execute_dlfiles; do
5993 if test ! -f "$file"; then
5994 $echo "$modename: \`$file' is not a file" 1>&2
5995 $echo "$help" 1>&2
5996 exit $EXIT_FAILURE
5997 fi
5998
5999 dir=
6000 case $file in
6001 *.la)
6002 # Check to see that this really is a libtool archive.
6003 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6004 else
6005 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6006 $echo "$help" 1>&2
6007 exit $EXIT_FAILURE
6008 fi
6009
6010 # Read the libtool library.
6011 dlname=
6012 library_names=
6013
6014 # If there is no directory component, then add one.
6015 case $file in
6016 */* | *\\*) . $file ;;
6017 *) . ./$file ;;
6018 esac
6019
6020 # Skip this library if it cannot be dlopened.
6021 if test -z "$dlname"; then
6022 # Warn if it was a shared library.
6023 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6024 continue
6025 fi
6026
6027 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6028 test "X$dir" = "X$file" && dir=.
6029
6030 if test -f "$dir/$objdir/$dlname"; then
6031 dir="$dir/$objdir"
6032 else
6033 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6034 exit $EXIT_FAILURE
6035 fi
6036 ;;
6037
6038 *.lo)
6039 # Just add the directory containing the .lo file.
6040 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6041 test "X$dir" = "X$file" && dir=.
6042 ;;
6043
6044 *)
6045 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6046 continue
6047 ;;
6048 esac
6049
6050 # Get the absolute pathname.
6051 absdir=`cd "$dir" && pwd`
6052 test -n "$absdir" && dir="$absdir"
6053
6054 # Now add the directory to shlibpath_var.
6055 if eval "test -z \"\$$shlibpath_var\""; then
6056 eval "$shlibpath_var=\"\$dir\""
6057 else
6058 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6059 fi
6060 done
6061
6062 # This variable tells wrapper scripts just to set shlibpath_var
6063 # rather than running their programs.
6064 libtool_execute_magic="$magic"
6065
6066 # Check if any of the arguments is a wrapper script.
6067 args=
6068 for file
6069 do
6070 case $file in
6071 -*) ;;
6072 *)
6073 # Do a test to see if this is really a libtool program.
6074 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6075 # If there is no directory component, then add one.
6076 case $file in
6077 */* | *\\*) . $file ;;
6078 *) . ./$file ;;
6079 esac
6080
6081 # Transform arg to wrapped name.
6082 file="$progdir/$program"
6083 fi
6084 ;;
6085 esac
6086 # Quote arguments (to preserve shell metacharacters).
6087 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6088 args="$args \"$file\""
6089 done
6090
6091 if test -z "$run"; then
6092 if test -n "$shlibpath_var"; then
6093 # Export the shlibpath_var.
6094 eval "export $shlibpath_var"
6095 fi
6096
6097 # Restore saved environment variables
6098 if test "${save_LC_ALL+set}" = set; then
6099 LC_ALL="$save_LC_ALL"; export LC_ALL
6100 fi
6101 if test "${save_LANG+set}" = set; then
6102 LANG="$save_LANG"; export LANG
6103 fi
6104
6105 # Now prepare to actually exec the command.
6106 exec_cmd="\$cmd$args"
6107 else
6108 # Display what would be done.
6109 if test -n "$shlibpath_var"; then
6110 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6111 $echo "export $shlibpath_var"
6112 fi
6113 $echo "$cmd$args"
6114 exit $EXIT_SUCCESS
6115 fi
6116 ;;
6117
6118 # libtool clean and uninstall mode
6119 clean | uninstall)
6120 modename="$modename: $mode"
6121 rm="$nonopt"
6122 files=
6123 rmforce=
6124 exit_status=0
6125
6126 # This variable tells wrapper scripts just to set variables rather
6127 # than running their programs.
6128 libtool_install_magic="$magic"
6129
6130 for arg
6131 do
6132 case $arg in
6133 -f) rm="$rm $arg"; rmforce=yes ;;
6134 -*) rm="$rm $arg" ;;
6135 *) files="$files $arg" ;;
6136 esac
6137 done
6138
6139 if test -z "$rm"; then
6140 $echo "$modename: you must specify an RM program" 1>&2
6141 $echo "$help" 1>&2
6142 exit $EXIT_FAILURE
6143 fi
6144
6145 rmdirs=
6146
6147 origobjdir="$objdir"
6148 for file in $files; do
6149 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6150 if test "X$dir" = "X$file"; then
6151 dir=.
6152 objdir="$origobjdir"
6153 else
6154 objdir="$dir/$origobjdir"
6155 fi
6156 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6157 test "$mode" = uninstall && objdir="$dir"
6158
6159 # Remember objdir for removal later, being careful to avoid duplicates
6160 if test "$mode" = clean; then
6161 case " $rmdirs " in
6162 *" $objdir "*) ;;
6163 *) rmdirs="$rmdirs $objdir" ;;
6164 esac
6165 fi
6166
6167 # Don't error if the file doesn't exist and rm -f was used.
6168 if (test -L "$file") >/dev/null 2>&1 \
6169 || (test -h "$file") >/dev/null 2>&1 \
6170 || test -f "$file"; then
6171 :
6172 elif test -d "$file"; then
6173 exit_status=1
6174 continue
6175 elif test "$rmforce" = yes; then
6176 continue
6177 fi
6178
6179 rmfiles="$file"
6180
6181 case $name in
6182 *.la)
6183 # Possibly a libtool archive, so verify it.
6184 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6185 . $dir/$name
6186
6187 # Delete the libtool libraries and symlinks.
6188 for n in $library_names; do
6189 rmfiles="$rmfiles $objdir/$n"
6190 done
6191 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6192 test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6193
6194 if test "$mode" = uninstall; then
6195 if test -n "$library_names"; then
6196 # Do each command in the postuninstall commands.
6197 cmds=$postuninstall_cmds
6198 save_ifs="$IFS"; IFS='~'
6199 for cmd in $cmds; do
6200 IFS="$save_ifs"
6201 eval cmd=\"$cmd\"
6202 $show "$cmd"
6203 $run eval "$cmd"
6204 if test "$?" -ne 0 && test "$rmforce" != yes; then
6205 exit_status=1
6206 fi
6207 done
6208 IFS="$save_ifs"
6209 fi
6210
6211 if test -n "$old_library"; then
6212 # Do each command in the old_postuninstall commands.
6213 cmds=$old_postuninstall_cmds
6214 save_ifs="$IFS"; IFS='~'
6215 for cmd in $cmds; do
6216 IFS="$save_ifs"
6217 eval cmd=\"$cmd\"
6218 $show "$cmd"
6219 $run eval "$cmd"
6220 if test "$?" -ne 0 && test "$rmforce" != yes; then
6221 exit_status=1
6222 fi
6223 done
6224 IFS="$save_ifs"
6225 fi
6226 # FIXME: should reinstall the best remaining shared library.
6227 fi
6228 fi
6229 ;;
6230
6231 *.lo)
6232 # Possibly a libtool object, so verify it.
6233 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6234
6235 # Read the .lo file
6236 . $dir/$name
6237
6238 # Add PIC object to the list of files to remove.
6239 if test -n "$pic_object" \
6240 && test "$pic_object" != none; then
6241 rmfiles="$rmfiles $dir/$pic_object"
6242 fi
6243
6244 # Add non-PIC object to the list of files to remove.
6245 if test -n "$non_pic_object" \
6246 && test "$non_pic_object" != none; then
6247 rmfiles="$rmfiles $dir/$non_pic_object"
6248 fi
6249 fi
6250 ;;
6251
6252 *)
6253 if test "$mode" = clean ; then
6254 noexename=$name
6255 case $file in
6256 *.exe)
6257 file=`$echo $file|${SED} 's,.exe$,,'`
6258 noexename=`$echo $name|${SED} 's,.exe$,,'`
6259 # $file with .exe has already been added to rmfiles,
6260 # add $file without .exe
6261 rmfiles="$rmfiles $file"
6262 ;;
6263 esac
6264 # Do a test to see if this is a libtool program.
6265 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6266 relink_command=
6267 . $dir/$noexename
6268
6269 # note $name still contains .exe if it was in $file originally
6270 # as does the version of $file that was added into $rmfiles
6271 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6272 if test "$fast_install" = yes && test -n "$relink_command"; then
6273 rmfiles="$rmfiles $objdir/lt-$name"
6274 fi
6275 if test "X$noexename" != "X$name" ; then
6276 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
6277 fi
6278 fi
6279 fi
6280 ;;
6281 esac
6282 $show "$rm $rmfiles"
6283 $run $rm $rmfiles || exit_status=1
6284 done
6285 objdir="$origobjdir"
6286
6287 # Try to remove the ${objdir}s in the directories where we deleted files
6288 for dir in $rmdirs; do
6289 if test -d "$dir"; then
6290 $show "rmdir $dir"
6291 $run rmdir $dir >/dev/null 2>&1
6292 fi
6293 done
6294
6295 exit $exit_status
6296 ;;
6297
6298 "")
6299 $echo "$modename: you must specify a MODE" 1>&2
6300 $echo "$generic_help" 1>&2
6301 exit $EXIT_FAILURE
6302 ;;
6303 esac
6304
6305 if test -z "$exec_cmd"; then
6306 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6307 $echo "$generic_help" 1>&2
6308 exit $EXIT_FAILURE
6309 fi
6310 fi # test -z "$show_help"
6311
6312 if test -n "$exec_cmd"; then
6313 eval exec $exec_cmd
6314 exit $EXIT_FAILURE
6315 fi
6316
6317 # We need to display help for each of the modes.
6318 case $mode in
6319 "") $echo \
6320 "Usage: $modename [OPTION]... [MODE-ARG]...
6321
6322 Provide generalized library-building support services.
6323
6324 --config show all configuration variables
6325 --debug enable verbose shell tracing
6326 -n, --dry-run display commands without modifying any files
6327 --features display basic configuration information and exit
6328 --finish same as \`--mode=finish'
6329 --help display this help message and exit
6330 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
6331 --quiet same as \`--silent'
6332 --silent don't print informational messages
6333 --tag=TAG use configuration variables from tag TAG
6334 --version print version information
6335
6336 MODE must be one of the following:
6337
6338 clean remove files from the build directory
6339 compile compile a source file into a libtool object
6340 execute automatically set library path, then run a program
6341 finish complete the installation of libtool libraries
6342 install install libraries or executables
6343 link create a library or an executable
6344 uninstall remove libraries from an installed directory
6345
6346 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
6347 a more detailed description of MODE.
6348
6349 Report bugs to <bug-libtool@gnu.org>."
6350 exit $EXIT_SUCCESS
6351 ;;
6352
6353 clean)
6354 $echo \
6355 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
6356
6357 Remove files from the build directory.
6358
6359 RM is the name of the program to use to delete files associated with each FILE
6360 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6361 to RM.
6362
6363 If FILE is a libtool library, object or program, all the files associated
6364 with it are deleted. Otherwise, only FILE itself is deleted using RM."
6365 ;;
6366
6367 compile)
6368 $echo \
6369 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
6370
6371 Compile a source file into a libtool library object.
6372
6373 This mode accepts the following additional options:
6374
6375 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
6376 -prefer-pic try to building PIC objects only
6377 -prefer-non-pic try to building non-PIC objects only
6378 -static always build a \`.o' file suitable for static linking
6379
6380 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
6381 from the given SOURCEFILE.
6382
6383 The output file name is determined by removing the directory component from
6384 SOURCEFILE, then substituting the C source code suffix \`.c' with the
6385 library object suffix, \`.lo'."
6386 ;;
6387
6388 execute)
6389 $echo \
6390 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
6391
6392 Automatically set library path, then run a program.
6393
6394 This mode accepts the following additional options:
6395
6396 -dlopen FILE add the directory containing FILE to the library path
6397
6398 This mode sets the library path environment variable according to \`-dlopen'
6399 flags.
6400
6401 If any of the ARGS are libtool executable wrappers, then they are translated
6402 into their corresponding uninstalled binary, and any of their required library
6403 directories are added to the library path.
6404
6405 Then, COMMAND is executed, with ARGS as arguments."
6406 ;;
6407
6408 finish)
6409 $echo \
6410 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6411
6412 Complete the installation of libtool libraries.
6413
6414 Each LIBDIR is a directory that contains libtool libraries.
6415
6416 The commands that this mode executes may require superuser privileges. Use
6417 the \`--dry-run' option if you just want to see what would be executed."
6418 ;;
6419
6420 install)
6421 $echo \
6422 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6423
6424 Install executables or libraries.
6425
6426 INSTALL-COMMAND is the installation command. The first component should be
6427 either the \`install' or \`cp' program.
6428
6429 The rest of the components are interpreted as arguments to that command (only
6430 BSD-compatible install options are recognized)."
6431 ;;
6432
6433 link)
6434 $echo \
6435 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6436
6437 Link object files or libraries together to form another library, or to
6438 create an executable program.
6439
6440 LINK-COMMAND is a command using the C compiler that you would use to create
6441 a program from several object files.
6442
6443 The following components of LINK-COMMAND are treated specially:
6444
6445 -all-static do not do any dynamic linking at all
6446 -avoid-version do not add a version suffix if possible
6447 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
6448 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
6449 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6450 -export-symbols SYMFILE
6451 try to export only the symbols listed in SYMFILE
6452 -export-symbols-regex REGEX
6453 try to export only the symbols matching REGEX
6454 -LLIBDIR search LIBDIR for required installed libraries
6455 -lNAME OUTPUT-FILE requires the installed library libNAME
6456 -module build a library that can dlopened
6457 -no-fast-install disable the fast-install mode
6458 -no-install link a not-installable executable
6459 -no-undefined declare that a library does not refer to external symbols
6460 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6461 -objectlist FILE Use a list of object files found in FILE to specify objects
6462 -precious-files-regex REGEX
6463 don't remove output files matching REGEX
6464 -release RELEASE specify package release information
6465 -rpath LIBDIR the created library will eventually be installed in LIBDIR
6466 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
6467 -static do not do any dynamic linking of libtool libraries
6468 -version-info CURRENT[:REVISION[:AGE]]
6469 specify library version info [each variable defaults to 0]
6470
6471 All other options (arguments beginning with \`-') are ignored.
6472
6473 Every other argument is treated as a filename. Files ending in \`.la' are
6474 treated as uninstalled libtool libraries, other files are standard or library
6475 object files.
6476
6477 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6478 only library objects (\`.lo' files) may be specified, and \`-rpath' is
6479 required, except when creating a convenience library.
6480
6481 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6482 using \`ar' and \`ranlib', or on Windows using \`lib'.
6483
6484 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6485 is created, otherwise an executable program is created."
6486 ;;
6487
6488 uninstall)
6489 $echo \
6490 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6491
6492 Remove libraries from an installation directory.
6493
6494 RM is the name of the program to use to delete files associated with each FILE
6495 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6496 to RM.
6497
6498 If FILE is a libtool library, all the files associated with it are deleted.
6499 Otherwise, only FILE itself is deleted using RM."
6500 ;;
6501
6502 *)
6503 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6504 $echo "$help" 1>&2
6505 exit $EXIT_FAILURE
6506 ;;
6507 esac
6508
6509 $echo
6510 $echo "Try \`$modename --help' for more information about other modes."
6511
6512 exit $?
6513
6514 # The TAGs below are defined such that we never get into a situation
6515 # in which we disable both kinds of libraries. Given conflicting
6516 # choices, we go for a static library, that is the most portable,
6517 # since we can't tell whether shared libraries were disabled because
6518 # the user asked for that or because the platform doesn't support
6519 # them. This is particularly important on AIX, because we don't
6520 # support having both static and shared libraries enabled at the same
6521 # time on that platform, so we default to a shared-only configuration.
6522 # If a disable-shared tag is given, we'll fallback to a static-only
6523 # configuration. But we'll never go from static-only to shared-only.
6524
6525 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6526 build_libtool_libs=no
6527 build_old_libs=yes
6528 # ### END LIBTOOL TAG CONFIG: disable-shared
6529
6530 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
6531 build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
6532 # ### END LIBTOOL TAG CONFIG: disable-static
6533
6534 # Local Variables:
6535 # mode:shell-script
6536 # sh-indentation:2
6537 # 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 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: 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: 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 "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 "Борис Петербарг"
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 sunrise/set time for a gregorian date
344
345 @param day this day of month
346 @param month this month
347 @param year this year
348 @param longitude longitude to use in calculations
349 degrees, negative values are east
350 @param latitude latitude to use in calculations
351 degrees, negative values are south
352 @param sunrise return the utc sunrise in minutes after midnight (00:00)
353 @param sunset return the utc sunset in minutes after midnight (00:00)
354 */
355 void
356 hdate_get_utc_sun_time (int day, int month, int year, double latitude, double longitude, int *sunrise, int *sunset);
357
358 /*************************************************************/
359 /*************************************************************/
360
361 /**
362 @brief get the Gregorian day of the month
363
364 @param h pointer this hdate struct.
365 @return the Gregorian day of the month, 1..31.
366 */
367 int
368 hdate_get_gday (hdate_struct const * h);
369
370 /**
371 @brief get the Gregorian month
372
373 @param h pointer this hdate struct.
374 @return the Gregorian month, jan = 1.
375 */
376 int
377 hdate_get_gmonth (hdate_struct const * h);
378
379 /**
380 @brief get the Gregorian year
381
382 @param h pointer this hdate struct.
383 @return the Gregorian year.
384 */
385 int
386 hdate_get_gyear (hdate_struct const * h);
387
388 /**
389 @brief get the Hebrew day of the month
390
391 @param h pointer this hdate struct.
392 @return the Hebrew day of the month, 1..30.
393 */
394 int
395 hdate_get_hday (hdate_struct const * h);
396
397 /**
398 @brief get the Hebrew month
399
400 @param h pointer this hdate struct.
401 @return the Hebrew month, Tishery = 1 .. Adar I =13, Adar II = 14.
402 */
403 int
404 hdate_get_hmonth (hdate_struct const * h);
405
406 /**
407 @brief get the Hebrew year
408
409 @param h pointer this hdate struct.
410 @return the Hebrew year.
411 */
412 int
413 hdate_get_hyear (hdate_struct const * h);
414
415 /**
416 @brief get the day of the week
417
418 @param h pointer this hdate struct.
419 @return the the day of the week.
420 */
421 int
422 hdate_get_day_of_the_week (hdate_struct const * h);
423
424 /**
425 @brief get the size of the hebrew year
426
427 @param h pointer this hdate struct.
428 @return the the size of the hebrew year.
429 */
430 int
431 hdate_get_size_of_year (hdate_struct const * h);
432
433 /**
434 @brief get the new year day of the week
435
436 @param h pointer this hdate struct.
437 @return the the new year day of the week.
438 */
439 int
440 hdate_get_new_year_day_of_the_week (hdate_struct const * h);
441
442 /**
443 @brief get the Julian day number
444
445 @param h pointer this hdate struct.
446 @return the Julian day number.
447 */
448 int
449 hdate_get_julian (hdate_struct const * h);
450
451 /**
452 @brief get the number of days passed since 1 tishrey
453
454 @param h pointer this hdate struct.
455 @return the number of days passed since 1 tishrey.
456 */
457 int
458 hdate_get_days (hdate_struct const * h);
459
460 /**
461 @brief get the number of weeks passed since 1 tishrey
462
463 @param h pointer this hdate struct.
464 @return the number of weeks passed since 1 tishrey.
465 */
466 int
467 hdate_get_weeks (hdate_struct const * h);
468
469 /*************************************************************/
470 /*************************************************************/
471
472 /**
473 @brief creat a new hdate struct object, must be deleted using delete_hdate.
474
475 @return a new hdate object
476 */
477 hdate_struct *
478 new_hdate ();
479
480 /**
481 @brief delete an hdate struct object.
482
483 @param h pointer this hdate struct.
484 */
485 hdate_struct *
486 delete_hdate (hdate_struct *h);
487
488 /*************************************************************/
489 /*************************************************************/
490
491 /**
492 @brief Return a static string, with the package name and version
493
494 @return a static string, with the package name and version
495 */
496 char *
497 hdate_get_version_string ();
498
499 /**
500 @brief name of translator
501
502 @return a static string with name of translator, or NULL if none.
503 */
504 char *
505 hdate_get_translator_string ();
506
507 #ifdef __cplusplus
508 }
509 #endif
510
511 #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 sunrise/set time for 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 sunrise return the utc sunrise in minutes
65 @parm sunset return the utc sunset in minutes
66 */
67 void
68 hdate_get_utc_sun_time (int day, int month, int year, double latitude, double longitude, int *sunrise, int *sunset)
69 {
70 double gama; /* location of sun in yearly cycle in radians */
71 double eqtime; /* diffference betwen sun noon and clock noon */
72 double decl; /* sun declanation */
73 double ha; /* solar hour engle */
74 double sunrise_angle = M_PI * 90.833 / 180.0; /* sun angle at sunrise/set */
75
76 int day_of_year;
77
78 /* get the day of year */
79 day_of_year = hdate_get_day_of_year (day, month, year);
80
81 /* get radians of sun orbit around erth =) */
82 gama = 2.0 * M_PI * ((double)(day_of_year - 1) / 365.0);
83
84 /* get the diff betwen suns clock and wall clock in minutes */
85 eqtime = 229.18 * (0.000075 + 0.001868 * cos (gama)
86 - 0.032077 * sin (gama) - 0.014615 * cos (2.0 * gama)
87 - 0.040849 * sin (2.0 * gama));
88
89 /* calculate suns declanation at the equater in radians */
90 decl = 0.006918 - 0.399912 * cos (gama) + 0.070257 * sin (gama)
91 - 0.006758 * cos (2.0 * gama) + 0.000907 * sin (2.0 * gama)
92 - 0.002697 * cos (3.0 * gama) + 0.00148 * sin (3.0 * gama);
93
94 /* we use radians, ratio is 2pi/360 */
95 latitude = M_PI * latitude / 180.0;
96
97 /* the sun real time diff from noon at sunset/rise in radians */
98 ha = acos (cos (sunrise_angle) / (cos (latitude) * cos (decl)) - tan (latitude) * tan (decl));
99
100 /* we use minutes, ratio is 1440min/2pi */
101 ha = 720.0 * ha / M_PI;
102
103 /* get sunset/rise times in utc wall clock in minutes from 00:00 time */
104 *sunrise = (int)(720.0 + 4.0 * longitude - ha - eqtime);
105 *sunset = (int)(720.0 + 4.0 * longitude + ha - eqtime);
106
107 return;
108 }
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 ////////////////////////////////////////
457
458 /**
459 @brief name of translator
460
461 @return a static string with name of translator, or NULL if none
462 */
463 char *
464 get_translator_string ()
465 {
466 return hdate_get_translator_string ();
467 }
468
469 /**
470 @brief set this hdate object to use diaspora holidays and dates
471 */
472 void
473 set_diaspora ()
474 {
475 diaspora = HDATA_DIASPORA_FLAG;
476 }
477
478 /**
479 @brief set this hdate object to use israel holidays and dates
480 */
481 void
482 set_israel ()
483 {
484 diaspora = HDATA_ISRAEL_FLAG;
485 }
486
487 private:
488
489 int diaspora;
490 double latitude;
491 double longitude;
492 int tz;
493 hdate_struct *h;
494
495 };
496
497 } // name space
498
499 #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